Added a simple utility function for JSON