Giter Site home page Giter Site logo

Comments (10)

nmorel avatar nmorel commented on July 29, 2024

I only tested with GWTTestCase. A sample project is on the road map but I had not find the time yet.
So you are the first one testing it in a real project :)

Why would you like to resolve the dependencies at runtime ? The only usable dependency on server side is the jackson-annotation jar. But if you want to use it for server code, you probably have a dependency to jackson-databind anyway that will resolve it.

I just tried with a fresh project with GWT 2.5.1. To make it work, I had to do a few more things missing on README :

  • add a dependency to gwt-user : I could maybe remove the scope provided from my pom
  • <inherits name="com.google.gwt.user.User" /> : I need to add this inherits to gwt-jackson module or at least the gwt modules needed to make it work
  • <inherits name="com.google.gwt.logging.Logging" /> : There are two classes using a class from that module. I'll see if I can remove its use.

The rest was just copy/paste from the README.

I don't know why it can't deserialize it for you. There is a problem in the generation because your deserializer should have 2 elements in deserializers map. Can you share me a sample project to reproduce the issue please ?

from gwt-jackson.

spg avatar spg commented on July 29, 2024

I tried it in 2 different projects (in devmode, didn't try it with a compiled app yet), and in project A provided scoping works fine, whereas in project B it failed (but project B has a much more complex Maven structure than project A). So this might be a non-issue.

And I found why the deserialization did not work. It was only because I annotated the Person class with annotations from org.codehaus.* instead of com.fasterxml.*. Maybe you should precise this requirement in the README or the wiki.

Thanks a lot for your help, I'm going to hack around and try different things with your lib today.

from gwt-jackson.

nmorel avatar nmorel commented on July 29, 2024

Right, I only support annotations from Jackson 2.x. I put a link to the project but i'll add the precision.
Thanks for the input :)

from gwt-jackson.

nmorel avatar nmorel commented on July 29, 2024

Closing the issue. I think I covered all the points :)

from gwt-jackson.

nmorel avatar nmorel commented on July 29, 2024

Were you able to make some more tests ?
Any feedback would be greatly appreciated :)

from gwt-jackson.

spg avatar spg commented on July 29, 2024

We are using gwt-jackson in one project at ArcBees, and I can report that so far, no breaking problems have been encountered :) It does what it says on the box, I like that!

I believe that @Chris-V is going to use gwt-jackson in GWTP's upcoming REST-Dispatcher. (We're working a JSON alternative to our widely used RPC Dispatcher). It will help us move away from Resty-GWT. We'll keep you posted if any issues arise.

Speaking of gwt-jackson, feel free to ping me if you ever need help on some issues. Cheers!

from gwt-jackson.

Chris-V avatar Chris-V commented on July 29, 2024

Yes I updated the REST dispatcher to use gwt-jackson 0.2-SNAPSHOT and so far I can tell you did a great job :)
When you release 0.2, I will be able to ship our next version.

from gwt-jackson.

nmorel avatar nmorel commented on July 29, 2024

That's great, thanks! You had no problem to include it inside GWTP ? How it works ? You generate the interface that extends ObjectMapper and the call to GWT.create() ?

I'm releasing the 0.2.0 version now. It should be available in a few hours on maven central.

from gwt-jackson.

Chris-V avatar Chris-V commented on July 29, 2024

No issues so far. Since you are interested, I generate the ObjectMapper interface and the GWT.create() call. As for retrieving them at runtime, I map the action's arguments to a type identifier and then the type identifier to a provider for the ObjectMapper. Technically I could map the action to the ObjectMapper directly but it ties our dispatcher too much to the serialization mechanism.
On a side-note, I also had to prevent ObjectMapper<Void> generation and handle it myself because it tried to serialize the static final TYPE in there. Void can be ambiguous to serialize so it's fine, but aren't static fields usually ignored even without @JsonIgnore?

Thanks for the release 👍

from gwt-jackson.

nmorel avatar nmorel commented on July 29, 2024

You're right, I should ignore the static fields. I'll fix that and see if I can handle Void better.

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.