404error
404error

Reputation: 575

How to fix JSON validation errors

I'm having problems figuring out what is wrong with my json. I used php's json_encode.

I created an associative array containing data I pulled from my local chamber of commerce but when I run it through a json validator I keep getting errors.

I'm not sure if unescaped characters are causing this.

http://codebeautify.org/jsonviewer/cc805d

Any help would be appreciated.

Upvotes: 0

Views: 73

Answers (1)

xiumeteo
xiumeteo

Reputation: 961

here is your error: On line 5615 you have the following data

"Central Coast Music Academy is a community-based, non-profit organization dedicated to providing music education to students, ages 6-14. Our mission is to instill an appreciation and enthusiasm for music, help children reap the rewards of music, and support and enrich the existing music programs in the Central Coast area. Central Coast Music Academy was formed to ensure the continuation of a high quality music education program in response to the budget challenges facing our public/private schools. Formal music instruction helps students in many ways: ? Develops skills required to succeed in the 21st century workforce, including critical thinking, creative problem solving, effective communication and team work ? Keeps students engaged and less likely to drop out of high school ? Improves the atmosphere for learning math, science, reading and other subjects ? Promotes shared ideas and community values across cultures and generations ? Establishes a disciplined human endeavor with intrinsic value to society CCMA is offering a music camp, which will be a fun and affordable way to start or to continue learning music during the summer. CCMA camp is open to beginning students and students who have already played for 2 or 3 years in orchestra. (strings) We are also launching an exciting new program called " Passport to Music " which is a fantastic music readiness class for students 6-8. Students will have the opportunity to work with outstanding music educators as they enjoy making music with students from throughout the area.",

and as you can see you have this statement inside that paragraph:

" Passport to Music "

which is breaking your json, so basically you need to scape that, or instead use simple quotes.

Have a nice day!

Upvotes: 1

Related Questions