Built-in filters - Filter all documents as JSON (ForceJSONMime)

The ForceJSONMime filter forces all documents that are processed by the filter framework to present a application/json MIME type. This is useful for data sources that use the JSONToXML filter where the data source only includes content from a single JSON file or set of JSON files and the web server that hosts the JSON file is not returning the correct MIME type.

This filter should only be used if all the files being processed are JSON files. Use with other file types may result in unexpected behavior or filter errors.

Enabling

To enable the filter add ForceJSONMime to the filter chain.

The ForceJSONMime filter must appear in the filter chain before other filters that rely on the application/json MIME type.

Example

To force the gatherer to treat all documents as JSON and convert all entries to XML:

filter.classes=<default_filter_chain>:ForceJSONMime:JSONToXML