JSON Is Lying to You

(blog.gaborkoos.com)

2 points | by fagnerbrack 7 hours ago ago

4 comments

  • Kushvinth 6 hours ago ago

    A wire format is a contract, not a mirror of your runtime

  • hans_castorp 7 hours ago ago

    That's not JSON "lying", it's JavaScript not signalling a problem if it can't map a value.

    • Kushvinth 6 hours ago ago

      Exactly; the problem is the with the way that js represents without preserving their original format/sematic.

      • hans_castorp 6 hours ago ago

        What I wanted to say: I think the headline is wrong.

        It's not "JSON lying", it's JavaScript not being able to properly map all data types to JSON.