modify the way of object to json