load json
# Python program to read
# json file
#https://www.geeksforgeeks.org/read-json-file-using-python/
import json
# JSON string
a = '{"name": "Bob", "languages": "English"}'
# deserializes into dict
# and returns dict.
y = json.loads(a)
print("JSON string = ", y)
print()
# JSON file
f = open ('instances_random_validation.json', "r")
# Reading from file
data = json.loads(f.read())
# Iterating through the json
# list
for i in data['images']:
print(i)
# Closing file
f.close()
浙公网安备 33010602011771号