title: Is there a limit of data that can be parsed in Json?
body: <p>I'm getting a parse error when one of the fields in the json document has too many characters (tested it with more than 16K characters).
  If I remove the data in that field everything works perfectly.</p>
  
  <p>My code performs a GET to an endpoint that returns a JSON document with an array of objects. If one of the objects (let's say the number 119 in the array) has too many characters in one of the fields (that happens to be html code) I get the following exception:</p>
  
  <pre><code>Could not read document: Connection reset (through reference chain: Object[][119]); nested exception is com.fasterxml.jackson.databind.JsonMappingException: Connection reset (through reference chain: Object[][119])
  </code></pre>
  
  <p>As I said, removing the content of that field or making it a normal-size string makes it work. I don't believe there's a connection reset error since doing requests to other endpoints (with no so large fields) work fine.</p>
  
  <p>I use Spring's REST Template, and I tried replacing the Jackson mapper with Gson's but I get the exact same behavior with a slightly different error message (Gson's doesn't specify the element of the array).
  To be more specific, I replaced this:</p>
  
  <pre><code>List&lt;HttpMessageConverter&lt;?&gt;&gt; messageConverters = new ArrayList&lt;HttpMessageConverter&lt;?&gt;&gt;();
      messageConverters.add(new MappingJackson2HttpMessageConverter());        
      this.restTemplate.setMessageConverters(messageConverters);
  </code></pre>
  
  <p>with this:</p>
  
  <pre><code>List&lt;HttpMessageConverter&lt;?&gt;&gt; messageConverters = new ArrayList&lt;HttpMessageConverter&lt;?&gt;&gt;();
          GsonHttpMessageConverter converter = new GsonHttpMessageConverter();
          messageConverters.add(converter);
          this.restTemplate.setMessageConverters(messageConverters);
  </code></pre>
  
  <p>So, is there a limit of data/characters that a field in JSON can store and be parsed? if that's the case, how can I configure that limit?
  Is there another way to accomplish this without been limited?</p>
  
  <hr>
  
  <p>This is an example of the request:</p>
  
  <pre><code>http://api.myServer.com:8080/api/v1/categories
  GET
  Headers: 
  Content-Type: application/json
  Authorization: Basic xxxxxxxxx
  </code></pre>
  
  <p>This is an example of the response:</p>
  
  <pre><code>[
  {
      "category_id": "C1",
      "name": "Category 1",
      "short_name": "Cat 1",
      "description": "Description of the category"
  
  },
  {
      "category_id": "C2",
      "name": "Category 2",
      "short_name": "Cat 2",
      "description": "very long string, usually well-formed HTML"
  
  },
  .
  .
  .
  .
  ]
  </code></pre>
  
  <p>I stored the JSON doc I got as response (using Postman) into a text file and its size is 2.29 MB.</p>