Skip to content

Commit c6f2f60

Browse files
DBJDBJlemire
authored andcommitted
clarifications -- documentation update (simdjson#448)
1 parent 3306073 commit c6f2f60

2 files changed

Lines changed: 48 additions & 43 deletions

File tree

‎doc/JsonStream.md‎

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
1-
# JsonStream
1+
# simdjson
2+
## JsonStream
23
An interface providing features to work with files or streams containing multiple JSON documents.
34
As fast and convenient as possible.
45
## Contents
5-
- [Motivations](#Motivations)
6-
- [Performance](#Performance)
7-
- [How it works](#how-it-works)
8-
- [Support](#Support)
9-
- [API](#API)
10-
- [Concurrency mode](#concurrency-mode)
11-
- [Example](#Example)
12-
- [Use cases](#use-cases)
6+
- [simdjson](#simdjson)
7+
- [JsonStream](#jsonstream)
8+
- [Contents](#contents)
9+
- [Motivations](#motivations)
10+
- [Performance](#performance)
11+
- [How it works](#how-it-works)
12+
- [Support](#support)
13+
- [API](#api)
14+
- [Concurrency mode](#concurrency-mode)
15+
- [Example](#example)
16+
- [Use cases](#use-cases)
1317

1418

1519
## Motivations

tape.md renamed to doc/tape.md

Lines changed: 35 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -28,41 +28,42 @@ It is sometimes useful to start with an example. Consider the following JSON doc
2828

2929
The following is a dump of the content of the tape, with the first number of each line representing the index of a tape element.
3030

31-
```bash
32-
$ ./json2json -d jsonexamples/small/demo.json
33-
0 : r // pointing to 38 (right after last node)
34-
1 : { // pointing to next tape location 38 (first node after the scope)
35-
2 : string "Image"
36-
3 : { // pointing to next tape location 37 (first node after the scope)
37-
4 : string "Width"
38-
5 : integer 800
39-
7 : string "Height"
40-
8 : integer 600
41-
10 : string "Title"
42-
11 : string "View from 15th Floor"
43-
12 : string "Thumbnail"
44-
13 : { // pointing to next tape location 23 (first node after the scope)
45-
14 : string "Url"
46-
15 : string "http://www.example.com/image/481989943"
47-
16 : string "Height"
48-
17 : integer 125
49-
19 : string "Width"
50-
20 : integer 100
51-
22 : } // pointing to previous tape location 13 (start of the scope)
52-
23 : string "Animated"
53-
24 : false
54-
25 : string "IDs"
55-
26 : [ // pointing to next tape location 36 (first node after the scope)
56-
27 : integer 116
57-
29 : integer 943
58-
31 : integer 234
59-
33 : integer 38793
60-
35 : ] // pointing to previous tape location 26 (start of the scope)
61-
36 : } // pointing to previous tape location 3 (start of the scope)
62-
37 : } // pointing to previous tape location 1 (start of the scope)
63-
38 : r // pointing to 0 (start root)
31+
### The Tape
32+
| index | element (64 bit word) |
33+
| ----- | ------------------------------------------------------------------- |
34+
| 0 | r // pointing to 38 (right after last node) |
35+
| 1 | { // pointing to next tape location 38 (first node after the scope) |
36+
| 2 | string "Image" |
37+
| 3 | { // pointing to next tape location 37 (first node after the scope) |
38+
| 4 | string "Width" |
39+
| 5 | integer 800 |
40+
| 7 | string "Height" |
41+
| 8 | integer 600 |
42+
| 10 | string "Title" |
43+
| 11 | string "View from 15th Floor" |
44+
| 12 | string "Thumbnail" |
45+
| 13 | { // pointing to next tape location 23 (first node after the scope) |
46+
| 14 | string "Url" |
47+
| 15 | string "http://www.example.com/image/481989943" |
48+
| 16 | string "Height" |
49+
| 17 | integer 125 |
50+
| 19 | string "Width" |
51+
| 20 | integer 100 |
52+
| 22 | } // pointing to previous tape location 13 (start of the scope) |
53+
| 23 | string "Animated" |
54+
| 24 | false |
55+
| 25 | string "IDs" |
56+
| 26 | [ // pointing to next tape location 36 (first node after the scope) |
57+
| 27 | integer 116 |
58+
| 29 | integer 943 |
59+
| 31 | integer 234 |
60+
| 33 | integer 38793 |
61+
| 35 | ] // pointing to previous tape location 26 (start of the scope) |
62+
| 36 | } // pointing to previous tape location 3 (start of the scope) |
63+
| 37 | } // pointing to previous tape location 1 (start of the scope) |
64+
| 38 | r // pointing to 0 (start root) |
65+
6466

65-
```
6667

6768
## General formal of the tape elements
6869

0 commit comments

Comments
 (0)