home / docs / sections

sections: internals:internals-utils-parse-metadata

This data as json

id page ref title content breadcrumbs references
internals:internals-utils-parse-metadata internals internals-utils-parse-metadata parse_metadata(content) This function accepts a string containing either JSON or YAML, expected to be of the format described in Metadata . It returns a nested Python dictionary representing the parsed data from that string. If the metadata cannot be parsed as either JSON or YAML the function will raise a utils.BadMetadataError exception. datasette.utils. parse_metadata content : str dict Detects if content is JSON or YAML and parses it appropriately. ["Internals for plugins", "The datasette.utils module"] []
Powered by Datasette · Queries took 3.005ms