Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.8.4
-
Mac Java 6
Description
import groovy.json.JsonOutput def group = [1, 2, null].countBy{it} def result = use (JsonOutput) { group.toJson() }
throws NullPointerException due to the presence of a null a as key to map entry.
The stacktrace is rather unhelpful, so it would be nice if the JsonOutput would translate this to indicate a problem with the map content.
http://groovyconsole.appspot.com/script/601001