Skip to content

added check for lexicographical ordering of keys when decoding dictionaries in Bento.Parser#31

Open
ifoo wants to merge 1 commit into
folz:masterfrom
ifoo:ensure_lexicographical_order_of_maps
Open

added check for lexicographical ordering of keys when decoding dictionaries in Bento.Parser#31
ifoo wants to merge 1 commit into
folz:masterfrom
ifoo:ensure_lexicographical_order_of_maps

Conversation

@ifoo
Copy link
Copy Markdown

@ifoo ifoo commented Sep 14, 2023

No description provided.

@github-actions github-actions Bot added the test Changes or issues related to unit testing label Sep 14, 2023
@ifoo
Copy link
Copy Markdown
Author

ifoo commented Sep 14, 2023

I'm not sure if you want to add this, as it might break parsing of malformed dictionaries. On the one hand, dictionary keys that are not ordered are clearly defined as invalid in the spec. On the other hand, we might want the parser to be liberal. Best case would be the have an option (like strict: true) in the parsers function. Bento.decode already has opts, but Bento.Parser does not and I didn't want to break the API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Changes or issues related to unit testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant