If you want to have an object or array with computed sub-properties, you have to wrap it in either a type:object or type:array. This is annoying, easy to get wrong, and adds an unnessecary level of extra indirection during authoring.
As a pre-processing step before the seed packet has nested seeds unrolled, process the object. Iterate through them, and if we find any with a SeedReference or SeedData property, then replace the parent with a type:object wrapper (and do the same for arrays, too). This should be a pretty simple transformation and handle most cases fine.
(Once we make it so seed references have a seed, not id property, it will make this behavior even more resilient... as long as your sub-objects don't have a type or seed property then it will work as you think.)
[x] Make it work for objects
[x] Make it work for arrays
[x] Document
[x] Update type hierarchy to allow objects and arrays that have seeds in them...
If you want to have an object or array with computed sub-properties, you have to wrap it in either a
type:object
ortype:array
. This is annoying, easy to get wrong, and adds an unnessecary level of extra indirection during authoring.As a pre-processing step before the seed packet has nested seeds unrolled, process the object. Iterate through them, and if we find any with a SeedReference or SeedData property, then replace the parent with a
type:object
wrapper (and do the same for arrays, too). This should be a pretty simple transformation and handle most cases fine.(Once we make it so seed references have a
seed
, notid
property, it will make this behavior even more resilient... as long as your sub-objects don't have atype
orseed
property then it will work as you think.)