PrepAway - Latest Free Exam Questions & Answers

Which code segment should you insert at line 10?

An application receives JSON data in the following format:

The application includes the following code segment. (Line numbers are included for reference only.)

You need to ensure that the ConvertToName() method returns the JSON input string as a Name
object.
Which code segment should you insert at line 10?

PrepAway - Latest Free Exam Questions & Answers

A.
Return ser.Desenalize (json, typeof(Name));

B.
Return ser.ConvertToType<Name>(json);

C.
Return ser.Deserialize<Name>(json);

D.
Return ser.ConvertToType (json, typeof (Name));

4 Comments on “Which code segment should you insert at line 10?

  1. Lord Vader says:

    msdn recommendsJSON.net
    50% faster than DataContractJsonSerializer, and 250% faster than JavaScriptSerializer.
    dont have to markup the class with attributes as with DataContratJsonSerializer to serialize it

    Deserialize(String, Type)
    Converts a JSON-formatted string to an object of the specified type.
    Deserialize(String)
    Converts the specified JSON string to an object of type T.

    a/c as input is a string not an object




    0



    0

Leave a Reply