문제

I am using pyAMF and I do receive a TypedObject that is in fact a nested dictionary. I want to convert this to a python dictionary.

도움이 되었습니까?

해결책

You should be able to wrap it in dict(obj) or call obj.copy() to convert it:

>>> type(o)
<class 'pyamf.TypedObject'>
>>> type(o.copy())
<type 'dict'>
>>> o.copy()
{'abc': 123}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top