Added toString method
Another fix for json stream writing
Minor change to json writer