[json-lib-user] Error in serializing JSON
Brought to you by:
aalmiray
From: Tim H. <har...@ya...> - 2009-12-28 19:10:41
|
Hi all, the following code: String str = "{\"Attr\": {\"searchString\": \"[646.011 TO 646.013]\"}}"; logger.debug(str); logger.debug( JSONObject.fromObject(str).toString(2)); Produces the following result: {"Attr": {"searchString": ["646.011 TO 646.013"]}} As you can see JSON-Lib is interpreting the brackets inside the quotes as if they denote a JSON array. JSON-lib has been so rock-solid to this point that I rely on it heavily and must get this fixed for my code to continue to work. Any help greatly appreciated. Thanks, Tim |