Added json(obj : Object) : String function. Converts Java object to json string.