private void renderInspector(Inspector data) throws IOException {
            if (data.type().equals(Type.ARRAY)) {
                int entries = data.entryCount();
                for (int i = 0; i < entries; i++) {
                    if (!data.entry(i).type().equals(Type.STRING)) {
                        renderInspectorDirect(maybeConvertData(data));
                        return;
                    }
                }

                generator.writeStartArray();
                for (int i = 0; i < entries; i++) {
                    byte[] utf8 = data.entry(i).asUtf8();
                    generator.writeUTF8String(utf8, 0, utf8.length);
                }
                generator.writeEndArray();
                return;
            }
            renderInspectorDirect(maybeConvertData(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