The leading JSON Parser from Douglas Crockford
(http://www.json.org/json2.js) and www.JSONLint.com apparently don't like
the LValue keys to be without quotes.
Example: {foo: "bar"} should be {"foo": "bar"}
JSONObject.valueToString() doesn't emit quotes around keys. I've updated
this method as follows to appease various JSON parsers...
public String valueToString() {
string ret = '{';
for ( string key: this.keys() ) {
ret += '"' + key + '": ' +
this.getvalue(key).valueToString() + ',';
}
return ret.substring(0,ret.length()-1) + '}';
}
Original issue reported on code.google.com by mle...@gmail.com on 26 Mar 2010 at 1:21
Original issue reported on code.google.com by
mle...@gmail.com
on 26 Mar 2010 at 1:21