theirix/json_accessors

json_get_int/bigint returns NULL for zero-valued fields

schp opened this issue · 1 comments

schp commented

Hi,

If I write

select json_get_int('{"a": 0}', 'a')

the result is NULL instead of 0. For

select json_get_int('{"a": 1}', 'a')

the function works correctly and returns 1.

Thank you for a fix. Added a test for this case.