JsonDataException
Thrown when the data in a JSON document doesn't match the data expected by the caller.
For example, suppose the application expects a boolean but the JSON document contains a string. When the call to JsonReader.nextBoolean is made, a JsonDataException
is thrown.
Exceptions of this type should be fixed by either changing the application code to accept the unexpected JSON, or by changing the JSON to conform to the application's expectations.