From: Arun Gupta <Arun.Gupta_at_Sun.COM>
Date: Thu, 30 Aug 2007 09:38:51 -0700
jMaki distributed json.jar as is. I published a blog this morning
showing exactly that:
Paul Sandoz wrote:
> Arun Gupta wrote:
>> I'm familiar with this javadoc. But the package names were
>> org.codehaus.jettison.json.JSONObject and that's what confused me.
>>
>> What is the link between org.json.JSON* and
>> org.codehaus.jettison.json.JSON* ?
>>
>
> It is a clone, AFAIK there is no distribution of org.json.* classes.
>
> You can find the full Jettison javadoc here [1], including stuff for
> JSONObject and JSONArray. I cannot find an online version.
>
> Paul.
>
> [1]
> http://repository.codehaus.org/org/codehaus/jettison/jettison/1.0-RC1/jettison-1.0-RC1-javadoc.jar >
>
>> -Arun
>>
>> Paul Sandoz wrote:
>>> Hi Arun,
>>>
>>> See here:
>>>
>>> http://www.json.org/javadoc/org/json/JSONObject.html >>> http://www.json.org/javadoc/org/json/JSONArray.html >>>
>>> Arun Gupta wrote:
>>>> Where can I find an online version of Jettison JSON javadocs ?
>>>>
>>>> The following method in a resource:
>>>>
>>>> public JSONObject getJSONMessage() {
>>>> try {
>>>> return new JSONObject().put("greeting1", "Hello World");
>>>> } catch (JSONException ex) {
>>>> ex.printStackTrace();
>>>> }
>>>>
>>>> return null;
>>>> }
>>>>
>>>
>>> Hint, you can do the following:
>>>
>>> public JSONObject getJSONMessage() throws JSONException {
>>> return new JSONObject().put("greeting1", "Hello World");
>>> }
>>>
>>> Paul.
>>>
>>>
>>>> returns the result as:
>>>>
>>>> {"greeting1" : "Hello World" }
>>>>
>>>> I need to generate:
>>>>
>>>> {greeting1 : "Hello World" }
>>>>
>>>> I looked at the source code at:
>>>>
>>>> http://fisheye.codehaus.org/browse/~raw,r=26/jettison/trunk/src/main/java/org/codehaus/jettison/json/JSONObject.java >>>>
>>>>
>>>> and could not find anything obvious.
>>>>
>>>> -Arun
>>>>
>>>
>>
>