ion-python
ion-python copied to clipboard
How to Convert IonPyDict into Native Python dict?
IonPyDict is the returned type of loads() method. However, a lot of data library like pandas, polars works with native python library only, is there a convenient way to convert all value of IonPyDict into native Python value?
For context, this appears to be a follow-up from https://github.com/amazon-ion/ion-python/issues/362
My suggestion there was to use the IonPyValueModel.STRUCT_AS_STD_DICT which should result in Ion Structs deserializing to IonPyStdDict objects (which inherit from dict).
If that solution doesn't work for you, please help me understand why not and what you need instead.