First, call the library and set basic variables.

 

(Example: when the json file is'file.json')

import json

with statement with open('file.json') as json_file: 
	json_dict = json.load(json_file)

 

Imported json data Get specific numeric data

json_num = json_data["json_num"]
	print(str(json_num)) 

 

ALL code

 

import json

with statement with open('file.json') as json_file: 
	json_dict = json.load(json_file)

json_num = json_dict["json_num"]
    print(str(json_num)) 

+ Recent posts