ModularM
Modular16mo ago
54 replies
eggsquad

EmberJson: High level JSON library

I've spent part of the last week on the beginnings of JSON library for Mojo. It's still very much under development so I haven't made any official releases, but if anyone would like to help add test cases or point out edge cases I've missed that would be greatly appreciated!
https://github.com/bgreni/EmberJson

A quick example of how it's used:
from ember_json import *

var s = '{"key": 123}'
var json = JSON.from_string(s)
print(json["key"].int()) # prints 123

json = JSON.from_string('[123, "foo"]')
print(json[1].string()) # prints foo
GitHub
Contribute to bgreni/EmberJson development by creating an account on GitHub.
GitHub - bgreni/EmberJson
Was this page helpful?