Suggested change: adding an optional function to convert the JSON data