[
https://issues.apache.org/jira/browse/TINKERPOP-3182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18017074#comment-18017074
]
ASF GitHub Bot commented on TINKERPOP-3182:
-------------------------------------------
spmallette commented on code in PR #3194:
URL: https://github.com/apache/tinkerpop/pull/3194#discussion_r2310707480
##########
gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/graph.js:
##########
@@ -79,10 +79,19 @@ class Edge extends Element {
this.inV = inV;
this.properties = {};
if (properties) {
- const keys = Object.keys(properties);
- for (let i = 0; i < keys.length; i++) {
- const k = keys[i];
- this.properties[k] = properties[k].value;
+ if (Array.isArray(properties)) {
Review Comment:
no. doing this here in `Edge` preserves the map structure for `properties`
that was there before irrespective of what the serializer decides to send in
the constructor. `Vertex` and `VertexProperty` just had a direct assignment
which just accepted what the serializer gave it (with all the weirdness that
comes with that), so i left that.
> Consistent serialization of Path for untyped GraphSON
> -----------------------------------------------------
>
> Key: TINKERPOP-3182
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3182
> Project: TinkerPop
> Issue Type: Bug
> Components: io
> Affects Versions: 3.7.4
> Reporter: Stephen Mallette
> Assignee: Stephen Mallette
> Priority: Major
>
> {{Path}} objects are being detached to reference by the GraphSON v2/3
> serializers which puts the output at odds with v1 untyped. This is not a
> documented difference that was expected to exist. Users should control
> property inclusion on elements via the {{materializeProperties}} option.
> Should not be a breaking change and mitigation for performance issues can be
> disabled {{materializeProperties}}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)