Update JSON Encoding to handle dates better.