0

I have a problem with fasterxml Jackson where it ignores everything after the object like:

{
   "startIndex": 0,
   "length": 10,
   "gotoLastPage": false
}
whatever comes here is ignored

I don't know if is possible to throw an error in this case. If the unexpected message is at the beginning it fails as I want. The configuration property DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES is set to true.

Franjavi
  • 647
  • 4
  • 14
  • 1
    Is it possible to get a complete `JSON`? What you provided so far is simply a `syntax error`. Curly braces mark an object. Everything which is outside does not belong to the object. http://json.org/ – Thomas Junk Jul 25 '14 at 10:57
  • It's a really simple body, seems that fasterxml is not checking if is something left after the object. – Franjavi Jul 25 '14 at 12:31

2 Answers2

0

Remove comma "," after the line ' "gotoLastPage": false,'

Stanislav
  • 9
  • 2
0

As I see. The parser itself works very simple. The object is between first "{" and "}", all, what is outside is ignored. Because it is not he object scope any more. Otherwise you need to have a list of the objects, and the list itself is the object.

Stanislav
  • 9
  • 2