>
>
> Ive just opened a new RFC https://wiki.php.net/rfc/jsonserializable
>
> regarding Json to Object unserialization.
>
> I like the idea, but how do you handle complex json notations, that may
contain arrays of objects? Say:
{
   "id": 123
   "type": "user",
   "name": "derokorian"
   "permissions": [{
      "id": 1,
      "value": "create"
    },{
      "id": 2,
     "value": "edit"
    }]
}

Would this new function give me objects of type Permission in the
permissions array, or would this solution only be a single level deep and
therefore return an array of StdClass? I see no way to be able to tell this
to the decoder in the User class because php does not support typed arrays.

Reply via email to