Wireshark 2.9.0-477-g68ec514b The Wireshark network protocol analyzer

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

wsjson.h
1 /* wsjson.h
2 * Utility to check if a payload is json using libjsmn
3 *
4 * Copyright 2016, Dario Lombardo
5 *
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
9 *
10 * SPDX-License-Identifier: GPL-2.0-or-later
11 */
12
13 #ifndef __WSJSON_H__
14 #define __WSJSON_H__
15
16 #include "ws_symbol_export.h"
17 #include <glib.h>
18
19 #include "jsmn.h"
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24
28 WS_DLL_PUBLIC gboolean wsjson_is_valid_json(const guint8* buf, const size_t len);
29
30 WS_DLL_PUBLIC int wsjson_parse(const char *buf, jsmntok_t *tokens, unsigned int max_tokens);
31
35 WS_DLL_PUBLIC gboolean wsjson_unescape_json_string(const char *input, char *output);
36
37 #ifdef __cplusplus
38 }
39 #endif
40
41 #endif
42
43 /*
44 * Editor modelines - https://www.wireshark.org/tools/modelines.html
45 *
46 * Local variables:
47 * c-basic-offset: 4
48 * tab-width: 8
49 * indent-tabs-mode: t
50 * End:
51 *
52 * vi: set shiftwidth=4 tabstop=8 noexpandtab:
53 * :indentSize=4:tabSize=8:noTabs=false:
54 */
jsmntok_t
Definition: jsmn.h:62