简体   繁体   中英

Extract a value from unstructured JSON response

My JSON response contains the token in a strange way as marked with the red line in the picture

在此处输入图像描述

How we can extract it without converting it to string and parsing the text? we want to extract it as is in this JSON format

Convert this JSON to a Map<String,Object>. Then you can easily do a getKey() to get the strange(UUId) key, and map.get(key) will give you the value for the key.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM