[ https://issues.apache.org/jira/browse/TINKERPOP-1874?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16332435#comment-16332435 ]
ASF GitHub Bot commented on TINKERPOP-1874: ------------------------------------------- GitHub user spmallette opened a pull request: https://github.com/apache/tinkerpop/pull/784 TINKERPOP-1874 P does not appear to be serialized consistently in GraphSON https://issues.apache.org/jira/browse/TINKERPOP-1874 Added bunch of tests for this and found that .NET was still working, but that was just because of how the gherkin processor was generating the traversals (it was always converting `P` args to lists basically). I modified the `P` template for .NET and made it so that `within` and `without` are handled differently from the other enums - `within` and `without` will always pass a collection rather than an individual object if there is only one item present in the arg array. I also updated the IO docs to include `within` and `without` so that it was clear to implementers what was expected for them. I may have to come back and do some cleanup here, but I already went deep on my PR to master for this so I'd rather just CTR in the doc fixes later. You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/tinkerpop TINKERPOP-1874 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/tinkerpop/pull/784.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #784 ---- commit 261b93b646c503068328d291224b430e4618410b Author: Stephen Mallette <spmva@...> Date: 2018-01-18T22:07:21Z TINKERPOP-1874 Added tests around P Validates various forms of serialization with focus on GraphSON and GLVs (where there were problems). commit 822b33174c87a2a918b3fc9df421585a57ef3345 Author: Stephen Mallette <spmva@...> Date: 2018-01-19T13:18:25Z TINKERPOP-1874 keep P.within and P.without using collection GraphSON deserialization of P.within and P.without expects a single collection regardless of the number of values, so even a single argument should serialize to a list. commit 1c33340277612ba81ee751d8f91297621d9476de Author: Stephen Mallette <spmva@...> Date: 2018-01-19T13:37:29Z TINKERPOP-1874 Added P.within/out graphson examples for io docs ---- > P does not appear to be serialized consistently in GraphSON > ----------------------------------------------------------- > > Key: TINKERPOP-1874 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1874 > Project: TinkerPop > Issue Type: Bug > Components: io > Affects Versions: 3.2.7 > Reporter: stephen mallette > Assignee: stephen mallette > Priority: Major > > {{P}} deserialization seems to expect {{List}} arguments for collection > oriented operators like {{within}} and {{outside}} so {{P.without("x")}} > should wrap "x" in a {{List}} for serialization purposes. This causes > weirdness in some GLVs. For example in .NET we see that the use of > {{P.without("x")}} fails to deserialize the bytecode, but {{P.Without(new > List<string>{"x"})}} will work fine. Just need to get this all straight and > consistent. -- This message was sent by Atlassian JIRA (v7.6.3#76005)