Loading...
Logo
Processing Forum

how to open a file in Processing?

in General Discussion  •  Other  •  2 months ago  

im trying to open a JSON file and using data in JSON format

but I dont know how I open the file in Processing

plz help

Replies(5)

See: File > Examples > Topics > Advanced Data > LoadSaveJSON

Or: http://processing.org/reference/loadJSONObject_.html

Thanks

however, now im using Processing 1.5.1.. how can I use this in Processing 1.5.1? 

You can't. The full data api including JSON support was added with the 2.0 release.

If you are using 1.5.1 then you have to download a contributed library and use that instead.

There are several of these, see Google and the forum.
Thak you very much!!!
If you want something really quick and simple then  http://www.mkyong.com/java/json-simple-example-read-and-write-json/   may help you. 

Later you may want to use org.json , but I think that processing implementation of org.json is a bit different from original so you may need few changes.