<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/refs.basic.other.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'book.json.php',
    1 => 'JSON',
    2 => 'JavaScript Object Notation',
  ),
  'up' => 
  array (
    0 => 'refs.basic.other.php',
    1 => 'Other Basic Extensions',
  ),
  'prev' => 
  array (
    0 => 'function.igbinary-unserialize.php',
    1 => 'igbinary_unserialize',
  ),
  'next' => 
  array (
    0 => 'json.setup.php',
    1 => 'Installing/Configuring',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/json/book.xml',
  ),
  'history' => 
  array (
  ),
  'extra_header_links' => 
  array (
    'rel' => 'alternate',
    'href' => '/manual/en/feeds/book.json.atom',
    'type' => 'application/atom+xml',
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="book.json" class="book">
 
 <h1 class="title">JavaScript Object Notation</h1>
 

 <div id="intro.json" class="preface">
  <h1 class="title">Introduction</h1>
  <p class="para">
   This extension implements the <a href="http://www.json.org/" class="link external">&raquo;&nbsp;JavaScript Object Notation (JSON)</a>
   data-interchange format. PHP comes with a parser 
   that is specifically written for PHP and licensed under the
   PHP license.
  </p>
  
 <blockquote class="note"><p><strong class="note">Note</strong>: 
  <p class="para">
   PHP implements a superset of JSON as specified in the original
   <a href="https://datatracker.ietf.org/doc/html/rfc7159" class="link external">&raquo;&nbsp;RFC 7159</a>.
  </p>
 </p></blockquote>

 </div>

 







 




 




 




 








<ul class="chunklist chunklist_book"><li><a href="json.setup.php">Installing/Configuring</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="json.installation.php">Installation</a></li></ul></li><li><a href="json.constants.php">Predefined Constants</a></li><li><a href="class.jsonexception.php">JsonException</a> — The JsonException class</li><li><a href="class.jsonserializable.php">JsonSerializable</a> — The JsonSerializable interface<ul class="chunklist chunklist_book chunklist_children"><li><a href="jsonserializable.jsonserialize.php">JsonSerializable::jsonSerialize</a> — Specify data which should be serialized to JSON</li></ul></li><li><a href="ref.json.php">JSON Functions</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="function.json-decode.php">json_decode</a> — Decodes a JSON string</li><li><a href="function.json-encode.php">json_encode</a> — Returns the JSON representation of a value</li><li><a href="function.json-last-error.php">json_last_error</a> — Returns the last error occurred</li><li><a href="function.json-last-error-msg.php">json_last_error_msg</a> — Returns the error string of the last json_validate(), json_encode() or json_decode() call</li><li><a href="function.json-validate.php">json_validate</a> — Checks if a string contains valid JSON</li></ul></li></ul></div><?php manual_footer($setup); ?>