r/code • • Dec 13 '21

I need help with JSON code

So I was try to do some JSON code and I got an error message and now I’m kinda stuck what should I do

1 Upvotes

11 comments sorted by

View all comments

3

u/spliffen Dec 13 '21

using https://jsonlint.com/, it shows that you have a random p in there, try it out, see if it makes sense

1

u/[deleted] Dec 13 '21

Ok I did it and this showed up also I’m not a good coder but this showed up

Error: Parse error on line 90: ... "red": 0.96, p "green": 0.98, ----------------------^ Expecting 'STRING', got 'undefined'

1

u/spliffen Dec 13 '21

look at the line thats highlighted, the line directly after is: p "green": 0.98,

im very much guessing that it should be: "green": 0.98,

*edit a bit tired atm, didnt see you got it :)

1

u/[deleted] Dec 13 '21

I was I got it all down but thanks

0

u/[deleted] Dec 13 '21

Nvm I got it thanks so much