First quick hack of a class to help with converting PHP data to json in a more thorough way.