AnsweredAssumed Answered

JSON syntax question

Question asked by edwardlscott on Nov 10, 2017
Latest reply on Nov 11, 2017 by user29424

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

Outcomes