pgraham/php-annotations — pull request #1 by onalbi (2014-02-08 18:58:40+00:00)
Title: Adding support for list or sub array.

Hi,

Congratulations for your work for me was very useful, now i give my contributes:
I extend your functions _parseValue adding support for list, hash or multidimensional array whit json object structure.
NOTE: if value start with json array maybe return an array with random string depend on comma separate but if a json object work very nice!
* Note: if you replace your parse [] with the default json_decode it might be possible to cover even if the value starts with [and ends with] and both the {} but I like your syntax to write the array in your way and I preferred to propose this solution! because if I want to write an array json I need to use json {"array": [1,3,4,5,6,7,8]} so do not sacrifice any functionality!

Example data : @MenuData {"root":{"child":{"arraychild":[0,1,2,3]}}, "arraysroot" : [1,2,3]}
Output:
[menudata] => stdClass Object
(
[root] => stdClass Object
(
[child] => stdClass Object
(
[arraychild] => Array
(
[0] => 0
[1] => 1
[2] => 2
[3] => 3
)

)

)

[arraysroot] => Array
(
[0] => 1
[1] => 2
[2] => 3
)

)