I am retrieving the JSON request body from WebTau as a Map, e.g.:
Map<String,?> approvalMap = WebTauDsl.http.post(
callUrl, restCallHeader, restCallBody,
((header, body) ->
{
return body;
}
);
if( accessApprovalMap.get("id") instanceof Integer )
{
logger.info("id is Integer");
}
else if( accessApprovalMap.get("id") instanceof Long )
{
logger.info("id is Long");
}
From the logging code after the return ...
MonitorTest INFO : id is Integer
The question is what happens when the result is larger than MAX_INT is returned? BIGINT isn't very common at this point, but how would 'we' know? The string just looks like a number.
- Is there a way to override the type of a JSON field?
