0
{
    "name":"tarun",
    "Address":"abcdef

                    ghijkl"
}

I have extracted the payload from request body and trying to validate it using Mapper object. But it is throwing jsonparseexception.

MD Ruhul Amin
  • 4,386
  • 1
  • 22
  • 37
Tarun Singh
  • 97
  • 2
  • 10
  • Your problem might come from the fact that "literal line feeds and newlines are control characters that are not allowed within a JSON string (https://stackoverflow.com/questions/33566169/are-line-feeds-allowed-in-json-strings)". You might have to escape them. – lugiorgi Feb 26 '20 at 11:49

1 Answers1

0

The issue is resolved.I have removed the line using string replace method from the string JSON and then passed it to mapper object.

Tarun Singh
  • 97
  • 2
  • 10