avoid using the deprecated is_error() function from json-c