diff options
Diffstat (limited to 'rh-bin/activesystem.json')
-rwxr-xr-x | rh-bin/activesystem.json | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/rh-bin/activesystem.json b/rh-bin/activesystem.json index d65c6c4..c37c5c4 100755 --- a/rh-bin/activesystem.json +++ b/rh-bin/activesystem.json @@ -22,7 +22,7 @@ use strict; use RHRD::rddb; -use JSON; +use JSON::MaybeXS; use IO::Socket; use Socket qw(SOCK_STREAM getaddrinfo); @@ -64,9 +64,11 @@ $answer{'status'} = $status; $answer{'errorstring'} = $errorstring; $answer{'system'} = $system; +my $j = JSON::MaybeXS->new(utf8 => 0); + print "Content-type: application/json; charset=UTF-8\n"; print "Status: $responsecode\n\n"; -print JSON->new->encode(\%answer); +print $j->encode(\%answer); |