Serialize / deserialize (to JSON)
Hi, I wonder if it is possible to serialize / deserialize Mojo objects to / from JSON, either through metaprogramming, or through some Python bindings.
Thanks.
5 Replies
Mojo has a plan for metaprogramming, but it's still work in progress. Python has no visibility into Mojo types because no type information makes it to runtime since Mojo is a compiled language. EmberJSON is an option, but that requires you to wire up the "to_json" and "from_json" yourself.
Thanks for your answer.
right click -> Apps -> Mark Solution in the future.
I can mark it since I'm a mod, most people can't mark other people's questions.
https://github.com/furnace-dev/sonic-mojo
check this
GitHub
GitHub - furnace-dev/sonic-mojo: A high-performance JSON processing...
A high-performance JSON processing library for the Mojo programming language, providing bindings for the Sonic-RS library and leveraging SIMD for fast JSON parsing and manipulation. - furnace-dev/s...