I have the following code:

feature_geometry = arcpy.AsShape(json_string, esri_json=True)
print feature_geometry
print type(feature_geometry)
>>><geoprocessing record set object object at 0x0E1D9F20>
>>><class 'arcpy.arcobjects.arcobjects.RecordSet'>

It's returning a record set however the documentation says it should return a geometry object... What I am missing?

This is the ESRI_JSON object I'm passing:


1 Answer 1


This is by design, you are sending it a feature set and not a singular geometry.

If you'd like the Geometry on its own, do this:

import json
geom = arcpy.AsShape(json.loads(json_string)["features"][0]["geometry"], True)

We thought in many cases people would like to parse full Esri JSON feature sets and not just individual geometries, so that's why it works the way it does.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.