Can anyone help?
mysql_fetch_object returns all properties as type string. I need to convert the object to JSON but preserving the numerical and Boolean.
Parse the resulting JSON is very slow for all queries. This is the result of my query var_dump.
$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 the DataBase (I already tried with 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"...