python 处理特殊数据类型

解析一段wsdl数据:
 
 operation_content['input'][operation_name]=
 transferNotification{
    agentRegistrationId: str,
    agentRegistrationKey: str,
    queueId: str,
    notificationType: str,
    sequenceNumber: positiveInteger,
    attachmentProperties: attachmentProperties,
    extensions: [
        u'extension'
    ],
    notificationContent: anyURI
} 
 type(operation_content['input'][operation_name])
<class 'pysimplesoap.helpers.Struct'>

现在想要提取 ‘agentRegistrationId’ 等字典内容,如何解析?

阅读 2.7k
1 个回答

你可以尝试 print operation_content'input'.__dict__ 看下是否能得到一些有用信息。
实在不行就看源码文件pysimplesoap.helpers是否有转换方法

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题