juneau-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Bognar <james.bog...@salesforce.com>
Subject Re: Combined serializers and parsers.
Date Sun, 04 Jun 2017 13:26:25 GMT
I was thinking it would replace the existing classes.  That's why it would
require a major release.  If the old classes remained, it would essentially
require duplicating the code.

But I think what you're implying is if we could create a Json 'facade' on
top of the exising JsonSerializer/JsonParser classes?  That's an
interesting idea.

(FYI....I'm just throwing this idea out there...it literally just popped in
my head this morning).



On Sun, Jun 4, 2017 at 9:20 AM, John D. Ament <johndament@apache.org> wrote:

> You wouldn't have to drop the existing ones to do this right? They could
> stay in place and yet still have the new combined version.
>
> On Sun, Jun 4, 2017 at 9:16 AM James Bognar <james.bognar@salesforce.com>
> wrote:
>
> > Wacky idea here...and something that would have to wait for a major
> release
> > (e.g. 7?)
> >
> > Combine the serializers and parsers together into the same class.
> >
> > Current....
> > Bean b;
> > String json = JsonSerializer.DEFAULT.serialize(b);
> > b = JsonParser.DEFAULT.parse(json);
> >
> > Better?....
> > Bean b;
> > String json = Json.DEFAULT.serialize(b);
> > b = Json.DEFAULT.parse(json);
> >
> > Builders would also be combined.
> >
> > --
> > James Bognar
> >
>



-- 
James Bognar

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message