Open flieks opened 2 years ago
Sorry, I'm not 100% clear what you're saying with this - Is it that it doesn't work without custom code, or you need to use custom code to get it to work? What version of neo, what version of the client, bolt/http?
Hi @cskardon I am using client version 4.1.21 Neo4j version 4.4.3 using bolt
So i am using this custom JsonConverter (found the code from your answer on stackoverflow and i altered it so thanks for this.
I want to have a dictionary<string, int> on my c# model object and transform it to properties on the Node.
So it goes inside WriteJson on c.ExecuteWithoutResultsAsync().Wait();
The code runs fine and then the JObject or JToken that is written with o.WriteTo(writer);
is this (the 2 props with TF_ are injected coming from the dictionary)
{{
"Id": "7d8823e6-1151-418d-908d-2f055e55f45d",
"DateCreated": "2022-05-16T14:38:39.1513725Z",
"DateUpdated": "2022-06-09T07:39:15.8640731Z",
"DataType": 2,
"Description": null,
"Active": true,
"Creator": null,
"TF_5": 60,
"TF_1": 600
}}
but that results in a Type mismatch for parameter 'variable': expected Map, Node or Relationship but was List<T> (line 2, column 9 (offset: 38)) "SET q = $variable" ^
thrown by the await tx.CommitAsync();
readJson() is working fine as that just to return the Object (typed) and i use JsonConvert.DeserializeObject as the serializer input par is null so no problem.
Hi,
I am getting an error when this cypher is executed which without a custom JsonConverter worked fine.
The error:
Type mismatch for parameter 'variable': expected Map, Node or Relationship but was List<T> (line 2, column 9 (offset: 38)) "SET q = $variable" ^
The writeJSON implementation that executes fine:
The TestProp property on class Variable: