json writer impl