JSON questions

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mike Kypriotis
    New Member
    • Mar 2011
    • 37

    JSON questions

    I need to some input data for my js file and consider using JSON.
    1)Is there a function which can check the syntax validity of the JSON and return TRUE/FALSE?
    2)I want ofcourse for json to work on both old and new browsers, got to http://json.org and saw various files, should I stay with json2.js and how to use it?

    P.S. The JSON will be edited and uploaded to the server by a trusted user so syntax errors by accident are more possible than a security breach

    Thanks for your time
    Mike
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    1) I’m not aware of any function but I suppose a try…catch block would do.

    Comment

    Working...