-
1. Re: Return data types in REST call
shawkins Nov 13, 2017 3:34 PM (in response to shiloh.jordan)Are you looking to embedded xsi:type information, or do you have some other mechanism in mind? Is this xml you are creating with SQL/XML?
-
-
3. Re: Return data types in REST call
shawkins Nov 13, 2017 3:49 PM (in response to shiloh.jordan)Here you showing the JSON result. Simple type information in JSON is typically limited to just the literal values - "21" vs 21 for string vs numeric. Are you looking to produce different JSON literal values?
-
4. Re: Return data types in REST call
shiloh.jordan Nov 13, 2017 4:17 PM (in response to shawkins)Hi Steven,
Yes, in my table, I have 3 different data types (string, int, and dateTime)
I would like to distinguish those types in my response. It seems as though all of my types are coming back as string. Is there a way to control this?
-
5. Re: Return data types in REST call
shawkins Nov 13, 2017 4:29 PM (in response to shiloh.jordan)Can you provide more details on how the response is formed? You initially mentioned xml. What does the procedure definition look like?
Differentiating between string and int should be possible, but dataTime is a problem in JSON as there is no standard literal.
-
-
7. Re: Return data types in REST call
shawkins Nov 13, 2017 6:30 PM (in response to shiloh.jordan)1 of 1 people found this helpfulCurrently there is no additional logic in XMLELEMENT/XMLFOREST to add automatically add type information. You would have to do this on your own.
If you are relying on an automatic conversion to json starting with the xml, then yes it would effectively loose the type information of literal values.
If you directly create json, then at least numeric values would be as expected.