Json Reader
Reads a JSON RFC 7159 encoded value as a stream of tokens.
This stream includes both literal values (strings, numbers, booleans, and nulls) as well as the begin and end delimiters of objects and arrays.
The tokens are traversed in depth-first order, the same order that they appear in the JSON document. Within JSON objects, name/value pairs are represented by a single token.
Each {@code JsonReader} may be used to read a single JSON stream. Instances of this class are not thread safe.
Json doesn't have int, long, double values. Only string and number. That means nextInt(), nextDouble(), nextLong() and nextNumber() will coerce the Json value into the expected type or throw if the conversion is not possible or loses precision.
BufferedSourceJsonReader can parse longs without having to buffer so when possible, prefer nextLong() over nextInt()
Note: This interface was originally from Moshi and has been tweaked to better match the GraphQL use cases