Refactored to add an array of objects of the correct type to the json and returning that.
Prep for 2.0.0 release.