How do I deserialize a path with mixed nodes and relationships into C#?

I have a path in the graph with a mix of relationships and nodes:

In my C# side I have POCO classes:

  • N1, N2, N3, N4 inherit from abstract class N0
  • R1, R2, R3 inherit from abstract class R0

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.