cesanta/frozen

json_scanf does not work when the key is an integer

KrrishnaShah opened this issue · 2 comments

modifying line 1066:
i.e.
} else if (json_isalpha(fmt[i]) || json_get_utf8_char_len(fmt[i]) > 1 ) {

to
} else if ( json_isdigit(fmt[i]) || json_isalpha(fmt[i]) || json_get_utf8_char_len(fmt[i]) > 1 ) {

works fine.

cpq commented

Keys should be strings, as far as I know

it has become requirement for my application.
and hence i edited it for backward compatibility.