diff options
author | Gary E. Miller <gem@rellim.com> | 2019-05-17 12:29:04 -0700 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2019-05-17 12:29:04 -0700 |
commit | ef9f2331677beab2e146a56a19161bab979ae3b6 (patch) | |
tree | 6b278b0a22b0fc50c71136d4a581ec96b945eeb6 /json.h | |
parent | 192618af67245eb9f07ddde3b5754cd26276ff2a (diff) | |
download | gpsd-ef9f2331677beab2e146a56a19161bab979ae3b6.tar.gz |
json.h: Add t_byte and t_ubyte to json_type.
This is to allow the existing practice of using unsigned char
fields in satellite_t and meas_t. Those existing uses are
overflowing their fields.
Diffstat (limited to 'json.h')
-rw-r--r-- | json.h | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -1,18 +1,25 @@ /* Structures for JSON parsing using only fixed-extent memory * - * This file is Copyright (c) 2010 by the GPSD project + * This file is Copyright (c) 2010-2019 by the GPSD project * SPDX-License-Identifier: BSD-2-clause */ #include <stdbool.h> #include <ctype.h> +/* the json_type is the type of the C variable the JSON + * value gets placed in. It is NOT the JSON type as used + * in the JSON standard. But it does partly specify how + * the JSON value is decoded. + * + * For example a t_character must be in quotes, but a t_byte + * is a bare number. */ typedef enum {t_integer, t_uinteger, t_real, t_string, t_boolean, t_character, t_time, t_object, t_structobject, t_array, t_check, t_ignore, - t_short, t_ushort} + t_short, t_ushort, t_byte, t_ubyte} json_type; struct json_enum_t { |