Minor efficiency improvements in Datum to JSON conversion.