locked
Parsing large data using json.parse

    Question

  • Hello,

    I am creating a windows 8 application using html and javascript. I have a large data that is being downloaded from web service. The response is a string in json format. size of data when stored in a notepad is around 25MB. When i am calling JSON.parse(string), i am getting "Invalid Character" error. Looks like the parse function is unable to parse large data. I tried validating the json string in http://jsonlint.com, i got the same error. This is because the json string is truncated after some limit.

    Is there any way through which i can resolve this issue. I need to hold complete data in 1 json object. Is there any work around to parse large chunk of string into json object?

    Tuesday, March 5, 2013 11:13 AM

Answers

  • Hi Raghavendra_RT,

    How exactly are you acquiring the string? It sounds like that is where it is being truncated so you'll need to narrow down if the limit is placed by the client or the server and change that end of things.

    --Rob

    • Marked as answer by Song Tian Monday, March 11, 2013 10:01 AM
    Wednesday, March 6, 2013 12:34 AM
    Owner