Added some tests for JSON conversion. Not 100% satisfied, due to loss of precision converting numbers. Will have to see if the impact is significant with real data.