import com.esri.ags.utils.JSON; JSON.encode(your geometries array);
Francisco,
Sure you can. To JSON encode the data there is a class for that.import com.esri.ags.utils.JSON; JSON.encode(your geometries array);
result from the Geometry service ... and I want so send over that Geometry to do another process using a SOE ... but the goetry is huge
Not sure if if makes sense in your case, but one feature that is often overlooked in general is the ability to send a URL that will return geometries instead of the actual geometries. Whether a GP or SOE, depending on your specific use case, you might want to just send a URL to something like (instead of retrieving, parsing, returning those three polygons):
http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer/buffer?geometries={%22geometries%22%3A%5B{%22x%22%3A1469510.0355645495%2C%22y%22%3A7499622.6821904825}%5D%2C%22geometryType%22%3A%22esriGeometryPoint%22}&inSR=102100&outSR=102100&bufferSR=4326&distances=10%2C50%2C100&unit=9036&unionResults=false&f=json
Again, depending on your specific use case, this might or might not be a good idea 🙂