SarkariResultess QA Bank

PHP JSON decode associative array में कैसे करते हैं? को secure तरीके से कैसे implement करें?

Other 0 Views Verified
PHP JSON decode associative array में कैसे करते हैं? को secure तरीके से कैसे implement करें? सही विकल्प चुनें और code/solution को समझें।
Sarkari Result QA Bank
Editorially reviewed exam information

Answer & Explanation

4 Answers
Verified Correct Answer

json_decode($json, true);

json_decode($json, true);
Additional Explanation
Second argument true JSON objects को associative arrays में decode करता है। User input को trust न करें; validation, escaping और prepared statements context के अनुसार उपयोग करें।
Verified

json_parse($json,array);

json_parse($json,array);
Additional Explanation
यह विकल्प सही Core PHP solution नहीं है।
Verified

decode_json($json,true);

decode_json($json,true);
Additional Explanation
यह विकल्प सही Core PHP solution नहीं है।
Verified

json_decode_assoc($json);

json_decode_assoc($json);
Additional Explanation
यह विकल्प सही Core PHP solution नहीं है।