flexget.plugins.input.json module#
Plugin for json files.
- class flexget.plugins.input.json.Json[source]#
Bases:
objectReturn entries from a json file.
file: <path to JSON file> encoding: <JSON encoding> field_map: - <entry field>: <corresponding JSON key>
Note: each entry must have at least two fields, ‘title’ and ‘url’. If not specified in the config, this plugin assumes that keys named ‘title’ and ‘url’ exist within the JSON. ‘encoding’ defaults to ‘utf-8’
Example:
json: file: entries.json encoding: utf-8 field_map: - title: name
- schema = {'additionalProperties': False, 'properties': {'encoding': {'type': 'string'}, 'field_map': {'additionalProperties': {'type': 'string'}, 'type': 'object'}, 'file': {'format': 'file', 'type': 'string'}}, 'required': ['file'], 'type': 'object'}#