shrug-l: Python JSON

Keith Sandell Keith.Sandell at
Tue Jul 17 15:57:34 EDT 2012

Hey Shruggers,

Has anybody written any Python code to create a JSON representation of a featureclass, specifically a featureCollection that can be consumed in a Javascript API app as a FeatureLayer?

Similar, or rather the same, to what is returned from the Portal API in the Javacript API sample "Add Shapefile":

Or is there an arcpy function that can do this? (I don't think so, but I could have missed it)

Just want to check before I run off and recreate the wheel.

The GPFeatureRecordSetLayer that is returned by a geoprocessing service is too light weight, i.e. lacks many of the JSON object name/value pairs of shapefile attribute information for what I am doing.


Keith Sandell, MBA
GIS Manager, Corporate Analytics
Citizens Property Insurance Corporation
2320 Killearn Center Blvd, Bldg D, Tallahassee, Florida 32309
ofc. 850.521.8341   |   cell 850.727.2897

"If we are to achieve results never before accomplished we must expect to employ methods never before attempted." - Francis Bacon

-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 10664 bytes
Desc: not available
Url :

More information about the SHRUG-L mailing list