Open
Description
When converting a StringBuilder or StringBuffer object to JSON the values are
not treated as strings and and not quoted in the resulting JSON string.
assertEquals("\"v\"", JSONValue.toJSONString(new StringBuilder("v")));
assertEquals("\"v\"", JSONValue.toJSONString(new StringBuffer("v")));
This can be easily fixed by treating StringBuilder and StringBuffer values as
strings.
See attached diff for the fix.
Original issue reported on code.google.com by pft...@gmail.com
on 5 Feb 2015 at 11:21
Attachments: