Source code for MangAdventure.jsonld

"""
Functions used to generate JSON-LD_ objects.

.. _JSON-LD: https://json-ld.org/
"""

from typing import Any, Dict, List, Tuple

JSON = Dict[str, Any]


[docs]def schema(at_type: str, items: JSON) -> JSON: """ Generate an arbitrary JSON-LD object. The object's ``@context`` links to https://schema.org. :param at_type: The ``@type`` of the object. :param items: The key-value pairs of the object. :return: A JSON-LD dictionary. """ return { '@context': 'https://schema.org', '@type': at_type, **items }
__all__ = ['schema', 'breadcrumbs', 'carousel']