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
Right now we have an awkward ordered dictionary of items in the resource list. This works purely because yaml, as a serialized data structure, is ordered. As a result we can parse it into code in an ordered manner. However if some other application parsed the file and then wrote the output, it may re-order the elements. Which is completely within-spec for the yaml file.
Additionally, searching for a particular item is very difficult in the current schema. If I am trying to find the Stone element I might search for Stone:, but that will return all the instances where stone is being used as a requirement Stone: -1. Even searching for two leading spaces will cause the same elements to be found. The only way to guarantee finding the item is by searching for the beginning of a line as well
r/$Stone:/
Instead of using Stone as the key for a dictionary it should instead be a field within the element and the container should become an ordered array.
This allows us to preserve the order of the items regardless of what parser is being used, and it gives us a much simpler way of finding the item we are looking for by searching for name: Stone
The text was updated successfully, but these errors were encountered:
Right now we have an awkward ordered dictionary of items in the resource list. This works purely because yaml, as a serialized data structure, is ordered. As a result we can parse it into code in an ordered manner. However if some other application parsed the file and then wrote the output, it may re-order the elements. Which is completely within-spec for the yaml file.
Additionally, searching for a particular item is very difficult in the current schema. If I am trying to find the
Stone
element I might search forStone:
, but that will return all the instances where stone is being used as a requirementStone: -1
. Even searching for two leading spaces will cause the same elements to be found. The only way to guarantee finding the item is by searching for the beginning of a line as wellInstead of using
Stone
as the key for a dictionary it should instead be a field within the element and the container should become an ordered array.Becomes
This allows us to preserve the order of the items regardless of what parser is being used, and it gives us a much simpler way of finding the item we are looking for by searching for
name: Stone
The text was updated successfully, but these errors were encountered: