Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: Use normal dictionaries instead of OrderedDict #316

Open
Guy-Markman opened this issue Nov 16, 2022 · 3 comments
Open

Request: Use normal dictionaries instead of OrderedDict #316

Guy-Markman opened this issue Nov 16, 2022 · 3 comments

Comments

@Guy-Markman
Copy link

Can we get an option that parse will return the object as normal dictionaries instead of OrderedDict?

@mpf82
Copy link

mpf82 commented Nov 17, 2022

xmltodict.parse(xml, dict_constructor=dict) is already available since a few years.

If it's not working for you, you should state your Python version and your xmltodict version.

using dict instead of OrderedDict is also the default if you're using Python 3.7+ (dicts with insertion order are only an implementation detail in C-Python 3.6, not an official Python feature).

related issue: #252

@ckuethe
Copy link

ckuethe commented Jun 6, 2023

The "dict_constructor" keyword is not mentioned in the docstring of parse() - not in v0.12.0, or at HEAD (https://github.com/martinblech/xmltodict/blob/master/xmltodict.py#L202).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@ckuethe @mpf82 @Guy-Markman and others