bigjson icon indicating copy to clipboard operation
bigjson copied to clipboard

Retrieve actual object out of bigjson.obj.Object

Open Zia- opened this issue 2 years ago • 3 comments

Hello,

While reading a json I want to get the whole object for a given loop in python dictionary datatype. At the moment, it is in bigjson.obj.Object form. Is there a method or something to convert it into something I can use. Since I don't know what each keys etc. could be in that object I can't generate a dictionary using some logic or loop.

Thanks beforehand and enjoying the package so far.

Zia- avatar Dec 22 '22 13:12 Zia-

There's a to_python() method on the object that worked for me.

olumidesan avatar Jan 06 '23 15:01 olumidesan

Running into the exact same issue @Zia- Were you able to resolve?

Not sure where the to_python function is from that @olumidesan is referring to, I Googled and it's Django specific function?

I'm just trying to parse a large JSON File...

MapZombie avatar Jan 14 '23 23:01 MapZombie

It's here in this library: https://github.com/henu/bigjson/blob/b562d7be1e8de689cfaf44fdca7a636a8d21ca20/bigjson/obj.py#L77

olumidesan avatar Jan 14 '23 23:01 olumidesan