4 ms·
Having to provide a complete schema of your json everywhere your json gets parsed negates the advantages of json.
by Bratmon 7mo ago
Having to provide a complete schema of your json everywhere your json gets parsed negates the advantages of json.
- true_religion 7mo agoThe 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.
- hueho 7mo agoMost JSON libraries in typed languages require this for data binding to complex types though.
- Bratmon 7mo agoWhich 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.
- afiori 7mo ago{"$temporal_type":"PlainYearMonth","$data":"........"}
- hdjrudni 7mo agoEven 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.