Github user newkek commented on a diff in the pull request:

    https://github.com/apache/tinkerpop/pull/499#discussion_r89014281
  
    --- Diff: 
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializersV2d0.java
 ---
    @@ -153,13 +152,16 @@ public void serialize(final Edge edge, final 
JsonGenerator jsonGenerator, final
             }
     
             private void writeProperties(final Edge edge, final JsonGenerator 
jsonGenerator) throws IOException {
    -            final Iterator<Property<Object>> elementProperties = normalize 
?
    +            final Iterator<Property<Object>> edgeProperties = normalize ?
                         IteratorUtils.list(edge.properties(), 
Comparators.PROPERTY_COMPARATOR).iterator() : edge.properties();
    -            if (elementProperties.hasNext()) {
    +            if (edgeProperties.hasNext()) {
                     jsonGenerator.writeFieldName(GraphSONTokens.PROPERTIES);
     
                     jsonGenerator.writeStartObject();
    -                elementProperties.forEachRemaining(prop -> 
safeWriteObjectField(jsonGenerator, prop.key(), prop));
    +                while (edgeProperties.hasNext()) {
    +                    final Property<?> property = edgeProperties.next();
    +                    jsonGenerator.writeObjectField(property.key(), 
property.value());
    --- End diff --
    
    Basically I had written [this for some 
specs](https://gist.github.com/newkek/15e9933dc4b43674c2c60bc9487fc80e#file-graph-types-asciidoc)
 (note: not sure the Metrics and TraversalMetrics ones are still up to date but 
the rest should be).
    What I suggest is [the revision 
here](https://gist.github.com/newkek/15e9933dc4b43674c2c60bc9487fc80e/revisions#diff-5a08d02157ba6ec13bacc40ab3a3a7bc).


---
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