private Inspector convertTopLevelArray(Inspector data) {
            if (data.entryCount() > 0) {
                var map = maybeConvertMap(data);
                if (map != null) return map;
                if (settings.jsonWsets) {
                    var wset = maybeConvertWset(data);
                    if (wset != null) return wset;
                }
                if (settings.convertDeep()) {
                    var array = new Value.ArrayValue(data.entryCount());
                    for (int i = 0; i < data.entryCount(); i++) {
                        Inspector obj = data.entry(i);
                        array.add(deepMaybeConvert(obj));
                    }
                    return array;
                }
            }
            return data;
        }
Call after all fields in a hit to close the "fields" field of the JSON object
container-search/src/main/java/com/yahoo/search/rendering/JsonRenderer.java