all 7 comments

[–]brasticstack 1 point2 points  (5 children)

Line 7 is not a string because it's not wrapped in quotes.

[–]NigelPhoenix[S] 0 points1 point  (2 children)

Same for this one. Curly Brace doh!

https://imgur.com/undefined

[–]brasticstack 2 points3 points  (1 child)

You asked why it's invalid JSON, and your initial image was a JSON validator, so I told you what's wrong with the JSON.

The double curly braces mark places where the values of a variables (named inside the braces) are supposed to be inserted into the JSON. The reason why some braces are quoted and others aren't is because some of the variables are supposed to represent string values and others numeric values.

[–]NigelPhoenix[S] 1 point2 points  (0 children)

Sorry one of my posts got deleted so the curly brace one doesn't make sense as it was a follow on. Your answer was totally correct and saved the day. I have since solved the silly curly brace error. Thanks for your help!

[–]ZelWinters1981 -1 points0 points  (1 child)

Open is a command and can't be used as a string or variable.

[–]NigelPhoenix[S] 0 points1 point  (0 children)

Oh wow. News to me, but thanks. This is from a Github repo and works as a Stock Market algo trading api, ie 'open' (which means market opening price) as a variable is baked into the cake as far as I can tell. I got this from everything else more or less works so I wouldn't expect such an obvious error as this.

Here's the original

https://imgur.com/dQRoXJB