dd4t / dd4t-2-java

10 stars 21 forks source link

Provide trace information when JSON has some invalid characters #124

Closed NIkonDSL closed 2 years ago

NIkonDSL commented 3 years ago
2021-01-21 12:08:17,709 ERROR [http-nio2-8099-exec-1] JsonDataBinder - Error deserializing.
com.fasterxml.jackson.core.JsonParseException: Illegal character ((CTRL-CHAR, code 0)): only regular white space (\r, \n, \t) is allowed between tokens
 at [Source: (String)"  "; line: 1, column: 2]
    at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1840)
    at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:712)
    at com.fasterxml.jackson.core.base.ParserMinimalBase._throwInvalidSpace(ParserMinimalBase.java:690)
    at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._skipWSOrEnd(ReaderBasedJsonParser.java:2372)
    at com.fasterxml.jackson.core.json.ReaderBasedJsonParser.nextToken(ReaderBasedJsonParser.java:671)
    at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:4356)
    at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4205)
    at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3214)
    at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3182)
    at org.dd4t.databind.builder.json.JsonDataBinder.buildComponentPresentation(JsonDataBinder.java:98)
    at com.sdl.delivery.dxa.modelservice.service.parser.ModelParser.parseDd4tContent(ModelParser.java:70)