Right now this won't behave as expected. Think of the MSON which defines one type which is an object, then another which inherits from it:
Without expansion/preprocessing it's likely it will get expanded to something like this:
['object', {name: 'Data types'}, {}, [
['object', {name: 'A'}, {}, []],
['A', {name: 'B'}, {}, [
['string', {name: 'C'}, {}, 'test']
]]
]
In the above example we'll get an ElementType for B instead of ObjectType because there is no registered type for A. That means that B.content will be the raw content above instead of proper element instances. The solution may be to create some kind of lookup tree for the base type or some kind of preprocessing loop. Ideas?
Right now this won't behave as expected. Think of the MSON which defines one type which is an object, then another which inherits from it:
testWithout expansion/preprocessing it's likely it will get expanded to something like this:
In the above example we'll get an
ElementTypeforBinstead ofObjectTypebecause there is no registered type forA. That means thatB.contentwill be the raw content above instead of proper element instances. The solution may be to create some kind of lookup tree for the base type or some kind of preprocessing loop. Ideas?