use proper JSON encoding/decoding

This commit is contained in:
Graham Knop 2009-02-10 21:41:36 +00:00
parent 7023683b48
commit bf9bd2f0d2
18 changed files with 54 additions and 54 deletions

View file

@ -97,7 +97,7 @@ sub www_spectreGetSiteData {
}
$siteData{cron} = \@schedules;
}
return JSON::encode_json(\%siteData);
return JSON::to_json(\%siteData);
}
#-------------------------------------------------------------------

View file

@ -200,7 +200,7 @@ sub www_spellCheck {
# work around TinyMCE JSON encoding bug
$data =~ s/([^\\](?:\\\\)*)\\'/$1'/g;
my $params = JSON->new->utf8->decode($data);
my $params = JSON->new->decode($data);
my $result;
# dispatch to different subs based on the 'method' in the JSON data