Recursively parsing JSON

后端 未结 4 1446
情歌与酒
情歌与酒 2021-01-03 07:51

I have a large JSON object that I created with Python, and I\'m needing to display the information on a webpage now. My problem is the size of it; there are nested arrays an

4条回答
  •  死守一世寂寞
    2021-01-03 08:11

    I can appreciate that you are trying to make your question more specific but there is simply not enough information.

    The json presented is extremely abstract, most of the keys infer little or no context to the meaning of the data, the structure is quite expansive making the effort to glean the meaning problematic.

    'Meaningful' is an ambiguous, relative and subjective term.

    Please try to condense and clarify your data exemplar and be more specific in how you would propose to present it and you will have more luck getting answers and guidance relevant to your requirements.

    Cheers


    this is my original answer to the question as originally stated

    Include https://github.com/douglascrockford/JSON-js/blob/master/json2.js in your page. If the browser does not have native JSON, it will fill in.

    then

    var myobj = JSON.parse(myjsonstring);
    

    rolling your own is just a silly thing to do.

    Good luck.

提交回复
热议问题