Convert object to JSON to display it.