Can anyone help?
mysql_fetch_object returns all properties as a type string. I need to convert the object to JSON, but keep the numeric and logical.
Parsing the resulting JSON is very slow for all requests. This is the result of my var_dump query.
$obj = mysql_fetch_object($result) var_dump($obj); ... object(stdClass)[10] public 'idUsuario' => string '1' (length=1) public 'Email' => string ' user@theemail.com.ar ' (length=23) public 'Password' => string '1234' (length=4) public 'Nombre' => string 'Sebastián' (length=10) public 'Apellido' => string 'Black' (length=7) public 'Habilitado' => string '1' (length=1) ...
The "Habilitado" property is BOOLEAN in a DataBase (I already tried with the BIT data type, but the same result).
Then JSON with json_encode:
{"DTOList": {"idUsuario":"1", "Email":" user@theemail.com.ar ", "Password":"1234","Nombre":"Sebasti\u00e1n","Apellido":"Black","Habilitado":"1"...
Cheva source share