nilpointer protected NewJSONContext