Skip to content

Commit 9f2e67e

Browse files
author
James McLaughlin
committed
Implement source tracking (line/column numbers in json_value)
1 parent 8dc7ec9 commit 9f2e67e

File tree

3 files changed

+112
-53
lines changed

3 files changed

+112
-53
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,26 @@ The `type` field of `json_value` is one of:
3636
* `json_string` (see `u.string.ptr`, `u.string.length`)
3737
* `json_boolean` (see `u.boolean`)
3838
* `json_null`
39+
40+
41+
Compile-Time Options
42+
--------------------
43+
44+
-DJSON_TRACK_SOURCE
45+
46+
Stores the source location (line and column number) inside each `json_value`.
47+
48+
This is useful for application-level error reporting.
49+
50+
51+
Runtime Options
52+
---------------
53+
54+
settings |= json_enable_comments;
55+
56+
Enables C-style `// line` and `/* block */` comments.
57+
58+
59+
60+
61+

0 commit comments

Comments
 (0)