On 11/26/2014 11:48 AM, Andrew Dunstan wrote:
>
>
>
>
> In json.c we now check numbers like this:
>
> JsonLexContext dummy_lex;
> bool numeric_error;
> ...
> dummy_lex.input = *outputstr == '-' ? outputstr + 1 : outputstr;
> dummy_lex.input_length = strlen(dummy_lex.input);
> json_lex_number(&dummy_lex, dummy_lex.input, &numeric_error);
>
> numeric_error is true IFF outputstr is a legal json number.
er is NOT a legal json number
cheers
andrew