Got a YouTube account?

New: enable viewer-created translations and captions on your YouTube channel!

English feliratok

← Validating JSON - JavaScript Basics

Beágyazókód kérése
5 Languages

Showing Revision 3 created 05/25/2016 by Udacity Robot.

  1. So, I've opened up
    which will tell us whether or
  2. not this JSON is in the right format.
  3. Go ahead and copy this object
    in just using the curly braces.
  4. I don't need to copy var education.
  5. Paste it in and click Validate.
  6. And scrolling down we can see that
    this is, in face, a valid JSON.
  7. >> What if there were errors?
  8. Like what if we erase this comma,
    right here?
  9. >> Well, JSONLint would tell us where
    the error is, which is a big help.
  10. Let's see, I'll come over here, I'll
    delete this comma, and click Validate.
  11. And we can see that there's an error
    on Line 11 because we forgot the comma
  12. that comes before it.
  13. The good news is that text editors like
    Sublime Text also highlight errors and
  14. help us figure out where
    our syntax went wrong.