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
When records are passed through the Ledger API their fields are expected to appear in order as per their definitions. If this does not happen, an error is raised.
If all labels are passed, though, the interpreter could re-order them so that order no longer matters in this case. This would enable bindings implementations to model records as dictionaries/objects/associative arrays easily and reliably.
The text was updated successfully, but these errors were encountered:
* Re-order fields in records if all labels are provided
Fixes#988
* Add line to release notes
* Fix line on release notes
* Document change on the Ledger API definition
* Simplify pattern matching
* Improve and fix tests
Integration tests now look for the "Missing field label" rather then the
"Mismatching record label" when inspecting errors. Furthermore, a test
has been added that ensures that repetitions in labels still raise an
error.
* Add comment
Comment about relationship between fields length check and fields reordering based on labels
Co-Authored-By: stefanobaghino-da <43749967+stefanobaghino-da@users.noreply.github.com>
* Improve Ledger API docstring
Explicitly state the semantics of labeled fields (i.e. repeated keys are not accepted)
Co-Authored-By: stefanobaghino-da <43749967+stefanobaghino-da@users.noreply.github.com>
When records are passed through the Ledger API their fields are expected to appear in order as per their definitions. If this does not happen, an error is raised.
If all labels are passed, though, the interpreter could re-order them so that order no longer matters in this case. This would enable bindings implementations to model records as dictionaries/objects/associative arrays easily and reliably.
The text was updated successfully, but these errors were encountered: