You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+47-1Lines changed: 47 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -6,4 +6,50 @@ jsoniter (json-iterator) is fast and flexible JSON parser available in [Java](ht
6
6
* Having a developer friendly api is our #1 prioprity, you can choose from bind-api, any-api or iterator-api or all of them (checkout your [api choices](http://jsoniter.com/api.html))
7
7
* Unique iterator api can iterate through JSON directly, zero memory allocation! (see how [iterator](http://jsoniter.com/api.html#iterator-api) works)
8
8
9
-
Join us [](https://gitter.im/json-iterator/Lobby)
9
+
# 1 Minute Tutorial
10
+
11
+
Given this JSON document `[0,1,2,3]`
12
+
13
+
Parse with Java bind-api
14
+
15
+
```java
16
+
importcom.jsoniter.Jsoniter;
17
+
Jsoniter iter =Jsoniter.parse("[0,1,2,3]");
18
+
int[] val = iter.read(int[].class);
19
+
System.out.println(val[3]);
20
+
```
21
+
22
+
Parse with Java any-api
23
+
24
+
```java
25
+
importcom.jsoniter.Jsoniter;
26
+
Jsoniter iter =Jsoniter.parse("[0,1,2,3]");
27
+
Any val = iter.readAny();
28
+
System.out.println(any.get(3));
29
+
```
30
+
31
+
Parse with Java iterator-api
32
+
33
+
```java
34
+
importcom.jsoniter.Jsoniter;
35
+
Jsoniter iter =Jsoniter.parse("[0,1,2,3]");
36
+
int total =0;
37
+
while(iter.readArray()) {
38
+
total += iter.readInt();
39
+
}
40
+
System.out.println(total);
41
+
```
42
+
43
+
# How to get
44
+
45
+
```
46
+
<dependency>
47
+
<groupId>com.jsoniter</groupId>
48
+
<artifactId>jsoniter</artifactId>
49
+
<version>0.9.1</version>
50
+
</dependency>
51
+
```
52
+
53
+
# Contribution Welcomed !
54
+
55
+
Report issue or pull request, or email taowen@gmail.com, or [](https://gitter.im/json-iterator/Lobby)
0 commit comments