@Override
    protected Map<String, String> getDocStringsFromFiles(Map<String, byte[]> files) {
        final ImmutableMap.Builder<String, String> docStrings = ImmutableMap.builder();
        for (Map.Entry<String, byte[]> entry : files.entrySet()) {
            try {
                final Map<String, Object> json =
                        new ObjectMapper().readValue(entry.getValue(), JSON_VALUE_TYPE);
                @SuppressWarnings("unchecked")
                final Map<String, Object> namespaces =
                        (Map<String, Object>) json.getOrDefault("namespaces", ImmutableMap.of());
                final String packageName = (String) namespaces.get("java");
                if (packageName == null) {
                    logger.info("Skipping Thrift DocString generation for file: {}", entry.getKey());
                    continue;
                }
                json.forEach((key, children) -> {
                    if (children instanceof Collection) {
                        @SuppressWarnings("unchecked")
                        final Collection<Object> castChildren = (Collection<Object>) children;
                        castChildren.forEach(
                                grandChild -> traverseChildren(docStrings, packageName, FQCN_DELIM,
                                                               grandChild));
                    }
                });
            } catch (IOException e) {
                throw new IllegalStateException(e);
            }
        }
        return docStrings.build();
    }
{@link ThriftDocStringExtractor} is a DocString extractor for Thrift IDL JSON.

<p>To include docstrings in {@link DocService} pages, use the Thrift compiler version 0.10.0 or above
(0.9.3 will not work) and compile your thrift files with 'json' code generation and include the resulting
json files in the classpath location {@code META-INF/armeria/thrift}. The classpath location can be changed
by setting the {@code com.linecorp.armeria.thrift.jsonDir} system property.
thrift/thrift0.13/src/main/java/com/linecorp/armeria/internal/server/thrift/ThriftDocStringExtractor.java