Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions doc/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -758,12 +758,14 @@ Each JSON Value has a type and subtype, as specified in the table:
| YYJSON_TYPE_NUM | YYJSON_SUBTYPE_REAL | `double` number |
| YYJSON_TYPE_STR | | String value |
| YYJSON_TYPE_STR | YYJSON_SUBTYPE_NOESC | String value, no-escape |
| YYJSON_TYPE_STR | YYJSON_SUBTYPE_UNIERR | String value, invalid unicode |
| YYJSON_TYPE_ARR | | Array value |
| YYJSON_TYPE_OBJ | | Object value |

- `YYJSON_TYPE_NONE` means invalid value, it does not appear when the JSON is successfully parsed.
- `YYJSON_TYPE_RAW` only appears when the corresponding flag `YYJSON_READ_XXX_AS_RAW` is used.
- `YYJSON_SUBTYPE_NOESC` is used to optimize the writing speed of strings that do not need to be escaped. This subtype is used internally, and the user does not need to handle it.
- `YYJSON_SUBTYPE_UNIERR` marks strings that contained invalid Unicode during parsing. Such strings may require special handling.

The following functions can be used to determine the type of a JSON value.

Expand Down
Loading
Loading