rewrite json.c file