简体   繁体   中英

Getting "Parse Error" on JSON code - At a Loss How To Fix

Error Message From JSON Checker:

Parse error on line 1: < script type = "app ^ Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got 'undefined'

My code on line 1:

< script type = "application/ld+json" > {

I'm no coder or programmer, just trying to dress up my website with some JSON enhancements and can't seem to find out what's wrong with line 1. Can anybody help?

I've looked all over the web for an answer and my code on line 1 appears to be correct.

I don't know what's wrong...

Is JSON Checker an external JSON Validator? To use it just try to validate what is inside of the script HTML element because that is the JSON. For example:

<script type = "application/ld+json">
{"Hello":"World"}
</script>

In this case you have to validate:

{ "Hello":"World" }

I hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM