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

Kevin Gallardo commented on TINKERPOP-1474:
-------------------------------------------

re: GraphSON:

The GraphSON spec [as detailed 
here|http://tinkerpop.apache.org/docs/3.3.0/dev/io/#_vertex_3] mentions 
properties being serialized as part of the Vertex and that's what I was 
referring to If Tinkerpop were to decide that properties are fully separate 
from Vertex then the GraphSON spec should reflect it, since in GraphSON there 
is no notion of "g:DetachedVertex" or "g:ReferenceVertex" - everything is 
Vertex, so the serialization specs should align with that I think.

About properties, (I know this is a long term goal and you're still only 
thinking about it but) to me it seems the most natural that Properties get 
serialized separately from Vertices and Edges and simply contain a reference 
(ID) to their parent element to allow re-attaching to it.

> API Alignment Between Java Gremlin Graph Structure and GLVs
> -----------------------------------------------------------
>
>                 Key: TINKERPOP-1474
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1474
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: io
>    Affects Versions: 3.2.2
>            Reporter: Adam Holmberg
>            Assignee: stephen mallette
>
> The current Java GraphSON implementation and that in the Python GLV leave 
> some question about what *should* be returned from a simple traversal like 
> `g.V()`.
> The java implementation presently assumes that properties could be present 
> and returns a DetachedVertex: 
> https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializersV2d0.java#L420-L433
> The python implementation assumes no such thing and returns something more 
> reminiscent of a ReferenceVertex: 
> https://github.com/apache/tinkerpop/blob/master/gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py#L238-L242
> Is the java version overreaching, and should not expect properties unless a 
> step calls for them (e.g. ` g.V().valueMap()` or `g.V().values('name')`, or 
> should the Python version be expanded?
> Is there something we can do to establish guidelines for this, and align 
> these APIs?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to