-
Notifications
You must be signed in to change notification settings - Fork 801
AttrDict.to_dict() should be recursive #291
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
Comments
Possibly better is that AttrDict, AttrList are unwrapped before storing in --Karl _Karl Putland | _Voice Engineer III [image: cid:[email protected]] We transform how people connect. Click here to find out how we’re doing it On Mon, Nov 9, 2015 at 12:06 PM, Marcin Nowak [email protected]
|
@kputland , I've got complex and nested AttrDict directly from ES result. I'm using nested properties in my doctype. I'm trying to get plain dict, I must have plain dict, but |
@marcinn if you get a nested document from ES it is still just a dict, only when accessing it via the top level Also, if you create a connection via the recommended I know this is not ideal, but it makes everything much faster when we don't have to recursively walk the datastructures to serialize everything. What do you think would be the best solution? |
I'm calling How can I get the plain dict instead of AttrDict from Response?
Avoid these wrappers, you know it already. :( |
If you want to avoid these wrappers just call Can you show me where this is not the case in real world? |
I have something like that:
When I'm getting This is not as simple as iterating over response. That's why getting complete (plain) dict from any AttrDict node would be great and very handy. Maybe And thanks for the answer! |
I don't understand - if you don't change the data, calling
|
Confirmed - to_dict() on response returns a raw dict. But raw result differs a little, so I would like to convert only a part of AttrDict`s tree. It looks simpler than raw output. That's why I think that converting part of AttrDict would be handy. |
What do you mean by "converting part of Adding |
I've got an error after joining with So it looks that was my big fault in my nested objects transform code. Sorry for that. My bad. Bić kijami po piętach i walić po łbie... Maybe recursive |
thanks, closing the issue |
converting to dict:
Expecting
dict
as type ofb
.The text was updated successfully, but these errors were encountered: