MediaWiki API ヘルプ

このページは自動生成された MediaWiki API の説明文書ページです。

説明文書と例: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page

action=wbparsevalue

(main | wbparsevalue)
  • このモジュールは読み取りの権限を必要とします。
  • ソース: WikibaseClient
  • ライセンス: GPL-2.0-or-later

Parses values using a ValueParser.

パラメーター:
その他一般パラメーターが利用可能です。
datatype

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

値 (次の値のいずれか1つ): commonsMedia、entity-schema、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
廃止予定です。

ID of the ValueParser to use. Deprecated. Use the datatype parameter instead.

値 (次の値のいずれか1つ): commonsMedia、entity-schema、external-id、geo-shape、globe-coordinate、globecoordinate、math、monolingualtext、null、quantity、string、tabular-data、time、url、wikibase-entityid、wikibase-item、wikibase-property
values

The values to parse

この変数は必須です。
複数の値は | または代わりの文字で区切ってください。
値の最大値は 50(緩い制限が適用されるクライアントでは500)です。
options

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

validate

Whether to additionally verify the data passed in.

型: 真偽値 (詳細)
例:
Parse a plain string into a StringValue object.
api.php?action=wbparsevalue&datatype=string&values=foo|bar [サンドボックスで開く]
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} [サンドボックスで開く]
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} [サンドボックスで開く]
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 [サンドボックスで開く]