Giter Site home page Giter Site logo

Collections serialization about gwt-jackson HOT 9 CLOSED

nmorel avatar nmorel commented on July 29, 2024
Collections serialization

from gwt-jackson.

Comments (9)

nmorel avatar nmorel commented on July 29, 2024

By default, all the Iterable are serialized with IterableJsonSerializer.
For the deserialization, it uses BaseCollectionJsonDeserializer and each implementation just create the Collection implementation by implementing the method newCollection(). See ArrayListJsonDeserializer for an example.

from gwt-jackson.

reinert avatar reinert commented on July 29, 2024

Ok. Thanks.

from gwt-jackson.

nmorel avatar nmorel commented on July 29, 2024

Why ? :)

from gwt-jackson.

reinert avatar reinert commented on July 29, 2024

Just to make sure I'm not using unecessary things in my generated serdes powered by gwtjackson.

https://github.com/reinert/requestor/blob/master/src/main/java/io/reinert/requestor/rebind/JsonGwtJacksonGenerator.java#L176 (the critical methods would be: serializeFromCollection and deserializeAsCollection)

from gwt-jackson.

reinert avatar reinert commented on July 29, 2024

BTW... I'm moving turbogwt-http to a separated project called Requestor.
I also created a separated project for the Pomises API called GDeferred which is used by Requestor.

from gwt-jackson.

reinert avatar reinert commented on July 29, 2024

FYI, requestor was officially released yesterday. It has an extension integration the HTTP Client API to gwt-jackson, making a really powerful union.

from gwt-jackson.

nmorel avatar nmorel commented on July 29, 2024

Yep, I saw your post on G+.
I read a bit the documentation and read how to use gwt-jackson.
Do we need to annotate every single POJO or only the root one ?

from gwt-jackson.

nmorel avatar nmorel commented on July 29, 2024

Also, I may add a simple example using requestor as I did for gwtp. This way, I can see if I break anything.

from gwt-jackson.

reinert avatar reinert commented on July 29, 2024

The way you can tell Requestor to generate and automatically register serializer and deserializer for a type is annotating it with @Json. This was the easiest way I found to provide auto serialization for custom types. Without any information in the types, or about them anywhere else, it was hard to automatically provide serialization for them. So, yes, it's necessary to annotate each POJO you want to have auto serialization. (The same procedure works for the AutoBeans integration, but instead of POJOs one should annotate only Interfaces)

I thank you for exposing requestor here.

from gwt-jackson.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.