3 ms·
> It's very difficult to deserialize in serialize things like yaml and json in CL because it doesn't have a distinct false object. Its not particularly hard to
by dragonwriter 4y ago
> It's very difficult to deserialize in serialize things like yaml and json in CL because it doesn't have a distinct false object.
Its not particularly hard to represent JSON’s type system in CL and deserialize JSON to CL objects.
Its also not particularly hard to construct and use a model of CL data in JSON from CL. (Its even easier with YAML.)
OTOH, yes, JSONs data model is almost exactly JS’s data model (minus anything callable, which js a lot of JS, and with a slightly different model of numbers, but anything that doesn’t exactly match JS’s model is canonically unreliable and so discouraged), So with any thing other than JS using JSON, you have to determine if your use case is modeling your language’s data in JSON or JSON’s data model in your language, while with a particular subset of JS you can just ignore the distinction.