From ef9f2331677beab2e146a56a19161bab979ae3b6 Mon Sep 17 00:00:00 2001 From: "Gary E. Miller" Date: Fri, 17 May 2019 12:29:04 -0700 Subject: 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. --- json.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/json.h b/json.h index c2bfc62b..19682e47 100644 --- a/json.h +++ b/json.h @@ -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 #include +/* 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 { -- cgit v1.2.1