Dumb question, I'm sure: I am working to learn/understand JSON better and FM's features for handling it. In my data viewer I have this text as my input using an example JSON string I borrowed from the internet:
Let (
$JSON = "{\"name\":\”John\”,\"age\":30,\"cars\":[\”Ford\”,\”BMW\”,\”Fiat\”]}"
;
$JSON & "¶" &
JSONGetElement ( $JSON ; "name" )
)
As a result I am getting this:
{"name":”John”,"age":30,"cars":[”Ford”,”BMW”,”Fiat”]}
? * Line 1, Column 9
Syntax error: value, object or array expected.
What is the syntax error in the $JSON string and/or what else may be wrong?
Thanks in advance,
Ed
"borrowed from the internet" may be a clue. I got some curly quotes when I pasted your result into my text editor.
That may or may not be a typo, but copy/paste from sources such as a web site, may inadvertently introduce odd characters.
Just a thought.
Beverly