update json writer.