Escaping index requests for REST API from Java

Hi, I'm trying to escape my document index PUT requests in Java, and having a hell of a time. Things I've tried:

Apache commons-lang EscapeUtils.escapeJavascript
Lucene QueryParser.escape

Neither of these work, the first escapes " ' " to " ' " and Elasticsearch is not happy, while the second does not escape new lines. I'm not very interested in a JSON library because its massive overkill, I'm only making one or two very particular type of query ever over the course of my application.

Please, help.

The latest version of Apache commons-lang3 (3.4) has escapeJson which worked

Hi,
did you solve the problem after all?

If not, I think it would help if you posted what your requests look like and what you already tried.

Cheers
Luca