Update README
This commit is contained in:
@@ -23,15 +23,15 @@ WeaselJSON is a high-performance, streaming JSON parser that uses callbacks inst
|
||||
|
||||
```mermaid
|
||||
flowchart TD
|
||||
A[Need to parse JSON?] --> B{Do you have memory constraints<br/>or truly streaming data?}
|
||||
A[Need to parse JSON?] --> B{Do you have memory constraints<br/>or do you want to parse partial data?}
|
||||
|
||||
B -->|No| C{Is performance critical<br/>and data fits in memory?}
|
||||
B -->|Yes| D{Can you control<br/>how the JSON is laid out?}
|
||||
|
||||
C -->|No| E[SimdJSON DOM API<br/>Fast and easy to use<br/>Wait why are you using C++?]
|
||||
C -->|No| E[SimdJSON DOM API<br/>Fast and easy to use]
|
||||
C -->|Yes| F{Are you OK with potential<br/>performance traps?}
|
||||
|
||||
F -->|Yes| G[SimdJSON On-Demand<br/>Very fast<br/>Nice API<br/>Easy to use wrong]
|
||||
F -->|Yes| G[SimdJSON On-Demand<br/>Very fast<br/>Nice API<br/>Forward-only traversal]
|
||||
F -->|No| H[Consider weaseljson<br/>if you can deal with callbacks]
|
||||
|
||||
D -->|No| I{Can you preprocess data<br/>or make multiple requests?}
|
||||
@@ -50,8 +50,9 @@ flowchart TD
|
||||
|
||||
### Use **SimdJSON On-Demand** when:
|
||||
- Performance is critical and your data fits in memory
|
||||
- You understand that some access patterns can accidentally become very slow
|
||||
- You can work with forward-only traversal (no random access or backtracking)
|
||||
- You need maximum speed but still want a usable API
|
||||
- Your JSON structure is consistent and you control both generation and parsing
|
||||
|
||||
### Use **WeaselJSON** when:
|
||||
- You absolutely cannot load the whole JSON into memory
|
||||
|
||||
Reference in New Issue
Block a user