created a json writer