note 80700 added to function.json-encode

From: Date: Tue, 29 Jan 2008 15:29:11 +0000
Subject: note 80700 added to function.json-encode
Groups: php.notes 
Request: Send a blank email to php-notes+get-135551@lists.php.net to get a copy of this message
Am I correct to assume that json_encode does not work with PHP objects? While json_decode is does create a PHP object from a JSON string, it seems to as if json_encode does only accept (associative) arrays as input parameter. Wouldn't it be need to be able to transform an entire PHP object directly into a JSON string? Or did I just miss something? ---- Server IP: 217.160.72.57 Probable Submitter: 195.80.215.2 ---- Manual Page -- http://www.php.net/manual/en/function.json-encode.php Edit -- https://master.php.net/note/edit/80700 Del: integrated -- https://master.php.net/note/delete/80700/integrated Del: useless -- https://master.php.net/note/delete/80700/useless Del: bad code -- https://master.php.net/note/delete/80700/bad+code Del: spam -- https://master.php.net/note/delete/80700/spam Del: non-english -- https://master.php.net/note/delete/80700/non-english Del: in docs -- https://master.php.net/note/delete/80700/in+docs Del: other reasons-- https://master.php.net/note/delete/80700 Reject -- https://master.php.net/note/reject/80700 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#135551) next »