You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Adrian Crum <ad...@hlmksw.com> on 2010/02/11 00:58:43 UTC

Re: svn commit: r908712 - in /ofbiz/trunk/framework/base: build.xml src/org/ofbiz/base/json/ src/org/ofbiz/base/json/JSON.jj src/org/ofbiz/base/json/JSONWriter.java src/org/ofbiz/base/json/test/ src/org/ofbiz/base/json/test/JSONTests.java

doogie@apache.org 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?

Re: svn commit: r908712 - in /ofbiz/trunk/framework/base: build.xml src/org/ofbiz/base/json/ src/org/ofbiz/base/json/JSON.jj src/org/ofbiz/base/json/JSONWriter.java src/org/ofbiz/base/json/test/ src/org/ofbiz/base/json/test/JSONTests.java

Posted by Adam Heath <do...@brainfood.com>.
Adrian Crum wrote:
> Adam Heath wrote:
>> Adrian Crum wrote:
>>> doogie@apache.org 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.

Re: svn commit: r908712 - in /ofbiz/trunk/framework/base: build.xml src/org/ofbiz/base/json/ src/org/ofbiz/base/json/JSON.jj src/org/ofbiz/base/json/JSONWriter.java src/org/ofbiz/base/json/test/ src/org/ofbiz/base/json/test/JSONTests.java

Posted by Adrian Crum <ad...@hlmksw.com>.
Adam Heath wrote:
> Adrian Crum wrote:
>> doogie@apache.org 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?

Re: svn commit: r908712 - in /ofbiz/trunk/framework/base: build.xml src/org/ofbiz/base/json/ src/org/ofbiz/base/json/JSON.jj src/org/ofbiz/base/json/JSONWriter.java src/org/ofbiz/base/json/test/ src/org/ofbiz/base/json/test/JSONTests.java

Posted by Adam Heath <do...@brainfood.com>.
Adrian Crum wrote:
> doogie@apache.org 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.