How to write JSON using Javascript

Go To StackoverFlow.com

-1

I have two text box T1 and T2. I need to save that two values as json in separate file using java script. my target is to write values in separate file and have to retrieve later. please guide me how to write json in separate file..thanks in advance.

2012-04-04 05:47
by ganesh
what have you tried?Joseph 2012-04-04 05:49
What do you mean "in separate file"? You want to transmit the JSON to your web server and have server-side code write it to a file? (JS in the browser can't access the local file system. - nnnnnn 2012-04-04 06:22


1

I think this is what you are looking for: https://github.com/douglascrockford/JSON-js

View its readme file here: https://github.com/douglascrockford/JSON-js/blob/master/README

2012-04-04 05:55
by mim
To be more direct, https://raw.github.com/douglascrockford/JSON-js/master/json2.js is what you wan - ThiefMaster 2012-04-04 06:25
Ads