[Flow] JsonView configuration behaviour on arrays and objects
Alexander Berl
a.berl at outlook.com
Fri May 24 20:14:45 CEST 2013
Hey everyone,
is there anyone that could explain to me why the configuration behaviour
is so completely different for arrays and objects in the JsonView?
For arrays:
- can be configured with _descendAll
- _descendAll will ignore _only and _exclude configurations
- even if _descendAll is not set all elements are traversed by default -
element options are not set with _descend, but directly by key
For objects:
- can not be configured with _descendAll
- _only and _exclude take precedence before evaluating properties
- all simple type properties are evaluated
- array and object properties that are not explicitly configured in
_descend are skipped
Basically, I would expect there to be one behaviour for both types - or
at least the same behaviour with the same configuration options. What is
the reason behind this or is this actually just a buggy implementation?
Regards,
Alexander
More information about the Flow
mailing list