Stringify() Convert to JSON? Read JSON?

Does Motoko have a way to trade JSON data (MON?). Any plans for it?

MON, that Motoko Object Notation. :slightly_smiling_face:


I wish the agent could speak json in debug mode…maybe even with just my local replica. It would make debugging so much easier. Alternatively a cbor plugin similar to reacttools that let you’d read the structure of returned messages would be a dream.

The more adequate format on the IC would be the textual Candid representation, since JSON is much too inexpressive to reflect Motoko data properly (and is generally a poor format).

But I suppose it depends on your use case. Who would you want to trade it with?

Of course, a JSON parser/printer should be doable as a third-party library. :wink:

I would want to trade with banks, real-estate companies, insurance companies, grocery and electronics stores, shoe stores, pharmacies. You know, the real world, where fast is fast enough, and they don’t know a giga-byte from reference variable. They just want to know who bought what, when, where did it go, who has touched it, and they want to have confidence that no one messed with this data.