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...@sandglass-software.com> on 2013/10/20 17:28:50 UTC
OFBiz JSON Classes
Does anyone know why we are using a JJ compiler to generate the JSON
classes in framework/base? It seems to me we could start off with
compiler-generated code, then improve it by hand.
--
Adrian Crum
Sandglass Software
www.sandglass-software.com
Re: OFBiz JSON Classes
Posted by Adam Heath <do...@brainfood.com>.
Because that's how javacc works, it takes effort to keep it from not
generating those files.
And, those aren't the same classes, btw.
The fix for this would require changing javacc to allow for a different
exception to be thrown by the generated methods; this would then mean a
shared class could be used. javacc doesn't have such an option(at the
time these were written).
As for continuing to use javacc, and not modifying the generated files,
that's not how the GPL defines source(and yes, I know ofbiz is not gpl).
The GPL defines source as the "preferred source for editting".
On 01/06/2014 07:46 AM, Jacques Le Roux wrote:
> I stumbled upon this and I wonder also why those files (like ParseException.java) are duplicated in
> framework/sql/build/gen-src/javacc/org/ofbiz/sql
> and
> framework/base/build/gen-src/javacc/org/ofbiz/base/json/
>
> Adam, could you enlight us?
>
> Jacques
>
> On Sunday, October 20, 2013 4:28 PM adrian.crum@sandglass-software.com wrote
>> Does anyone know why we are using a JJ compiler to generate the JSON
>> classes in framework/base? It seems to me we could start off with
>> compiler-generated code, then improve it by hand.
Re: OFBiz JSON Classes
Posted by Jacques Le Roux <ja...@les7arts.com>.
I stumbled upon this and I wonder also why those files (like ParseException.java) are duplicated in
framework/sql/build/gen-src/javacc/org/ofbiz/sql
and
framework/base/build/gen-src/javacc/org/ofbiz/base/json/
Adam, could you enlight us?
Jacques
On Sunday, October 20, 2013 4:28 PM adrian.crum@sandglass-software.com wrote
> Does anyone know why we are using a JJ compiler to generate the JSON
> classes in framework/base? It seems to me we could start off with
> compiler-generated code, then improve it by hand.
Re: OFBiz JSON Classes
Posted by "David E. Jones" <de...@me.com>.
Why have our own stuff at all? There are good JSON parsers and generators around, one of the best for automatic type conversions and such being the one built into Groovy (JsonSlurper, JsonBuilder, JsonOutput, etc).
-David
On Oct 20, 2013, at 8:28 AM, Adrian Crum <ad...@sandglass-software.com> wrote:
> Does anyone know why we are using a JJ compiler to generate the JSON classes in framework/base? It seems to me we could start off with compiler-generated code, then improve it by hand.
>
> --
> Adrian Crum
> Sandglass Software
> www.sandglass-software.com