sebgre

Convert graphics to JSON

Discussion created by sebgre on Jan 20, 2012
Latest reply on Jan 22, 2012 by sebgre
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

Outcomes