Kizspy | Question: 34
(Choose 1 answer)
public class Employee{
public string firstName { get; set; }
[JsonIgnore]
public string lastName { get; set; }
}
class Program{
static void Main(string[] args){
string empJson = @"{"""firstName""""""John"",
""""lastName""""""Doe""
}";var emp = JsonSerializer. Deserialize<Employee>(empJson);Console.WriteLine($"{emp.firstName}:{emp.lastName}");Console.ReadKey();}
FUOVER
}
Which one of the following is the output of the above code?
A. John:
B. John:Doe
C. Doe:
D. Compile-time error