OOP and Procedural versions of my edit Json class