GitHub user newkek opened a pull request:

    https://github.com/apache/tinkerpop/pull/517

    Fix numbers deserialization for GraphSON2.

    Issue:
    There was a small issue with `ObjectMapper` that was preventing one from 
doing `objectMapper.readValue(jsonString, Integer.class/Double.class)`. Turns 
out the issue come from the fact that Jackson normally doesn't uses the 
`GraphSONTypeResolverBuilder` hook I've introduced for the typing system - and 
call directly the default deserializers - for numbers values like `Integer` or 
`Double`, which led the default deserializers to fail since they are facing a 
Typed object (`{"@type":..., "@value":....}`) and not simply the value.
    
    Fix: 
    Adding simple deserializers for `Integer` and `Double` causes Jackson to 
use the hook for the typing system and hence deserialization works normally.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/newkek/incubator-tinkerpop 
fix-graphson2-numbers

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/tinkerpop/pull/517.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #517
    
----
commit c66bbdf477c1576eb700271d3473e3d67ff4ab5f
Author: Kevin Gallardo <[email protected]>
Date:   2016-12-19T15:56:42Z

    Fix numbers deserialization for GraphSON2.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to