PHP - How can I convert a ParseObject to a JSON? -


i´m getting parseobject query , need convert json.

when print_r($results) lot of stuff when $json = json_encode($results) , print it, $json empty.

here var_dump of $results:

array (size=5)   0 =>      object(parse\parseobject)[12]       protected 'serverdata' =>          array (size=1)           'usuario_fk' =>              object(parse\parseuser)[15]               ...       protected 'operationset' =>          array (size=0)           empty       private 'estimateddata' =>          array (size=1)           'usuario_fk' =>              object(parse\parseuser)[15]               ...       private 'dataavailability' =>          array (size=1)           'usuario_fk' => boolean true       private 'classname' => string 'asistencia' (length=10)       private 'objectid' => string 'mdhr3zzo6z' (length=10)       private 'createdat' =>          object(datetime)[13]           public 'date' => string '2015-06-10 01:17:13' (length=19)           public 'timezone_type' => int 2           public 'timezone' => string 'z' (length=1)       private 'updatedat' =>          object(datetime)[14]           public 'date' => string '2015-06-13 13:34:05' (length=19)           public 'timezone_type' => int 2           public 'timezone' => string 'z' (length=1)       private 'hasbeenfetched' => boolean false   1 =>      object(parse\parseobject)[21]       protected 'serverdata' =>          array (size=1)           'usuario_fk' =>              object(parse\parseuser)[24]               ...       protected 'operationset' =>          array (size=0)           empty       private 'estimateddata' =>          array (size=1)           'usuario_fk' =>              object(parse\parseuser)[24]               ...       private 'dataavailability' =>          array (size=1)           'usuario_fk' => boolean true       private 'classname' => string 'asistencia' (length=10)       private 'objectid' => string '3dk19bwoyy' (length=10)       private 'createdat' =>          object(datetime)[22]           public 'date' => string '2015-06-10 01:08:14' (length=19)           public 'timezone_type' => int 2           public 'timezone' => string 'z' (length=1)       private 'updatedat' =>          object(datetime)[23]           public 'date' => string '2015-06-13 13:34:09' (length=19)           public 'timezone_type' => int 2           public 'timezone' => string 'z' (length=1)       private 'hasbeenfetched' => boolean false   2 =>      object(parse\parseobject)[30]       protected 'serverdata' =>          array (size=1)           'usuario_fk' =>              object(parse\parseuser)[33]               ...       protected 'operationset' =>          array (size=0)           empty       private 'estimateddata' =>          array (size=1)           'usuario_fk' =>              object(parse\parseuser)[33]               ...       private 'dataavailability' =>          array (size=1)           'usuario_fk' => boolean true       private 'classname' => string 'asistencia' (length=10)       private 'objectid' => string 'x94vivfpdq' (length=10)       private 'createdat' =>          object(datetime)[31]           public 'date' => string '2015-06-10 01:07:38' (length=19)           public 'timezone_type' => int 2           public 'timezone' => string 'z' (length=1)       private 'updatedat' =>          object(datetime)[32]           public 'date' => string '2015-06-13 13:34:11' (length=19)           public 'timezone_type' => int 2           public 'timezone' => string 'z' (length=1)       private 'hasbeenfetched' => boolean false   3 =>      object(parse\parseobject)[39]       protected 'serverdata' =>          array (size=1)           'usuario_fk' =>              object(parse\parseuser)[42]               ...       protected 'operationset' =>          array (size=0)           empty       private 'estimateddata' =>          array (size=1)           'usuario_fk' =>              object(parse\parseuser)[42]               ...       private 'dataavailability' =>          array (size=1)           'usuario_fk' => boolean true       private 'classname' => string 'asistencia' (length=10)       private 'objectid' => string 'z4vtvb9sdu' (length=10)       private 'createdat' =>          object(datetime)[40]           public 'date' => string '2015-06-10 01:13:05' (length=19)           public 'timezone_type' => int 2           public 'timezone' => string 'z' (length=1)       private 'updatedat' =>          object(datetime)[41]           public 'date' => string '2015-06-13 13:34:07' (length=19)           public 'timezone_type' => int 2           public 'timezone' => string 'z' (length=1)       private 'hasbeenfetched' => boolean false   4 =>      object(parse\parseobject)[48]       protected 'serverdata' =>          array (size=1)           'usuario_fk' =>              object(parse\parseuser)[51]               ...       protected 'operationset' =>          array (size=0)           empty       private 'estimateddata' =>          array (size=1)           'usuario_fk' =>              object(parse\parseuser)[51]               ...       private 'dataavailability' =>          array (size=1)           'usuario_fk' => boolean true       private 'classname' => string 'asistencia' (length=10)       private 'objectid' => string 'lrsogb7mjz' (length=10)       private 'createdat' =>          object(datetime)[49]           public 'date' => string '2015-06-10 03:13:36' (length=19)           public 'timezone_type' => int 2           public 'timezone' => string 'z' (length=1)       private 'updatedat' =>          object(datetime)[50]           public 'date' => string '2015-06-13 14:01:03' (length=19)           public 'timezone_type' => int 2           public 'timezone' => string 'z' (length=1)       private 'hasbeenfetched' => boolean false 

and here after json_encode($results);

[{},{},{},{},{}] 

ideas?

thank time!


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -