Added code to print struct to JSON.