parent::__construct( $text, $modelId );
}
- /**
- * Decodes the JSON into a PHP associative array.
- *
- * @deprecated since 1.25 Use getData instead.
- * @return array|null
- */
- public function getJsonData() {
- wfDeprecated( __METHOD__, '1.25' );
- return FormatJson::decode( $this->getNativeData(), true );
- }
-
/**
* Decodes the JSON string.
*
*/
public function getData() {
if ( $this->jsonParse === null ) {
- $this->jsonParse = FormatJson::parse( $this->getNativeData() );
+ $this->jsonParse = FormatJson::parse( $this->getText() );
}
return $this->jsonParse;
}
/**
* Beautifies JSON prior to save.
*
- * @param Title $title Title
- * @param User $user User
+ * @param Title $title
+ * @param User $user
* @param ParserOptions $popts
* @return JsonContent
*/