I just use the Regular Expression, which my friend give me: function checkJsonFormat(text){ return !(/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(text.replace(/"(\ \.|[^"\\])*"/g, ''))); }
Well, I can't clear it very much! And it's only allowed double quotes " but I wanne use single quote ' sometimes in some case. So any boy can provide the usefull toolkit or idea to check the form of JSON? Really Appreciate. Mead Lai