Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
hrjet
· 12y ago · 0 comments
IIRC, JSON is a strict subset of JS
and Python
.
Comments
[–]
adambard
12y ago
I have never heard anyone else make this assertion.
[–]
mcv
12y ago
The Python is new to me, but JSON's strong relationship to javascript is not new at all:
http://en.wikipedia.org/wiki/JSON
[–]
pnachbaur
12y ago
JSON originated from Javascript alone
[–]
riffraff
12y ago
is it? "null" is not valid python, I think
[–]
wisty
12y ago
If you do this first:
null = None Infinity = float('Infinity') NaN = float('nan')
(But no, it's not quite Python)
[–]
mercurial
12y ago
It isn't. It would be
None
. I believe parent is mistaken.
[–]
hrjet
OP
12y ago
I stand corrected; I am not that familiar with python. Though I remember reading somewhere that JSON can be
eval
ed in both JS and Python. Perhaps the python bit is not true.
[–]
kibibu
12y ago
JSON looks more-or-less like a Python dict, but you still wouldn't be able to parse {"x": NaN} or {"x": Infinity}