public static <T> ArrayNode fromCollection(final Collection<T> coll, final Func1<T, JsonNode> mapper) {
        if (coll == null) {
            return null;
        }
        final ArrayNode array = createArrayNode();
        for (T v : coll) {
            final JsonNode valueNode = v == null ? null : mapper.call(v);
            array.add(valueNode == null ? NullNode.getInstance() : valueNode);
        }
        return array.isEmpty() ? null : array;
    }
constructs a boolean value from a node. If node is null or not boolean, defaultValue is returned.
main/src/main/java/cgeo/geocaching/utils/JsonUtils.java