downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

JsonSerializable::jsonSerialize> <Vordefinierte Konstanten
[edit] Last updated: Fri, 25 May 2012

view this page in

The JsonSerializable interface

(PHP 5 >= 5.4.0)

Einführung

Objects implementing JsonSerializable can customize their JSON representation when encoded with json_encode().

Interface-Übersicht

JsonSerializable {
/* Methoden */
abstract public mixed jsonSerialize ( void )
}

Inhaltsverzeichnis



add a note add a note User Contributed Notes JsonSerializable
Webdev 28-Apr-2012 05:36
The "encode everything in my class"-Code:

public function jsonSerialize()
{
    return get_object_vars($this);
}

 
show source | credits | stats | sitemap | contact | advertising | mirror sites