DRAG DROP
You need to validate whether string strJson is a valid JSON string.
You write the following code:
How should you complete the code? To answer, drag the appropriate code segments to the correct targets in the answer area. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
Select and Place:
JavaScriptSerializer
Deserialize
DataContractJsonSerializer even doesn’t have a generic method.
Yes
It’s not correct. DataContractJsonSerializer even doesn’t have the method ReadObject which has the string parameter.
https://docs.microsoft.com/ru-ru/dotnet/api/system.runtime.serialization.json.datacontractjsonserializer.readobject?view=netframework-4.7.2
The correct answer is:
JavaScriptSerializer
Deserialize
https://docs.microsoft.com/ru-ru/dotnet/api/system.web.script.serialization.javascriptserializer.deserialize?view=netframework-4.7.2#System_Web_Script_Serialization_JavaScriptSerializer_Deserialize__1_System_String_