Good gets a json on my page like this:
// Decodifica o Json
$obj = json_decode(file_get_contents('php://input'));
echo $obj->Autenticacao[0]->login;
The Json that is being sent is like this:
{
"Autenticacao": [{
"login": "root",
"senha": "123"
}]
}
Everything works 100%, but who does remove the json [], php informs me the following error:
Fatal error: Cannot use object of type stdClass as array
How to identify if the json is complete.