[json-lib-user] hopefully simple question about JSONObject
Brought to you by:
aalmiray
From: David R. <dwr...@lb...> - 2008-01-12 00:40:49
|
I am a newbie to Json-lib and am trying to create a JSONObject within a Java 1.5 servlet. I am using json-lib-2.2-jdk15.jar I have the following code: Map outputMap = new HashMap(); outputMap.put("var1", "value1"); JSONObject jsonObject = JSONObject.fromObject(outputMap) The servlet dies on the last line of code. I have tried the JSONSerializer version from the snippets as well with the same result. The answer is probably staring me in the face, but I don't see it. |