Adrian Crum wrote:
> Adam Heath wrote:
>> Adrian Crum wrote:
>>> [email protected] wrote:
>>>> Author: doogie
>>>> Date: Wed Feb 10 22:47:30 2010
>>>> New Revision: 908712
>>>>
>>>> URL: http://svn.apache.org/viewvc?rev=908712&view=rev
>>>> Log:
>>>> JSON reading/writing. May seem like it is uneeded, but a later commit
>>>> will add support for this becoming more extensible.
>>>>
>>>> Added:
>>>> ofbiz/trunk/framework/base/src/org/ofbiz/base/json/
>>>> ofbiz/trunk/framework/base/src/org/ofbiz/base/json/JSON.jj
>>>> ofbiz/trunk/framework/base/src/org/ofbiz/base/json/JSONWriter.java
>>>> ofbiz/trunk/framework/base/src/org/ofbiz/base/json/test/
>>>>
>>>> ofbiz/trunk/framework/base/src/org/ofbiz/base/json/test/JSONTests.java
>>>> Modified:
>>>> ofbiz/trunk/framework/base/build.xml
>>> Adam,
>>>
>>> Could you help us out here and give us an overview of what is being done
>>> in this commit?
>>
>> This is a stand-alone json reader/writer. There are existing
>> libraries out there that do this, so this commit, by itself, may seem
>> like it is duplicating code. However, a later commit adds a feature
>> to this json stuff, to embed other classes into the output. I can
>> embed URL, DateTimeFormat, etc. Webslinger uses this feature for
>> configuration data.
>
> You're saying the existing JSON libraries don't support that?
Correct.
--
{
"key": 1.234,
"list": [
{
"key": "string",
"special": resolve("java.net.URL:http:\/\/ofbiz.apache.org")
}
]
}
--
This feature is only enabled when a flag is set(one for reading, one
for writing). But, this feature is not in this particular commit,
that comes later, in 908714.