Refactor how json would output a single element.