Record::toJson - jcobban/Genealogy GitHub Wiki
$record->toJson($print, $options)
Up: class Record
This method emits a JavaScript Object Notation (JSON) representation of the object The function returns the generated JSON document as a string. This is used by many PHP scripts, in particular those that permit Javascript to use AJAX to retrieve the contents of a database record for dynamic display to the user. JSON is the most convenient form for the representation of an object in data sent from the server to the browser because it can be trivially converted into a JavaScript object.
parameter | description |
---|---|
If this is omitted or true the JSON document is also sent to output. For compatibility with classes which support an associative array of settings this can also be specified as array('print' => true/false) . |
|
$options | This contains a bit mask which is used by derived classes and is declared here only because of the requirement that the signature of overloaded functions in derived classes must match the signature of the base implementation. |