70-483 question 28 discussion


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?

  • 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));
Created 4 months, 3 weeks ago by nirwana101


answer C states Return ser.Deserialize&lt;Name>(json); should be Return ser.Deserialize<Name>(json);


answer B also states a "&lt;" instead of a "<"


answer A probubly should to be Deserialize() instead Desenalize(), and it will be correct too)


It just return a object


NO. as ser.Desenalize (json, typeof(Name)); returns generic Object. you need to cast it to Name. Correct Answer should like return (Name)ser.Desenalize (json, typeof(Name));