I’m working on an edge upsert which has an attribute with a BOOL datatype but am having trouble passing in the BOOL value.
Here’s my Json:
The error I get for this is:
“Processing attribute isChosen failed, value cannot be converted to BOOL”
When I converted the “True” to “true” I got the same error.
When I remove the quotes around the “true” I have invalid Json:
“JSON parse error: Invalid value. Error offset: 175”
Can someone please advise how do I correct this?
Thank you.
Hi George,
In theory, true
(all lowercase, not enclosed) should work. This worked for me:
{"vertices": {"MyVertex": {"100": {"MyBooleanAttr": {"value": true}}}}}
See JSON.org for the specification of the literals accepted.
As for why you get “JSON parse error: Invalid value. Error offset: 175”, I am not sure. Your JSON example with true
is valid (validated using JSONLint). Are you trying this using your C# connector? Is the error message from the C# code or from TigerGraph?
Thanks. I tried to delete this but could not.
I found a line of code that was inadvertently wrapping [true] in double quotes. Once I fixed that line it began to work.