Johan2
(Johan .)
1
Hi,
My client uses the REST transformation in API GW - transforming SOAP to a REST.
The transformation gives me a strange behavior when the GW converts the XML response to JSON.
{
“price”: 1.1, //ws response looks like this 1.1 API-GW interpret this as a number
}
{
“price”: “1.10”, //ws response looks like this 1.1 API-GW interpret this as a string
}
{
“price”: 5, //ws response 5.0 API-GW interpret this as a number and round up
}
Why is 1.10 converted to a string and not a number?
Johan2
(Johan .)
2
updated info:
{
“price”: “1.10”, //ws response looks like this 1.10 API-GW interpret this as a string
}
Johan2
(Johan .)
3
…sorry this is the correct data:
So the question is then why 1.10 is converted to datatype string?
{
“price”: 1.1, //ws response looks like this 1.1 API-GW interpret this as a number
}
{
“price”: “1.10”, //ws response looks like this 1.10 API-GW interpret this as a string
}
{
“price”: 5, //ws response 5.0 API-GW interpret this as a number and round up
}