"apistats": { "2512": { "FindFirstFileExW": 7, "NtAllocateVirtualMemory": 26, "SetFilePointer": 4, "NtCreateFile": 92, "GetFileType": 27, "NtReadFile": 29, "GetFileInformationByHandle": 19, "RegOpenKeyExA": 14, "GetFileAttributesW": 26, "NtFreeVirtualMemory": 2, "NtClose": 19 } }, },
I can't put all the contents of the json file here, so only api people like FindFirstFileExW in the above part I want to extract it and extract it, but what python code should I write? Please help me ㅠ<
python json
{
"apistats": {
"2512": {
"FindFirstFileExW": 7,
"NtAllocateVirtualMemory": 26,
"SetFilePointer": 4,
"NtCreateFile": 92,
"GetFileType": 27,
"NtReadFile": 29,
"GetFileInformationByHandle": 19,
"RegOpenKeyExA": 14,
"GetFileAttributesW": 26,
"NtFreeVirtualMemory": 2,
"NtClose": 19
}
}
}
import json
with open('sample.json', 'r') as f:
content = json.load(f)
api_list = [ x for x in content['apistats']['2512'].keys()]
print(api_list)
Try it this way.
920 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
576 Who developed the "avformat-59.dll" that comes with FFmpeg?
613 GDB gets version error when attempting to debug with the Presense SDK (IDE)
573 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
© 2024 OneMinuteCode. All rights reserved.