Which Python code snippet must be added to the script to save the returned configuration as a JSON-formatted file?ImponjsonMpon requestsCr.els• ( adm n'', "S 415'21481$Ptx )Headers • { Content-Type : applic.1 ·o yang-data+Json •Accept' : pplle.1tlon/yang-data+json' )BaseURL • https://cpelrestconf/data''URL• BaseURL + C sCCHOS-XE-na ve nterface G gab 1£the,..r,et'Response• requests.get(UR auth • Creds, head• s • Headers verify• False)
A、With open("lfaces.Json" "w") as OutFlle:JSONResponse = Json.loads(Response.text)OutFlle.wrlte(JSONResponse)
B、W th open("lfaces.Json" "w") as OutFlle:OutFlie.write(Response)
C、With open("lfaces.Json" "w'') as OutFlle:OutFlle.write(Response.text)
D、W th open("lfaces.Json" "w") as OutF le:OutFile.write(Response.json())
发布时间:2025-01-30 16:26:23