Select to view content in your preferred language

Convert graphics to JSON

3358
2
01-20-2012 05:10 AM
SebastianGreifeneder1
Occasional Contributor
Hi,

is there a built-in way to convert whole graphics into their JSON representation?
I know of GeometryEngine.geometryToJson(...), but this will only convert the geometry into JSON format.

A workflow scenario would be to have a GraphicsLayer filled with graphics, that have geometries, attributes, markers and so on (in background they are stored within a SQLite db). The user works offline, so after a day of editing, etc. he should be able to update a server with the changes, thus it would be nice to convert the graphics into JSON and send them to a WebService.

In fact the method "fromJSON" exist for graphics, so the other way would be nice too.


Thanks in advance,

Sebastian Greifeneder
0 Kudos
2 Replies
SebastianGreifeneder1
Occasional Contributor
Thanks for the link.
Will there be a "FeatureSet.ToJson()" method for Runtime SDK too?
0 Kudos