Gson serializes {"test": "abc\ndef"} to {"test": "abc\ndef"}. According to this discussion, and my understanding of JSON standard, it is not a valid JSON. It needs to be {"test": "abc\\ndef"}. I.e the "\n" needs to be converted to \\n. 
Is my understanding correct?
 
    