readTree method

JsonNode readTree(
  1. String json
)

Returns the JSON text json as a tree of JsonNodes, to read parts of a document without a class (Jackson's readTree). Throws a JsonMappingException for text that is not JSON.

mapper.readTree('{"a":[1,2]}').at('/a/1').intValue(); // 2

Implementation

JsonNode readTree(String json) => JsonNode.from(_decode(json));