Skip to content

Commit 17a634b

Browse files
committed
2 parents b016df9 + e213f45 commit 17a634b

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# EasyJSON
2+
3+
EasyJSON is a class created to help simplify the JSON process.
4+
No need to create new Objects for each item you want to add.
5+
Simply use: `foo.putPrimitive(value)` or `foo.putPrimitive(key, value)` or `foo.putArray(key, values...)` or `foo.putStructure("key")`.
6+
You can also add items inline.
7+
8+
**Example**
9+
```
10+
EasyJSON json = EasyJSON.create("/easyJSON_example.json");
11+
json.putStructure("pets").putArray("dogs").putPrimitive("pug");
12+
json.search("pets", "dogs").putPrimitive("rottweiler");
13+
json.search("pets").putArray("cats", "i'm not a cat guy");
14+
```
15+
will result in a structure like this:
16+
17+
**easyJSON_example.json**
18+
```
19+
{
20+
"pets":{
21+
"cats":["i'm not a cat guy"],
22+
"dogs":["pug", "rottweiler"]
23+
}
24+
}
25+
```

0 commit comments

Comments
 (0)