You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "stephen mallette (JIRA)" <ji...@apache.org> on 2018/02/13 15:19:00 UTC

[jira] [Commented] (TINKERPOP-1738) Proper functioning of GraphSONReader depends on order of elements in String representation

    [ https://issues.apache.org/jira/browse/TINKERPOP-1738?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16362475#comment-16362475 ] 

stephen mallette commented on TINKERPOP-1738:
---------------------------------------------

[~newkek] i noticed that jackson 2.9.4 released so i tried to implement the update to see if this bug was fixed. sadly, i'm still getting the same error, but perhaps i didn't implement something right as there were some API changes for Jackson that I had to deal with - my work is here (based from {{tp32}}):

https://github.com/apache/tinkerpop/tree/TINKERPOP-1738-wip

Do you remember if there was anything else we needed to do on our side to fix this issue?

> Proper functioning of GraphSONReader depends on order of elements in String representation
> ------------------------------------------------------------------------------------------
>
>                 Key: TINKERPOP-1738
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1738
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: io
>    Affects Versions: 3.3.0
>            Reporter: Daniel Kuppitz
>            Assignee: stephen mallette
>            Priority: Major
>
> The following two snippets are basically using the same stringified JSON object, it's just the order of elements that is different.
> {noformat}
> gremlin> GraphSONReader.build().create().readObject(new java.io.ByteArrayInputStream('{"@value":{"step":[["addV","poc_int"],["property","bigint1value",{"@value":-4294967295,"@type":"g:Int32"}]]},"@type":"g:Bytecode"}'.getBytes()), Bytecode.class)
> ==>[[], [addV(poc_int), property(bigint1value, 1)]]
> {noformat}
> {noformat}
> gremlin> GraphSONReader.build().create().readObject(new java.io.ByteArrayInputStream('{"@type":"g:Bytecode","@value":{"step":[["addV","poc_int"],["property","bigint1value",{"@type":"g:Int32","@value":-4294967295}]]}}'.getBytes()), Bytecode.class)
> Could not deserialize the JSON value as required. Nested exception: org.apache.tinkerpop.shaded.jackson.databind.JsonMappingException: Could not deserialize the JSON value as required. Nested exception: org.apache.tinkerpop.shaded.jackson.core.JsonParseException: Numeric value (-4294967295) out of range of int
>  at [Source: java.io.ByteArrayInputStream@6d367020; line: 1, column: 126]
>  at [Source: java.io.ByteArrayInputStream@6d367020; line: 1, column: 115] (through reference chain: java.util.ArrayList[1]->java.util.ArrayList[2])
>  at [Source: java.io.ByteArrayInputStream@6d367020; line: 1, column: 115]
> Type ':help' or ':h' for help.
> Display stack trace? [yN]
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)