70-483 question 28 discussion

answered

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

nirwana101

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

devrifslcibef@outlook.fr

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

qwerty333

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

thava

It just return a object

harsh1802

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));