key_commit: created objectToJson function, this will help us to move data in and out of the API