Use JSON when possible instead of datums, closes #19