Is there a commonly-used library that has classes for representing json in a type-safe way? I'm looking for one where json objects are stored in a Map and json arrays are in a List.
What I want to do is something like this:
myJson.get("myInt").asInt();
myJson.get("myString").asString();
.get() should return a missing node object so null checks aren't required.
Jackson is a really nice library that does all of this, but the Jackson JsonObject and JsonArray classes do not implement Map and List.