Completely separate the JSON generation from the data transformation
A soupçon of style
More style
Improves performance by 31%