Skip to content

koher/JSONy

Repository files navigation

JSONy

JSONy is a JSON parser for Java, a wrapper of org.json, that has similar APIs to SwiftyJSON

JSON json = new JSON(jsonString);

JSON node = json.get("foo").get("bar").get(0); // `get` never fails
Integer value = node.getInt(); // null when the node does not exists or is not an integer
try {
    int value2 = node.getIntValue(); // fails when the node does not exist or is not an integer
} catch (FormatException e) {
    // Error handling
}

for (JSON child : json.get("baz").getList()) {
    // Use child
}

Dependencies

License

The MIT License

About

JSON parser for Java that has similar APIs to SwiftyJSON

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages