I am writing a REST API for my application.
Using the JSON payload in a POST request:
{
availableAfter: "2014-03-16"
canRead: true
rightName: "dsa"
}
The problem is that there are no payload values โโin the controller parameters. But despite this, I can read them using syntax properties[*], for example:
right.properties['rightName', 'canRead'] = params;
right.availableAfter = params.date('availableAfter', 'yyyy-MM-dd');
The properties "rightName" and "canRead" are set in order. "availableAfter" is not equal (null, even if it is done using params.availableAfter).
Why is he different?
UPDATE: Grails v 2.3.6
source
share