You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by newkek <gi...@git.apache.org> on 2016/12/19 16:26:41 UTC

[GitHub] tinkerpop pull request #517: Fix numbers deserialization for GraphSON2.

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 <ke...@datastax.com>
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] tinkerpop pull request #517: Fix numbers deserialization for GraphSON2.

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] tinkerpop issue #517: Fix numbers deserialization for GraphSON2.

Posted by spmallette <gi...@git.apache.org>.
Github user spmallette commented on the issue:

    https://github.com/apache/tinkerpop/pull/517
  
    Merged via CTR to tp32 and master


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---