Latest commit to the master branch

For Kyle

commit 40f3377a63
douglascrockford authored August 19, 2012

| name | age | history message
--- | --- | --- | ---
| README |  | Loading commit data...
| cycle.js |  |
| json.js |  |
| json2.js |  |
| json_parse.js |  |
| json_parse_state.js |  |

README

    JSON in JavaScript

    Douglas Crockford
    douglas@crockford.com

    2010-11-18

    JSON is a light-weight, language independent, data interchange format.
    See http://www.JSON.org/

    The files in this collection implement JSON encoders/decoders in JavaScript.

    JSON became a built-in feature of JavaScript when the ECMAScript Programming
    Language Standard - Fifth Edition was adopted by the ECMA General Assembly
    in December 2009. Most of the files in this collection are for applications
    that are expected to run in obsolete web browsers. For most purposes, json2.js
    is the best choice.

    json2.js: This file creates a JSON property in the global object, if there
    isn't already one, setting its value to an object containing a stringify
    method and a parse method. The parse method uses the eval method to do the
    parsing, guarding it with several regular expressions to defend against
    accidental code execution hazards. On current browsers, this file does nothing,
    prefering the built-in JSON object.

    json.js: This file does everything that json2.js does. It also adds a
    toJSONString method and a parseJSON method to Object.prototype. Use of this
    file is not recommended.

    json_parse.js: This file contains an alternative JSON parse function that
    uses recursive descent instead of eval.

    json_parse_state.js: This files contains an alternative JSON parse function that
    uses a state machine instead of eval.

    cycle.js: This file contains two functions, JSON.decycle and JSON.retrocycle,
    which make it possible to encode cyclical structures and dags in JSON, and to
    then recover them. JSONPath is used to represent the links.
    http://GOESSNER.net/articles/JsonPath/

## Keyboard Shortcuts (see all)

### Site wide shortcuts

s
  Focus site search

?
  Bring up this help dialog

### Commit list

j
  Move selection down

k
  Move selection up

c or o or enter
  Open commit

y
  Expand URL to its canonical form

### Pull request list

j
  Move selection down

k
  Move selection up

o or enter
  Open issue

⌘ctrl + enter
  Submit comment

⌘ctrl + shift p
  Preview comment

### Issues

j
  Move selection down

k
  Move selection up

x
  Toggle selection

o or enter
  Open issue

⌘ctrl + enter
  Submit comment

⌘ctrl + shift p
  Preview comment

c
  Create issue

l
  Create label

i
  Back to inbox

u
  Back to issues

/
  Focus issues search

### Issues Dashboard

j
  Move selection down

k
  Move selection up

o or enter
  Open issue

### Network Graph

← or h
  Scroll left

→ or l
  Scroll right

↑ or k
  Scroll up

↓ or j
  Scroll down

t
  Toggle visibility of head labels

shift ← or shift h
  Scroll all the way left

shift → or shift l
  Scroll all the way right

shift ↑ or shift k
  Scroll all the way up

shift ↓ or shift j
  Scroll all the way down

### Source Code Browsing

t
  Activates the file finder

l
  Jump to line

w
  Switch branch/tag

y
  Expand URL to its canonical form

### Browsing Commits

⌘ctrl + enter
  Submit comment

escape
  Close form

p
  Parent commit

o
  Other parent commit

### Notifications

j
  Move selection down

k
  Move selection up

o or enter
  Open notification

e or shift i or y
  Mark as read

shift m
  Mute thread

## Markdown Cheat Sheet

### Format Text

Headers

    # This is an <h1> tag
    ## This is an <h2> tag
    ###### This is an <h6> tag

Text styles

    *This text will be italic*
    _This will also be italic_
    **This text will be bold**
    __This will also be bold__

    *You **can** combine them*

### Lists

Unordered

    * Item 1
    * Item 2
      * Item 2a
      * Item 2b

Ordered

    1. Item 1
    2. Item 2
    3. Item 3
       * Item 3a
       * Item 3b

### Miscellaneous

Images

    ![GitHub Logo](/images/logo.png)
    Format: ![Alt Text](url)

Links

    http://github.com - automatic!
    [GitHub](http://github.com)

Blockquotes

    As Kanye West said:

    > We're living the future so
    > the present is our past.

### Code Examples in Markdown

Syntax highlighting with GFM

    ```javascript
    function fancyAlert(arg) {
      if(arg) {
        $.facebox({div:'#foo'})
      }
    }
    ```

Or, indent your code 4 spaces

    Here is a Python code example
    without syntax highlighting:

        def foo:
          if not bar:
            return true

Inline code for comments

    I think you should use an
    `<addr>` element here instead.

Something went wrong with that request. Please try again.

## Looking for the GitHub logo?

- #### GitHub Logo

  Download

- #### The Octocat

  Download