1

In Scala 2.11 I am using the Play JSON API and when the line executes it throws an error.

val bodyParsed = Json.parse(bodyText.replaceAll("\\\\", ""))

That is because the length of bodyText is greater than 2^16 - 1.

How can I fix the problem?

I came across this post but I'm not sure whether it's the solution in my case.

stefanobaghino
  • 9,460
  • 3
  • 33
  • 57
oortcloud_domicile
  • 808
  • 5
  • 21
  • 40

1 Answers1

1

Sorry this has nothing to do with the size of the string. I was able to capture my error in to a variable and see. it looks like the string i am getting is not JSON compliant and was throwing an error.

oortcloud_domicile
  • 808
  • 5
  • 21
  • 40