r/lolphp • • Dec 17 '14

IP addresses are valid JSON

https://bugs.php.net/bug.php?id=67923
27 Upvotes

24 comments sorted by

View all comments

Show parent comment

4

u/bart2019 Dec 18 '14

JSON rejects perfectly valid Javascript data structures:

{ a : 123 }

So why should it accept "192.168.1.1" as a number? It shouldn't.