Exam 70-483 Topic 3 Question 192 Discussion
Actual exam question for Microsoft's 70-483 exam
Question #: 192
Topic #: 3
Question #: 192
Topic #: 3
You are creating a console application named Appl.
App1 retrieves data from the Internet by using JavaScript Object Notation (JSON).
You are developing the following code segment (line numbers are included for reference
only):

You need to ensure that the code validates the JSON string. Which code should you insert at line 03?

App1 retrieves data from the Internet by using JavaScript Object Notation (JSON).
You are developing the following code segment (line numbers are included for reference
only):

You need to ensure that the code validates the JSON string. Which code should you insert at line 03?

Suggested Answer: B Vote an answer
JavaScriptSerializer().Deserialize
Converts the specified JSON string to an object of type T.
Example:
string json = File.ReadAllText(Environment.CurrentDirectory + @"\JSON.txt");
Company company = new
System.Web.Script.Serialization.JavaScriptSerializer().Deserialize<Company>(
Reference: C# - serialize object to JSON format using JavaScriptSerializer
http://matijabozicevic.com/blog/csharp-net-development/csharp-serialize-object-to-json-
format-using-javascriptserialization
Converts the specified JSON string to an object of type T.
Example:
string json = File.ReadAllText(Environment.CurrentDirectory + @"\JSON.txt");
Company company = new
System.Web.Script.Serialization.JavaScriptSerializer().Deserialize<Company>(
Reference: C# - serialize object to JSON format using JavaScriptSerializer
http://matijabozicevic.com/blog/csharp-net-development/csharp-serialize-object-to-json-
format-using-javascriptserialization
by Nick at Feb 21, 2024, 10:16 AM
0
0
0
10
Comments
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Report Comment
Commenting
You can sign-up / login (it's free).