from http://json-c.github.io/json-c/json-c-0.11/doc/html/json__object_8h.html#a3be3153ae5158ed24a49d74fbf14149f

json_object_get_int :
The type is coerced to a int if the passed object is not a int. double objects will return their integer conversion. Strings will be parsed as an integer. If no conversion exists then 0 is returned and errno is set to EINVAL. null is equivalent to 0 (no error values set)