diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2021-01-12 21:28:44 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2021-01-12 21:28:44 -0800 |
| commit | 5811ff4554da3d980ff32a83efa35ea1a4512484 (patch) | |
| tree | 752ee83bb6b671f8686809f04df0f63b5a0b1a82 /json.c | |
| parent | b27b71608b3ba4715d629c597efd17c124a8cc22 (diff) | |
Adding comments
Diffstat (limited to 'json.c')
| -rw-r--r-- | json.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -7,7 +7,9 @@ #include "types.h" // -// Print a match as JSON +// Helper function for json_match(). +// `comma` is used to track whether a comma will need to be printed before the +// next object or not. // static int _json_match(const char *text, match_t *m, int comma, int verbose) { @@ -41,6 +43,9 @@ static int _json_match(const char *text, match_t *m, int comma, int verbose) return 1; } +// +// Print a match object as a JSON object. +// void json_match(const char *text, match_t *m, int verbose) { _json_match(text, m, 0, verbose); |
