Extension:WikibaseMediaInfo/Data Model/JSON

This document describes the canonical JSON format used to represent Mediainfo entities in the API. This format is currently unstable and subject to change.

For an explanation of the terms used in this document, please refer to the Wikibase Glossary. For a specification of the semantics of the data structures described here, see the MediaInfo Data Model.

JSON Flavor
WikibaseMediaInfo follows the same conventions as Wikibase, as described in Wikibase DataModel JSON Flavor.

Top Level Structure
The JSON representation consists of the following fields in the top level structure:


 * pageid
 * The page id the entity is stored on


 * title
 * The title of the page the entity is stored on (this could also include namespace such as 'Item:Q60')


 * ns
 * The namespace id the entity is stored in


 * lastrevid
 * The JSON document's version (this is a MediaWiki revision ID).


 * modified
 * The JSON document's publication date (this is a MediaWiki revision timestamp).


 * type
 * The entity type identifier, "mediainfo" for MediaInfo entities.


 * id
 * The canonical ID of the entity.


 * labels
 * Contains the labels (also known as "captions") in different languages, see Labels below.


 * descriptions
 * This field is superseded; see for more information.


 * statements
 * Contains any number of statements, grouped by property. See Statements below.

Labels
For each language, there is a record using the following fields:


 * language
 * The language code.


 * value
 * The actual label.

Statements
The JSON "statement" entry of a MediaInfo entity corresponds directly to the JSON "claim" entry of a Wikibase entity.

A Statement consists of a main Snak and a (possibly empty) list of qualifier Snaks.

Statements are described in full in the Statements section of the Wikibase DataModel JSON documentation.

There are no restrictions on which properties can be used. WikibaseMediaInfo on production uses properties and Wikibase items federated from Wikidata.