[
https://issues.apache.org/jira/browse/TIKA-3559?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17418505#comment-17418505
]
Nick Burch commented on TIKA-3559:
----------------------------------
As we get more JSON-based formats, I wonder if we should do a detector for them?
Looks like there are no required elements, if I have read the spec right, which
makes it a bit tricky. But we probably could write a detector that parses the
json, and if it sees the most common few keys then detects the type, similar to
how the zip detector works on entry filenames
Otherwise [~olleolleolle] , any chance of a small example manifest file we can
use for unit testing the detection?
> Add MIME type for .webmanifest files
> ------------------------------------
>
> Key: TIKA-3559
> URL: https://issues.apache.org/jira/browse/TIKA-3559
> Project: Tika
> Issue Type: New Feature
> Reporter: Olle Jonsson
> Priority: Minor
>
> Hello!
> This issue is a proposal to add the MIME type for [Web
> Manifest|https://www.w3.org/TR/appmanifest/].
> * [Description of the new MIME type in the W3 "Web Application Manifest"
> editor's draft.|https://www.w3.org/TR/appmanifest/#media-type-registration]
> * [Example of usage in the MDN article on Web
> Manifest|https://developer.mozilla.org/en-US/docs/Web/Manifest#deploying_a_manifest_with_the_link_tag]
> *Example implementation*: What it could look like the XML in the Tika
> project:
> {code:xml}
> <mime-type type="application/manifest+json">
> <_comment>Web Application Manifest file</_comment>
> <sub-class-of type="application/json"/>
> <glob pattern="*.webmanifest"/>
> </mime-type>
>
> {code}
> I was looking through
> https://github.com/apache/tika/blob/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml
> and could not find any such mention.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)