What exactly is the difference between manifest.json and manifest.xml. I mean both are a format for a service manifest but I thought JSON had replaced XML. Under what circumstances should I still be seeing XML when publishing map services to ArcGIS Server?
I'm using something like this to find data sources behind services and it bombed for any XML:
manifestPath = os.path.join(folder, "extracted/manifest.json" )
if os.path.exists(manifestPath):
with open(manifestPath,'r') as f:
text = f.read()
else:
print(folder, "XML only")
pass
manifestJSON = json.loads(text)
Of course, if you use the ArcGIS Python API, you can do something like:
from arcgis import gis
mygis = gis.GIS('https://..../portal/home/', username='arcgis_python')
servers = mygis.admin.servers.list()
server = gistest.admin.servers.list()[0]
services = server.services
Then, once you have a reference to a specific service, this works:
service._service_manifest()
I was really just wondering where the XML comes from. Wasn't expecting to see that and I see it in a very few cases.