json.h
1 /*- 2 * Copyright (c) 2024-2025 Baptiste Daroussin <bapt@FreeBSD.org> 3 * 4 * SPDX-License-Identifier: BSD-2-Clause 5 */ 6 7 #pragma once 8 9 #define JSMN_PARENT_LINKS 1 10 #define JSMN_HEADER 1 11 #define JSMN_STRICT 1 12 #include <jsmn.h> 13 #include <stdbool.h> 14 #include <string.h> 15 16 jsmntok_t *jsmn_next(jsmntok_t *tok); 17 #define jsmn_toklen(x) (x->end - x->start) 18 bool jsmntok_stringeq(jsmntok_t *tok, const char *line, const char *str); 19 int jsmntok_nextchild(jsmntok_t *tok, int tokcount, int parent, int me);