Org.json.JSONException: Unterminated string at character <p>I am getting the error when creating a JSONObject by passing a string.</p> <pre><code>Org.json.JSONException: Unterminated string at character </code></pre> <p>My JSON string is:</p> <pre><code>{"Count":741,"Data":[{rec1....},{rec2...}, etc]} </code></pre> <p>This seems to only happen on Linux as I developed in Windows and it worked fine. Also, the issue seems to stem from the string being too long. I cut the array by more than half and the issue went away.</p> <p>What can I do to fix this issue or if there is a workaround? </p>