Home / Questions / Other JSON object को file में save कैसे करते हैं? — interview में इसका सही जवाब क्या है? Other 0 Views Verified JSON object को file में save कैसे करते हैं? — interview में इसका सही जवाब क्या है? #python #python programming #coding #developer Sarkari Result QA Bank Editorially reviewed exam information Share
Verified Correct Answer with open('data.json', 'w', encoding='utf-8') as f: json.dump(data, f, indent=2) with open('data.json', 'w', encoding='utf-8') as f: json.dump(data, f, indent=2) Additional Explanation json.dump Python object को file में लिखता है।
Verified json.write(data,'data.json') json.write(data,'data.json') Additional Explanation यह विकल्प सही समाधान नहीं है।
Verified json.save(data,'data.json') json.save(data,'data.json') Additional Explanation यह विकल्प सही समाधान नहीं है।
Verified json.dumps(data,'data.json') json.dumps(data,'data.json') Additional Explanation यह विकल्प सही समाधान नहीं है।