Example of JSON serialization not working correctly with boxed object