Hi,
We have developed a perl script to monitor the Google Applications stats but my plugin sometimes give an 'malformed JSON string,' when running the script.
[root@clrfmd1 libexec]# ./check_googlestats.pl --service='Google Calen +dar' malformed JSON string, neither array, object, number, string or atom, +at character offset 0 (before "(end of string)") at ./check_googlesta +ts.pl line 23
The plugin doesn't always throw this error and works pretty fine most of the time.
The URL that we are accessing is below
my $content = `curl http://www.google.com/appsstatus/json/en 2>/dev/nu +ll`; $content =~ s/dashboard.jsonp\(//g; $content =~ s/\)\;$//g;
The script is trying to process the response from JSON by decoding the URL.
Does anybody have any idea on this? There appears to somehow the parsing is wrong and I am unable to find the problem. Could somebody please let me know what changes are required to get this going.
Regards,
Sricharan
In reply to JSON Parsing error in perl script by ksricwow
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |