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

A version of to_struct that uses the field name instead of display name? #132

Open
mikepc opened this issue Sep 5, 2019 · 0 comments
Open

Comments

@mikepc
Copy link

mikepc commented Sep 5, 2019

It would be handy to have a version of to_struct() such that it would return the original names of the fields instead of the given name of the field.

The use case is this:

Take an SQLAlchemy model Car() which accepts **kwargs to assign properties, some of those properties are JSON objects. It would be nice to just Car(**jsoncar.to_base_name_struct()) to fully populate the db object. Looking through the implementation it looks like it might be rough to manhandle this in, it would be cleaner if

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

1 participant