klahnakoski / mo-dots

Attribute accessors for dicts
Mozilla Public License 2.0
6 stars 3 forks source link

from_data wasn't converting nested FlatList #4

Closed bitnom closed 2 years ago

bitnom commented 3 years ago

I ran into an issue today with from_data not converting nested FlatList to list. I saw you made some commits so I changed my dep to your git's master and it seems to be fixed. Is it on pypi yet? I don't think so.

Correction: It's still not working. Some nested lists are converted back to list, some aren't.

I see. It's that some lists are never converted to FlatList to begin with.

Maybe you are having some traversal issue? Maybe consider this package I made: https://pypi.org/project/traversy/

klahnakoski commented 3 years ago

Yes, this is an unfortunate side effect of using mo-dots: The data structures get polluted with Data and FlatList. My solution has been to scrub the datastructure at serialization time.

klahnakoski commented 2 years ago

I think this is solved with https://github.com/klahnakoski/mo-dots#serializing-to-json