Manual:FormatJson.php

Category:MediaWiki code#FormatJson.php

A wrapper for json_encode and json_decode.

  • encode() - returns the JSON representation of a value.
  • parse() - decode a JSON string.
  • decode() - decode a JSON string. It is recommended to use parse() instead.
  • stripComments() - remove multi-line and single-line comments from an otherwise valid JSON input string.

See also

JSON

Category:MediaWiki code