Small utility class to help out with converting PHP objects to json.