我需要從這個JSON數據訪問文本屬性,所以我可以結束有:如何訪問json數據中的特定文本? [巨蟒]
{'description': {'tags': ['outdoor', 'building', 'street', 'city', 'busy', 'people', 'filled', 'traffic', 'many', 'table', 'car', 'group', 'walking', 'bunch', 'crowded', 'large', 'night', 'light', 'standing', 'man', 'tall', 'umbrella', 'riding', 'sign', 'crowd'], 'captions': [{'text': 'a group of people on a city street filled with traffic at night', 'confidence': 0.8241405091548035}]}, 'requestId': '12fd327f-9b9c-4820-9feb-357a776211d3', 'metadata': {'width': 1826, 'height': 2436, 'format': 'Jpeg'}}
text = "The Text"
我是否嘗試過做解析[「標題」] [「文本」],但這沒有工作。請讓我知道你是否可以幫忙謝謝!
這不會因爲字符串'your_json_string'沒有嚴格有效的JSON工作。 –