Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Having to provide a complete schema of your json everywhere your json gets parsed negates the advantages of json.


The main advantage of json is that it’s human readable and writable. Beyond that, it has no notion of user created data types so anyone using it has to do custom unmarshalling to get a type apart from sting, number, dict and list.


Even if you don't explicitly provide a schema, you implicitly still have one. The recipient needs to know what you're sending them. Unless maybe you want to start parsing JSON payloads with an LLM.


Most JSON libraries in typed languages require this for data binding to complex types though.


Which is why many developers only use JavaScript Object Notation for JavaScript objects, and only JavaScript objects that can losslessly be written as JSON. Which this proposal explicitly does not support.


{"$temporal_type":"PlainYearMonth","$data":"........"}




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: