Commit 77f4ff0
committed
Experiment: ResumableParser
Fix: #983
Numerous known issues TODO:
- `object_start_cursor` recorded in frame becomes invalid if the buffer string
is reallocated or spilled.
- The buffer need to be shrunk sometimes.
- Lot more testing needed.
- Unclear what to do with top level numbers (and perhaps true/false/null)
- API is all but final
- I'd like to be able to "pop" the value, so we don't uselessly keep a
reference on it.
- Then methods need to be documented.
- It would worth trying to make `json_parse_any` exception free.
- Right now EOF errors have been eliminated in favor of returning
`false`.
- We could try to do the same with syntax errors.
- But then we need to `rb_protect` when calling back into Ruby
or other unsafe APIs, so perhaps it's best to just accept it.1 parent ad6b9cf commit 77f4ff0
3 files changed
Lines changed: 416 additions & 48 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
| |||
20 | 23 | | |
21 | 24 | | |
22 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
23 | 32 | | |
24 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
25 | 38 | | |
26 | 39 | | |
27 | 40 | | |
| |||
0 commit comments