Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
11-15-2019 01:55 PM
I have a path in the graph with a mix of relationships and nodes:
(a:N1)-[r1:R1]->(b:N2)-[r2:R2]->(c:N3)-[r3:R3]->(d:N4)->...
In my C# side I have POCO classes:
I want to return this path and then deserialize it into a list in C# as follows:
[
{{a}, {r1}, {b}}, // basically a list of concrete implementations of {A0,R0,A0}
{{b}, {r2}, {c}},
{{c}, {r3}, {d}}
]
Note that the actual path will be much longer than 4 nodes, so I need a way to loop through it. I also don't know what mix of A0s and R0s I will be returned, could be any mix and match.
I already have Json converter that uses a "Type" field in A0 and R0 to determine which concrete class to deserialize into, so I can do my own deserialization if I get the json of the nodes and relationships.
Is there a way I can do this? If there is a way of transforming the returned path into a .Net linked list of N0-R0-N0-R0-N0-R0-N0-etc. with the json of each, that will be enough for me to build my data structure.
Thanks!
All the sessions of the conference are now available online