From Json to Features using Runtime 10.2.2

3247
2
Jump to solution
04-10-2014 02:43 AM
Labels (1)
BKuiper
Occasional Contributor III
Hi,

I'm using Runtime 10.2.2 and Desktop 10.2 to convert a GraphicsLayer to Json and then save it as a shapefile.

For this I use Featureset(GraphicCollection).ToJson() and the Conversion JSON to Features tool.

It seems that the FeatureSet().ToJson() method doesn't produce a valid JSON that can be consumed by the JSON to Feature Tool. It is missing the 'fields' attribute, which is not generated by the FeatureSet().ToJson() method. I think this is a bug. Or is there some other way that i can serialize to Json and then use the Conversion tool?
0 Kudos
1 Solution

Accepted Solutions
BKuiper
Occasional Contributor III
Populating the Fields attribute on the FeatureSet object helps, but you would have hoped that this would have been done automatically. What is the best way to convert a GraphicsLayer into Json?

View solution in original post

0 Kudos
2 Replies
BKuiper
Occasional Contributor III
Populating the Fields attribute on the FeatureSet object helps, but you would have hoped that this would have been done automatically. What is the best way to convert a GraphicsLayer into Json?
0 Kudos
BKuiper
Occasional Contributor III
---deleted---
0 Kudos