You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This in turn entails that the return value is not handled properly in CosmosDb,
exemplified by the following exception on the sample program:
Unhandled Exception: Newtonsoft.Json.JsonReaderException: Error reading JObject from JsonReader. Current JsonReader item is not an object: StartArray. Path ''.
at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings)
at Gremlin.Net.CosmosDb.Serialization.IEdgeJsonConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer) in /home/veeg/workspace/Gremlin.Net.CosmosDb/src/Gremlin.Net.CosmosDb/Serialization/IEdgeJsonConverter.cs:line 48
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.Linq.JToken.ToObject(Type objectType, JsonSerializer jsonSerializer)
at Newtonsoft.Json.Linq.JToken.ToObject[T](JsonSerializer jsonSerializer)
at Gremlin.Net.CosmosDb.Structure.GraphResult`1.<>c__DisplayClass3_0.<.ctor>b__0(JToken token) in /home/veeg/workspace/Gremlin.Net.CosmosDb/src/Gremlin.Net.CosmosDb/Structure/GraphResult.cs:line 91
at System.Linq.Enumerable.SelectEnumerableIterator`2.ToList()
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Gremlin.Net.CosmosDb.Structure.GraphResult`1..ctor(ResultSet`1 resultSet, JsonSerializer serializer) in /home/veeg/workspace/Gremlin.Net.CosmosDb/src/Gremlin.Net.CosmosDb/Structure/GraphResult.cs:line 91
at Gremlin.Net.CosmosDb.Structure.GraphResult.ApplyType[T](JsonSerializer serializer) in /home/veeg/workspace/Gremlin.Net.CosmosDb/src/Gremlin.Net.CosmosDb/Structure/GraphResult.cs:line 63
at Gremlin.Net.CosmosDb.IGraphClientExensions.QueryAsync[T](IGraphClient graphClient, String gremlinQuery, JsonSerializerSettings serializerSettings) in /home/veeg/workspace/Gremlin.Net.CosmosDb/src/Gremlin.Net.CosmosDb/IGraphClient.Extensions.cs:line 153
at GremlinSample.Program.Main() in /home/veeg/workspace/Gremlin.Net.CosmosDb/GremlinSample/Program.cs:line 42
at GremlinSample.Program.<Main>()
To summarize what has changed: The JSON returned is now wrapped in an Array, not an Object. This crashes the program.
The text was updated successfully, but these errors were encountered:
veeg
pushed a commit
to veeg/Gremlin.Net.CosmosDb
that referenced
this issue
Mar 28, 2019
Hello.
In PR #44, the upstream dependency of Gremlin.Net was updated from 3.4.0-rc2 to 3.4.0.
This release includes TINKERPOP-3067 which changes the returned object from
SubmitAsync
when the requested return type isJToken
. This means that the returned value in not fed through the following GraphSON reader method: https://github.com/apache/tinkerpop/blob/e238880f87bf8366310fdf006d2869c86a2957af/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONReader.cs#L102-L117CosmosDb will issue such a request:
Gremlin.Net.CosmosDb/src/Gremlin.Net.CosmosDb/GraphClient.cs
Lines 68 to 76 in 94e1fe8
This in turn entails that the return value is not handled properly in CosmosDb,
exemplified by the following exception on the sample program:
To summarize what has changed: The JSON returned is now wrapped in an Array, not an Object. This crashes the program.
The text was updated successfully, but these errors were encountered: