Both values are ints, so you could use a two-item array (or other collection) instead to achieve the output JSON you require. It's not as nice, but it's what the view requires...