The json_val in api.c is a borrowed reference, not a new one so don't decref it.