Skip navigation
Currently Being Moderated

DeserializeJSON - is there a limit on the size of the JSON data that can be converted?

Feb 21, 2014 9:25 AM

Tags: #json #deserializejson

I have some valid JSON data that's being converted successfully by DeserializeJSON... until it gets to a certain size, or that's certainly what appears to be happening.  The breaking point seems to be somewhere in the neighborhood of 35,000 characters... about 35KB.  When the conversion fails, it fails with a "JSON parsing failure: Unexpected end of JSON string" message.  And when the conversion fails, the JSON data is deemed to be valid per tools like this one:  http://www.freeformatter.com/json-validator.html.

 

So, is there a limit on the size of the JSON data that can be converted by DeserializeJSON?

 

Thanks!

 
Replies
  • Currently Being Moderated
    Feb 21, 2014 10:33 AM   in reply to redherring917

    Is it possible that the POST size exceeds what is set in the "Maximum size of post data" setting in CFAdmin (not likely as I think it defaults to 20MB or something like that)?  Is the JSON being submitted using POST or GET (GET uses URL parameters and there is a limit to how big a GET request can be)? Or maybe the web server (IIS or Apache) is truncating the data?

     

    Have you checked the JSON being transmitted via Developer Tools or a tool like FIddle or Charles?  Is it being truncated before it even gets to ColdFusion?

     

    -Carl V.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 21, 2014 11:53 AM   in reply to redherring917

    Glad you got that sorted.  CLOB issues eventually bite most of us at some point.

    -Carl V.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 22, 2014 2:20 AM   in reply to redherring917

    @Redherring917

    What a rare finding: a practical application of one of the esoteric settings. Please kindly mark your response as the correct answer. It will surely help someone else in future.

     

    @Carl Von Stetten

    Say what! CLOB issues eventually byte most of us at some point!

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 24, 2014 8:42 AM   in reply to BKBK

    @BKBK,

     

    I see what you did there.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points