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
I'm writing a web app that shows details from data contracts, and noticed that the fields are displayed in a different order to how they are in the Data Contract. This is a little confusing to users who are trying to understand a data model and find that - for example - the volume and price of an order are separated by eight unrelated columns. There may also be cases, such as CSV files, where the ordering of fields is an important part of the contract between data provider and data user.
In the Data Contract Specification, fields are represented as a YAML Mapping, mapping field names to data about that field. The YAML 1.2 spec, at section 3.2.1.1 explicitly notes that mapping key/value pairs are unordered:
The content of a mapping node is an unordered set of key/value node pairs, with the restriction that each of the keys is unique.
Many tools (e.g modern PyYAML) preserve the order of keys as read from the file, but some others do not.
It would be helpful if a future version of the Data Contract specification had some way to explicitly order fields. A YAML list is a possible solution, but many others exist.
The text was updated successfully, but these errors were encountered:
I'm writing a web app that shows details from data contracts, and noticed that the fields are displayed in a different order to how they are in the Data Contract. This is a little confusing to users who are trying to understand a data model and find that - for example - the volume and price of an order are separated by eight unrelated columns. There may also be cases, such as CSV files, where the ordering of fields is an important part of the contract between data provider and data user.
In the Data Contract Specification, fields are represented as a YAML Mapping, mapping field names to data about that field. The YAML 1.2 spec, at section 3.2.1.1 explicitly notes that mapping key/value pairs are unordered:
Many tools (e.g modern PyYAML) preserve the order of keys as read from the file, but some others do not.
It would be helpful if a future version of the Data Contract specification had some way to explicitly order fields. A YAML list is a possible solution, but many others exist.
The text was updated successfully, but these errors were encountered: