Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JObject vs JArray Error loading JsonReader to JObject #71

Open
tsmccartan opened this issue Feb 16, 2020 · 1 comment
Open

JObject vs JArray Error loading JsonReader to JObject #71

tsmccartan opened this issue Feb 16, 2020 · 1 comment

Comments

@tsmccartan
Copy link

Running the default sample seems to fail, if you have more than 1 Vertex returned from the query. IVertexJsonConverter - ReadJson fails on JObject.Load (ready), as the return from cosmos gremlin db is an array of vertex from the query, and JObject.load can only accept a single element.

How is this supposed to return a lit, when it is using JObject? If I modify the code in the IVertexJsonConvert, to do a JArray.Load, then it works, but I can only return 1 Vertex.

This is the result from my GremlinGraph Query Results: This is what is being passed in the JsonReader, and this fails on loading to JObject, as it is an array.

"[ { "id": "degree-7ee68187-f1e5-4c34-91e8-d2b9758fab98", "label": "DEGREETEST", "type": "vertex", "properties": { "entity": [ { "id": "degree-7ee68187-f1e5-4c34-91e8-d2b9758fab98|entity", "value": "DEGREETEST" } ], "Degree": [ { "id": "9af733f9-22f8-41d3-bec5-c85b02b00b71", "value": "BA" } ] } }, { "id": "degree-e6adb51c-90ba-4f5c-bec7-07376ac731c1", "label": "DEGREETEST", "type": "vertex", "properties": { "entity": [ { "id": "degree-e6adb51c-90ba-4f5c-bec7-07376ac731c1|entity", "value": "DEGREETEST" } ], "Degree": [ { "id": "a13116b3-b453-45ec-946b-87095eaa181c", "value": "MBA" } ] } }, {
r\n "id": "degree-c97e4f73-508b-430f-acd8-a14e2a8d9e77", "label": "DEGREETEST", "type": "vertex", "properties": { "entity": [ { "id": "degree-c97e4f73-508b-430f-acd8-a14e2a8d9e77|entity", "value": "DEGREETEST" } ], "Degree": [ { "id": "d34d6ec9-ee9f-479f-9ebf-c9852021cc30", "value": "PHD" } ] } }]"

@evo-terren
Copy link
Owner

I would recommend looking at https://github.com/ExRam/ExRam.Gremlinq instead of this project. I've abandoned it and don't plan on returning to it. I apologize for any wasted time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants