Test method to create JSON for use in APIs