Skip to content

Commit c895c57

Browse files
committed
changes as per @michalvasko
1 parent 9ba71bf commit c895c57

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/parser_data.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,10 @@ struct ly_in;
179179
#define LYD_PARSE_JSON_NULL 0x4000000 /**< Allow using JSON empty value 'null' within JSON input, such nodes are
180180
silently skipped and treated as non-existent. By default, such values
181181
are invalid. */
182-
#define LYD_PARSE_JSON_STRING_DATATYPES 0x8000000 /*!**< By default, JSON data values are validated to be in the proper format.
183-
For instance numbers are expected to not be enclosed in quotes, nor
184-
are boolean values. Setting this option will disable this
185-
validation. Prior to v1.0.212 this was the default behavior. */
182+
#define LYD_PARSE_JSON_STRING_DATATYPES 0x8000000 /**< By default, JSON data values are expected to be in the correct
183+
format according to RFC 7951 based on their type. Using this
184+
option the validation can be softened to accept boolean and
185+
number type values enclosed in quotes. */
186186
#define LYD_PARSE_OPTS_MASK 0xFFFF0000 /**< Mask for all the LYD_PARSE_ options. */
187187

188188
/** @} dataparseroptions */

src/parser_json.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ static LY_ERR
351351
lydjson_value_type_hint(struct lyd_json_ctx *lydctx, enum LYJSON_PARSER_STATUS *status_p, uint32_t *type_hint_p)
352352
{
353353
struct lyjson_ctx *jsonctx = lydctx->jsonctx;
354+
354355
*type_hint_p = 0;
355356

356357
if (*status_p == LYJSON_ARRAY) {

0 commit comments

Comments
 (0)