This can happen if you have a newline (or other control character) in a JSON string literal.
{"foo": "bar
baz"}
If you are the one producing the data, replace actual newlines with escaped ones "\\n"
when creating your string literals.
{"foo": "bar\nbaz"}
More Related Contents:
- JSON character encoding
- JSON Parsing to multiple TextView [duplicate]
- Simplest way to read JSON from a URL in Java
- Java 8 LocalDate Jackson format
- How do I use a custom Serializer with Jackson?
- Convert string to JSON array
- How to create correct JSONArray in Java using JSONObject
- JsonMappingException: No suitable constructor found for type [simple type, class ]: can not instantiate from JSON object
- SEVERE: MessageBodyWriter not found for media type=application/json, type=class com.jersey.jaxb.Todo, genericType=class com.jersey.jaxb.Todo
- Most efficient conversion of ResultSet to JSON?
- Jackson ObjectMapper – specify serialization order of object properties
- java.sql.SQLException: Incorrect string value: ‘\xF0\x9F\x91\xBD\xF0\x9F…’
- JSON – Iterate through JSONArray
- How do I parse JSON from a Java HTTPResponse?
- Deserialize Java 8 LocalDateTime with JacksonMapper
- How to check if a JSON key exists?
- java.net.SocketException: socket failed: EPERM (Operation not permitted)
- How to modify JsonNode in Java?
- Getting JSONObject from JSONArray [duplicate]
- How to convert RDF to pretty nested JSON using java rdf4j
- Jackson + Builder Pattern?
- JDBC character encoding
- In Spring MVC, how can I set the mime type header when using @ResponseBody
- Creating nested JSON object for the following structure in Java using JSONObject? [closed]
- Can we make object as key in map when using JSON?
- Jersey Exception : SEVERE: A message body reader for Java class
- Jackson conditional @JsonUnwrapped
- Parse JSON from HttpURLConnection object
- How to Update JSON value using Java
- Jackson ObjectMapper DeserializationConfig.Feature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT