Click or drag to resize

MediaWikiHelperPageStubFromJson Method

This is preliminary documentation and is subject to change.

Creates a WikiPageStub instance from the given raw page information.

Namespace: WikiClientLibrary.Infrastructures
Assembly: WikiClientLibrary (in WikiClientLibrary.dll) Version: 0.9.0-int.2+447d1d590e6726b7881f750a0a0e42908f3e417e
Syntax
public static WikiPageStub PageStubFromJson(
	JsonObject jPage
)

Parameters

jPage  JsonObject
The JSON page-like object.

Return Value

WikiPageStub
The page stub that contains the information given in jPage.
Exceptions
ExceptionCondition
ArgumentExceptionThe given JSON object contains none of title+ns or pageid.
ArgumentNullExceptionjPage is null.
Remarks
A typical JSON page-like object has the following structure
JavaScript
{
    // Basic page information
    "title": "Title",
    "pageid": 1234,
    "ns": 0
    // Page status
    "special": "",
    "missing": "",
    "invalid": ""
}
A valid JSON page-like object should at least has title+ns, pageid, or both. The status flag corresponds with format specification for Boolean in MediaWiki API.
See Also