Skip to content

Commit f0f23f0

Browse files
author
Andreas Göransson
committed
Updated readme
1 parent 01b563f commit f0f23f0

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

README.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Since the beta release (8) of Processing 2.0 (February 24) JSON is part of the c
88

99
# Installation in Processing
1010

11-
1. Download the latest version [here](http://santiclaws.se/json4processing/json4processing-0.1.7.zip)
11+
1. Download the latest (0.1.8) version [here](http://santiclaws.se/json4processing/json4processing-0.1.8.zip)
1212
2. Extract the zip-file into your /sketchbook/libraries/ folder.
1313
3. Restart Processing IDE
1414

@@ -97,6 +97,29 @@ arr.append(third);
9797
println(arr);
9898
```
9999

100+
**Parson JSON from websource**
101+
102+
``` java
103+
/**
104+
* Creating a JSON array of objects
105+
*/
106+
JSON first = JSON.createObject();
107+
first.setInt("val", 5);
108+
109+
JSON sec = JSON.createObject();
110+
sec.setFloat("val", 5.5);
111+
112+
JSON third = JSON.createObject();
113+
third.setString("val", "a");
114+
115+
JSON arr = JSON.createArray();
116+
arr.append(first);
117+
arr.append(sec);
118+
arr.append(third);
119+
120+
println(arr);
121+
```
122+
100123
# Original README
101124

102125
JSON in Java [package org.json]
@@ -166,4 +189,4 @@ XML.java: XML provides support for converting between JSON and XML.
166189

167190
JSONML.java: JSONML provides support for converting between JSONML and XML.
168191

169-
XMLTokener.java: XMLTokener extends JSONTokener for parsing XML text.
192+
XMLTokener.java: XMLTokener extends JSONTokener for parsing XML text.

0 commit comments

Comments
 (0)