mathiasbynens / small

Smallest possible syntactically valid files of different types
https://mathiasbynens.be/notes/minimal-html
1.93k stars 184 forks source link

Adding smallest possible JSON(-P). #23

Closed Zegnat closed 12 years ago

Zegnat commented 12 years ago

This adds two files as discussed in issue #22:

  1. Smallest JSON syntax according to RFC 4627, passes two separate JSON validators. I choose to go with an empty array rather than an empty object.
  2. Smallest JSON-P according to the semi-official website:

    The intention is that only a single expression (function reference, or object property function reference) can be used for the function ("padding") reference of the JSON-P response, and must be immediately followed by a single ( ) enclosing pair, inside of which must be a strictly valid and parseable JSON object. The function call may optionally be followed by one ; semi-colon.

    It also passes their validation.

mathiasbynens commented 12 years ago

Merged, thanks!