You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I find this behavior confusing, i was expecting rather a ConverterException than a silent ignore.
A situation where this can get nasty, is in integration specs when you do something like json = JSON.parse(controller.response.contentAsString as String) and in the related controller, more then one response was rendered like render(contentType: 'application/json', text: someJson.toString()) (by accident, eg missing return after render)
The text was updated successfully, but these errors were encountered:
See https://github.com/grails-plugins/grails-plugin-converters/blob/master/src/main/groovy/grails/converters/JSON.java#L249
and
final Object value = new JSONTokener(source).nextValue();
Eg:
I find this behavior confusing, i was expecting rather a ConverterException than a silent ignore.
A situation where this can get nasty, is in integration specs when you do something like
json = JSON.parse(controller.response.contentAsString as String)
and in the related controller, more then one response was rendered likerender(contentType: 'application/json', text: someJson.toString())
(by accident, eg missingreturn
after render)The text was updated successfully, but these errors were encountered: