Hi There,
I am using the JSON templater to create various JSON outputs. One of them is them is "Position" which consists of two decimal / float values - XCOORD and YCOORD. I can use either of the following to output the values:
"POSITION":[fme:get-attribute("X_COORD"),fme:get-attribute("Y_COORD")] OR
"POSITION":[fme:get-list-attribute("_XY_LIST{}.XY_List_Creator")] (this is a list I have created with the co-ord pair)
The issue is, that my JSON schema expects the "POSITION" value to be a numeric JSON array, but no matter how I write out the XCOORD and YCOORD values, it always appears as a string eg.
"POSITION" : [ "515000.00", "188000.00" ]
I've made sure the individual values are indeed numeric. Right before the templator they are coded as UTF-8 - not sure what it is doing to convert it to a string.
i've even tried using a Math function to convert in line but with no luck:
"POSITION":[@double(fme:get-attribute("X_COORD")),@double(fme:get-attribute("Y_COORD"))],
Â
Any help would be much appreciated!
Thanks,
Â
Luke