MediaWiki API help

This is an auto-generated MediaWiki API documentation page.

Documentation and examples: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page

action=wbparsevalue

(main | wbparsevalue)
  • Questo modulo richiede i diritti di lettura.
  • Fonte: WikibaseRepository
  • Licenza: GPL-2.0-or-later

Parses values using a ValueParser.

Parametri specifici:
Sono disponibili altri parametri generali.
datatype

Datatype of the value to parse. Determines the parser to use.

Uno dei seguenti valori: commonsMedia, external-id, geo-shape, globe-coordinate, math, monolingualtext, quantity, string, tabular-data, time, url, wikibase-item, wikibase-property
property

Property ID the value to parse belongs to. Determines the parser to use.

parser
Deprecato.

ID del ValueParser da utilizzare. Deprecato. Usa invece il parametro datatype.

Uno dei seguenti valori: commonsMedia, external-id, geo-shape, globe-coordinate, globecoordinate, math, monolingualtext, null, quantity, string, tabular-data, time, url, wikibase-entityid, wikibase-item, wikibase-property
values

I valori da analizzare

Questo parametro è obbligatorio.
Separa i valori con | o alternativa.
Maximum number of values is 50 (500 for clients that are allowed higher limits).
options

The options the parser should use. Provided as a JSON object.

validate

Whether to additionally verify the data passed in.

Tipo: booleano (dettagli)
Esempi:
Parse a plain string into a StringValue object.
api.php?action=wbparsevalue&datatype=string&values=foo|bar [apri in una sandbox]
Parse 1994-02-08 to a TimeValue object with a precision of 9 (year).
api.php?action=wbparsevalue&datatype=time&values=1994-02-08&options={"precision":9} [apri in una sandbox]
Parse 1994-02-08 to a TimeValue object with a precision of 14 (second) with validation enabled, resulting in a validation failure.
api.php?action=wbparsevalue&datatype=time&validate&values=1994-02-08&options={"precision":14} [apri in una sandbox]
Parse foo into an object of whatever datatype P123 is, with validation enabled, potentially resulting in a validation failure depending on P123's datatype's expected input.
api.php?action=wbparsevalue&property=P123&validate&values=foo [apri in una sandbox]