Converts a CSV document to a JSON object