Sophie

Sophie

distrib > Mageia > 7 > i586 > by-pkgid > 2b917e0437961edec048f1d15e2d7449 > files > 10115

php-manual-en-7.2.11-1.mga7.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Returns a representation that can be converted to JSON</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="mongodb-bson-utcdatetime.construct.html">MongoDB\BSON\UTCDateTime::__construct</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="mongodb-bson-utcdatetime.serialize.html">MongoDB\BSON\UTCDateTime::serialize</a></div>
 <div class="up"><a href="class.mongodb-bson-utcdatetime.html">MongoDB\BSON\UTCDateTime</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="mongodb-bson-utcdatetime.jsonserialize" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">MongoDB\BSON\UTCDateTime::jsonSerialize</h1>
  <p class="verinfo">(mongodb &gt;=1.2.0)</p><p class="refpurpose"><span class="refname">MongoDB\BSON\UTCDateTime::jsonSerialize</span> &mdash; <span class="dc-title">Returns a representation that can be converted to JSON</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-mongodb-bson-utcdatetime.jsonserialize-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">final</span> <span class="modifier">public</span> <span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <span class="methodname"><strong>MongoDB\BSON\UTCDateTime::jsonSerialize</strong></span>
    ( <span class="methodparam">void</span>
   )</div>

 </div>


 <div class="refsect1 parameters" id="refsect1-mongodb-bson-utcdatetime.jsonserialize-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">This function has no parameters.</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-mongodb-bson-utcdatetime.jsonserialize-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns data which can be serialized by <span class="function"><a href="function.json-encode.html" class="function">json_encode()</a></span> to
   produce an extended JSON representation of the
   <a href="class.mongodb-bson-utcdatetime.html" class="classname">MongoDB\BSON\UTCDateTime</a>.
  </p>
  
  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <span class="simpara">
    The output is consistent with the <span class="function"><a href="function.mongodb.bson-tojson.html" class="function">MongoDB\BSON\toJSON()</a></span>
    function, which uses the driver-specific legacy extended JSON format. This
    does not necessarily match the
    <a href="https://github.com/mongodb/specifications/blob/master/source/extended-json.rst#relaxed-extended-json-example" class="link external">&raquo;&nbsp;relaxed</a>
    or <a href="https://github.com/mongodb/specifications/blob/master/source/extended-json.rst#canonical-extended-json-example" class="link external">&raquo;&nbsp;canonical</a>
    extended JSON representations used by
    <span class="function"><a href="function.mongodb.bson-torelaxedextendedjson.html" class="function">MongoDB\BSON\toRelaxedExtendedJSON()</a></span> and
    <span class="function"><a href="function.mongodb.bson-tocanonicalextendedjson.html" class="function">MongoDB\BSON\toCanonicalExtendedJSON()</a></span>, respectively.
   </span>
  </p></blockquote>

 </div>


 <div class="refsect1 errors" id="refsect1-mongodb-bson-utcdatetime.jsonserialize-errors">
  <h3 class="title">Errors/Exceptions</h3>
  <ul class="simplelist">
   <li class="member">Throws <a href="class.mongodb-driver-exception-invalidargumentexception.html" class="classname">MongoDB\Driver\Exception\InvalidArgumentException</a> on argument parsing errors.</li>
  </ul>
 </div>


 <div class="refsect1 seealso" id="refsect1-mongodb-bson-utcdatetime.jsonserialize-seealso">
  <h3 class="title">See Also</h3>
  <ul class="simplelist">
   <li class="member"><span class="methodname"><a href="jsonserializable.jsonserialize.html" class="methodname" rel="rdfs-seeAlso">JsonSerializable::jsonSerialize()</a> - Specify data which should be serialized to JSON</span></li>
   <li class="member"><span class="function"><a href="function.json-encode.html" class="function" rel="rdfs-seeAlso">json_encode()</a> - Returns the JSON representation of a value</span></li>
   <li class="member"><span class="function"><a href="function.mongodb.bson-tocanonicalextendedjson.html" class="function" rel="rdfs-seeAlso">MongoDB\BSON\toCanonicalExtendedJSON()</a> - Returns the Canonical Extended JSON representation of a BSON value</span></li>
   <li class="member"><span class="function"><a href="function.mongodb.bson-torelaxedextendedjson.html" class="function" rel="rdfs-seeAlso">MongoDB\BSON\toRelaxedExtendedJSON()</a> - Returns the Relaxed Extended JSON representation of a BSON value</span></li>
   <li class="member"><a href="https://docs.mongodb.com/manual/reference/mongodb-extended-json/" class="link external">&raquo;&nbsp;MongoDB Extended JSON</a></li>
  </ul>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="mongodb-bson-utcdatetime.construct.html">MongoDB\BSON\UTCDateTime::__construct</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="mongodb-bson-utcdatetime.serialize.html">MongoDB\BSON\UTCDateTime::serialize</a></div>
 <div class="up"><a href="class.mongodb-bson-utcdatetime.html">MongoDB\BSON\UTCDateTime</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>