rewrite json prototype