You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the intended way to preserve keys. Calling ->useAttributeAsKey() will mark the array node as being a map rather than being a list. Maps and lists will be processed differently.
The name of the method is related to the fact that in XML, the key of the map will be stored in an attribute (due to the XML format), and we need to know the name of this attribute.
Here is the code example when source keys are ignored in processed configuration:
Result:
Here is another example that adds source keys to the result:
Result:
This also affects merging:
Result:
This "feature" is not documented and looks like a magic. I wish there was documented way to preserve keys of prototyped values.
The text was updated successfully, but these errors were encountered: