On Wed, Dec 25, 2019 at 7:38 AM Ralph Goers <ralph.go...@dslextreme.com> wrote:
> Also, I must admit I probably would have implemented the
> resolvers differently. It seems to me that each “entity" is going
> to return either a String, a number, a Map, or an array.  So I
> would have just had the resolver return its key and its data and
> left calling the jsonGenerator to the class that calls all the resolvers.

That was my initial attempt as well. But later figured out that not
every resolver is returning an "entity". For optimization purposes,
some reach out to nasty JsonGenerator tricks such as writeRawValue(),
etc.

> Then you could have reused the same resolvers to generate XML.

How would you differentiate between XML attributes and values in such a case?

Reply via email to