Learn Courses My Dashboard

Validating json issue

Hey all

I am trying to get my own take on the recipe app. I have my personal recipes on post it notes and looking to change that :rofl:

I set it as a string. I don’t think I am missing anything but of course I could be wrong

I am running into an issue with the validator and not sure what exactly is the issue.

Look at the ending quote marks on several lines, like 12 and 13 but also on others. Those are so-called “smart quotes” and JSON does not like them. Change them to the kind of quote marks seen on the other lines.

Also, in the future, please post your code as text, not a screenshot. When posting code to these forums, place three backticks ``` on the line before your code and three backticks ``` on the line after your code so that it will be formatted properly. You can also highlight an entire code block and click the </> button on the toolbar to wrap the block for you.

This makes it far easier to read and also makes it easier for other posters to copy/paste the code in order to test solutions and such.

Doing this will ensure that your code is properly formatted, including the distinction in quote marks:

"straight quotes"

“smart quotes”
2 Likes