Here is my example:
class MyController {
def index() {
JSONObject json = request.JSON
log.info('{}', json)
respond json
}
}
How do I handle BigInteger in json? like this:
curl -H 'content-type: application/json' -d '{"largeNum": 99999999999999999999999}' http://localhost:8080/
The JSONObject will conver this largeNum
to Double
like this:
{"largeNum":9.999999999999999E22}
But I want to get a BigInteger, how to?
Thank you guys. I push a PR to solve this issue: https://github.com/grails/grails-core/pull/11334
Waiting the upstream to be merged.