Corrected JSON code (js.rst)

Now this code in the docs can be pasted and works.