KG22

serialize wkt to json

Discussion created by KG22 on Oct 22, 2012
Latest reply on Oct 25, 2012 by jacobsj
I have a custom projection so i'm trying to use wkt instead of wkid.
I see in the js api docs that they provide an example template for wkt.
Problem is that when i use that format i get a json serialization error and the Post is never even handled.
I'm trying to post to a 10.1 REST api endpoint to AddFeatures.
If i drop the spatial reference i get errors from Oracle about sr issues.
So i think i need it but i'm packaging the sketched feature from the api into my own payload going to the server and i think that is where the serialization is getting disrupted.

json is picky about double and single quotes.
Anyone experience this issue and know some kind of workaround? Like maybe tacking the spat ref on just before the request is sent or something like that? Or maybe another way to create the wkt in js?

Also is it possible to create my own custom spat ref on the server so that i do have a wkid (albeit a custom one that i create)?

Outcomes