{
"UpdateRequest": {
"SAASAS": {
"SPO2": "99.00000",
"VitalGroupID": "1219",
"Temperature": "36.6666666666667",
},
"Modified": 1,
"ID": 25465
}
}
How can i send VitalGroupID and Temperature as Integer instead of String.... This is the request that get's formed after i hit submit button.
Strictly speaking, json is untyped, so you can't send it as an integer, it has to be a string. javascript objects are a little less strict, so what you have their will evaluate to a javascript object, but no strict json parser will be able to understand it.
The best you can do is to convert fields that you know are numbers on the client side using parseInt.
e.g. sonObj["UpdateRequest"]["SAASAS"]["VitalGroupID"] = parseInt(jsonObj["UpdateRequest"]["SAASAS"]["VitalGroupID"], 10);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With