Skip to content

Commit dd14406

Browse files
authored
Update api.md
1 parent dfd7db3 commit dd14406

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

api.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,23 @@ title: Json Iterator API
66
* TOC
77
{:toc}
88

9+
# API Choices
10+
11+
One thing does not fit all. Jsoniter always put developr friendly as top priority. No matter how many times faster you claim you can be, what most developer need is a json parser just get the job done. JSON being a weak typed data exchange format, when being parsed in language like Java or Go, it is very often we need to deal with type mismatch or uncertain data structure. Existing solution is not only slow to parse, but put too much work on the shoulder of developer. The motivation to reinvent this wheel is not performance, but to make the parsing as easy as it can be. Benchmarking is just a way to get your attention, sadly.
12+
13+
Jsoniter give you three api style choices:
14+
15+
* bind-api: which you should stick with most of time
16+
* any-api: when slow is an option
17+
* iterator-api: when maximum flexibility or performance is what needed
18+
19+
And best of all, you can mix them up when parsing one document. Let's see some code
20+
21+
Given this document
22+
23+
```
24+
```
25+
926
# Iterator API
1027

1128
## Motivation

0 commit comments

Comments
 (0)