An API for convert an python object in a xml or json document