[ https://issues.apache.org/jira/browse/TINKERPOP-1635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15878700#comment-15878700 ]
ASF GitHub Bot commented on TINKERPOP-1635: ------------------------------------------- Github user davebshow commented on the issue: https://github.com/apache/tinkerpop/pull/561 Yeah it looks fine to me. It seems that properties are serialized before the element dict is "cleaned up". I don't see why you would serialize it again. However, I haven't really familiarized myself with the new GraphSON work on master yet. Still, I see no reason why we can't merge this. If the code is refactored and it is no longer relevant, so be it. > gremlin-python: Duplicate serialization of element property in > PropertySerializer > --------------------------------------------------------------------------------- > > Key: TINKERPOP-1635 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1635 > Project: TinkerPop > Issue Type: Bug > Components: language-variant > Affects Versions: 3.3.0 > Reporter: Florian Hockmann > Priority: Trivial > > The {{PropertySerializer}} in the current master branch of gremlin-python > serializes the element property twice: > {code} > elementDict = writer.toDict(property.element) > #... > "element": writer.toDict(elementDict) > {code} > This isn't a problem when the element only contains simple types like strings > that aren't serialized by adding a type attribute (like in the unit test for > this component). However, all other types like integers for example are > serialized two times. So an integer will be serialized to: > {code} > {"@type":"g:Int32","@value":{"@type":"g:Int32","@value":1}} > {code} > Full example: > {code} > >>> p = Property("aKey","aValue", Edge(123, Vertex(1), "edgeLabel", > >>> Vertex(2))) > >>> writer.writeObject(p) > '{"@type":"g:Property","@value":{"value":"aValue","key":"aKey","element":{"@type":"g:Edge","@value":{"inV":{"@type":"g:Int32","@value":{"@type":"g:Int32","@value":2}},"id":{"@type":"g:Int32","@value":{"@type":"g:Int32","@value":123}},"outV":{"@type":"g:Int32","@value":{"@type":"g:Int32","@value":1}},"label":"edgeLabel"}}}}' > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)