Comments (10)
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.
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.
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.
Closing the issue. I think I covered all the points :)
from gwt-jackson.
Were you able to make some more tests ?
Any feedback would be greatly appreciated :)
from gwt-jackson.
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.
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.
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.
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.
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)
- HashMap <SimplePojo, Set <Integer>> ...does not serialize into Json HOT 2
- No source code is available for type com.fasterxml.jackson.databind.ObjectMapper; did you forget to inherit a required module? HOT 3
- Support for java.util.Optional HOT 1
- Expected a string but was BEGIN_OBJECT at line 1 column 2 HOT 1
- Please REVERT the dependency on Jackson 2.9.*, Jackson 2.9.* is NOT compatible with GWT. HOT 2
- Support for @JsonCreator(mode = Mode.DELEGATING)
- Custom deserializer compilation error
- Getter returning Optional<T> of nullable T causing compilation error HOT 2
- GWT 2.6.1 + GwtJackson 0.15.3 HOT 3
- JsonSerializationContext.Builder override not working as expected
- Error:GWT Compiler: No source code is available for type com.fasterxml.jackson.annotation.JsonTypeInfo.As; did you forget to inherit a required module?
- JsonTypeInfo defaultImpl attribute not working HOT 1
- Update jackson dependency to 2.9.8
- Update javapoet dependency to 1.11.1
- Support for JsonFormat.Feature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE
- Annotations on Java8 default interface are ignored HOT 1
- Can't figure out the stackoverflow I am getting
- More (de)serialization customization (JsonFilter or equivalent)
- Double.NaN / NEGATIVE_INFINITY / POSITIVE_INFINITY - Numeric values must be finite, but was
- Many compile problems
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gwt-jackson.