def __call__(self, obj):
"""Transforms the JSON object `obj`."""
if isinstance(obj, str):
return obj
elif isinstance(obj, Sequence):
return self.act_on_list(obj)
elif isinstance(obj, Mapping):
return self.act_on_dict(obj)
else:
return obj
评论列表
文章目录