How to import JSON?

05-22-2018 12:22 PM
New Contributor II

In the old ESRI sdk, I could create an AGSFeatureSet by importing a json file.

The json file looked like this:


Is this still possible with the new runtime SDK?

0 Kudos
1 Reply
Esri Frequent Contributor

FeatureSet JSON can't stand on it's own, so there's no official JSON spec for this. It needs the Feature Layer definition as well, and that's all part of feature collections, and FeatureCollection does have a FromJson() method you can use. Just note that this is a collection of FeatureLayers where the first part is the Feature Layer definition, and inside it, the FeatureSet itself.