{
"status_code": 0,
"result_type": "DRAGON_NLU_ASR_CMD",
"NMAS_PRFX_SESSION_ID": "8c63c3ed-40da-4cdc-8ad8-1dd94ce8e466",
"NMAS_PRFX_TRANSACTION_ID": "1",
"audio_transfer_info": {
"packages": [
{
"time": "20160105015723190",
"bytes": 1668
},
{
"time": "20160105015723646",
"bytes": 7613
}
],
"nss_server": "10.56.11.186:4510",
"end_time": "20160105015723645",
"audio_id": 1,
"start_time": "20160105015722835"
},
"cadence_regulatable_result": "completeRecognition",
"appserver_results": {
"status": "success",
"final_response": 1,
"payload": {
"diagnostic_info": {
"adk_dialog_manager_status": "undefined",
"nlu_version": "[NLU_PROJECT:NVCCP-deu-DEU];[Datapack:Version: nlps-deu-DEU-NVCCP-6.1.100.12-2-GMT20151130161021];[VL-Models:Version: vlmodels-NVCCP-deu-DEU-6.1.100.12-2-GMT20151130160231]",
"nlps_host": "mt-dmz-nlps002.nuance.com:8636",
"nlps_ip": "10.56.10.51",
"application": "AUDI_2017",
"nlu_component_flow": "[Input:VoiceJSON] [FieldID|auto_main] [NLUlib|C-eckart-r$Rev$.f20151118.1250] [build|G-r72490M.f20151130.1055] [vlmodel|Version: vlmodels-NVCCP-deu-DEU-6.1.100.12-2-GMT20151130160231] [Flow|+VlingoTokenized]",
"third_party_delay": "0",
"nmaid": "AUDI_SDS_2017_EXT_20151203",
"nlps_profile": "AUDI_2017",
"fieldId": "auto_main",
"nlps_profile_package_version": "r159218",
"nlu_annotator": "com.nuance.NVCCP.deu-DEU.ncs51.VlingoNLU-client-qNVCCP_NCS51",
"ext_map_time": "3",
"nlu_use_literal_annotator": "0",
"int_map_time": "1",
"nlps_nlu_type": "nlu_project",
"nlu_language": "deu-DEU",
"timing": {
"finalRespSentDelay": "311",
"intermediateRespSentDelay": "1896"
},
"nlps_profile_package": "AUDI_2017"
},
"actions": [
{
"Input": {
"Interpretations": [
"18 Slash 6/2015"
],
"Type": "asr"
},
"Instances": [
{
"nlu_classification": {
"Domain": "UDE",
"Intention": "Unspecified"
},
"nlu_interpretation_index": 1,
"nlu_slot_details": {
"Location": {
"literal": "18 Slash 6/2015"
},
"Search-phrase": {
"literal": "18 slash 6/2015"
}
},
"interpretation_confidence": 3174
}
],
"type": "nlu_results",
"api_version": "1.0"
}
],
"nlps_version": "nlps(z):6.1.100.12.2-B359;Version: nlps-base-Zeppelin-6.1.100-B124-GMT20151130193521;"
}
},
"final_response": 1,
"prompt": "",
"result_format": "appserver_post_results"
}
我想將上面的JSON轉換爲Python中的字典數據類型。在上面的腳本中,我想讀取這個值 -將JSON字符串轉換爲python中的字典
{"Domain":"UDE","Intention":"Unspecified"}
我是json的新手,所以我無法理解。有人可以給我建議一些想法。
那麼你嘗試?而你不明白的是什麼? –
您是否嘗試過使用內建的['json'模塊](https://docs.python.org/3/library/json.html#json.loads)? –
我試過這個:json.loads(「nlu_classification」)。但它不起作用 – user2306769