Welcome Guest, Not a member yet? Register   Sign In
I can't validate array in json.
#8

(07-27-2021, 05:03 AM)InsiteFX Wrote: You need to json_decode the json array to an associated array first.
He get the data with getJSON(), so no need to call json_decode, it’s already done by getJSON().

PHP Code:
$json $this->request->getJSON(true); 

PHP Code:
public function getJSON(bool $assoc falseint $depth 512int $options 0)
{
    return json_decode($this->body$assoc$depth$options);

Reply


Messages In This Thread
I can't validate array in json. - by reinaldo07 - 07-26-2021, 07:04 PM
RE: I can't validate array in json. - by paliz - 07-27-2021, 01:18 AM
RE: I can't validate array in json. - by InsiteFX - 07-27-2021, 05:03 AM
RE: I can't validate array in json. - by includebeer - 07-31-2021, 07:47 AM
RE: I can't validate array in json. - by paliz - 07-27-2021, 05:45 AM



Theme © iAndrew 2016 - Forum software by © MyBB