{
  "id": "data_uri",
  "kind": "datatype",
  "status": "draft",
  "name": "Data URI (data: URL)",
  "doc": "URI of the data: scheme that carries a small file inline instead of pointing to it (RFC 2397): data:, an optional media type with parameters, an optional ;base64 flag, a comma and the data, percent-encoded or in Base64. HTML and CSS use it to embed images and fonts. Without a media type the data is text/plain;charset=US-ASCII. Browsers parse it as the WHATWG Fetch Standard describes, which is more lenient than RFC 2397.",
  "parent": "uri",
  "is_pii": false,
  "categories": [
    "internet"
  ],
  "langs": [
    "common"
  ],
  "regexp": "^data:(?:[A-Za-z0-9!#$&^_.+-]+/[A-Za-z0-9!#$&^_.+-]+)?(?:;[A-Za-z0-9!#$&^_.+-]+=[^;,\\s]+)*(?:;base64)?,\\S*$",
  "examples": [
    {
      "value": "data:,A%20brief%20note",
      "description": "Example of RFC 2397: plain text without a media type",
      "valid": true
    },
    {
      "value": "data:text/plain;base64,SGVsbG8sIFdvcmxkIQ==",
      "description": "The text Hello, World! in Base64",
      "valid": true
    },
    {
      "value": "data:application/vnd-xxx-query,select_vcount,fcol_from_fieldtable/local",
      "description": "Example of RFC 2397 with a media type",
      "valid": true
    },
    {
      "value": "data:text/plain;base64",
      "description": "No comma before the data",
      "valid": false
    },
    {
      "value": "text/plain;base64,SGVsbG8sIFdvcmxkIQ==",
      "description": "No data: scheme",
      "valid": false
    }
  ],
  "links": [
    {
      "type": "wikipedia",
      "url": "https://en.wikipedia.org/wiki/Data_URI_scheme"
    },
    {
      "type": "doc",
      "url": "https://www.rfc-editor.org/rfc/rfc2397"
    },
    {
      "type": "doc",
      "url": "https://fetch.spec.whatwg.org/#data-urls"
    }
  ],
  "translations": {
    "ru": {
      "name": "Data URI",
      "doc": "URI схемы data:, который содержит небольшой файл прямо в адресе, например изображение в Base64 (RFC 2397)."
    }
  },
  "quality": {
    "score": 80,
    "missing": [
      "mapping (Wikidata, Schema.org, ...)",
      "detector coverage"
    ]
  },
  "source": {
    "path": "data/datatypes/any/internet/data_uri.yaml",
    "url": "https://github.com/apicrafter/metacrafter-registry/blob/main/data/datatypes/any/internet/data_uri.yaml",
    "edit_url": "https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/internet/data_uri.yaml"
  },
  "urls": {
    "html": "http://registry.apicrafter.io/datatype/data_uri",
    "json": "http://registry.apicrafter.io/api/v1/datatypes/data_uri.json"
  }
}