finished json writer and added interface for parser