From 95acc66cb5f6e6d3e959e517c5c96a55ec64d386 Mon Sep 17 00:00:00 2001 From: manuc66 Date: Tue, 17 Apr 2018 19:43:55 +0200 Subject: [PATCH] improve documentation --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 6bca4a8..0df2221 100644 --- a/README.md +++ b/README.md @@ -25,10 +25,13 @@ public class Cat : IAnimal { } ``` +The second parameter of the `JsonConverter` attribute is the JSON property name that will be use to retreive the type information from JSON. + ```csharp var animal = JsonConvert.DeserializeObject("{\"Kind\":\"Dog\",\"Breed\":\"Jack Russell Terrier\"}"); Assert.AreEqual("Jack Russell Terrier", (Animal as Dog)?.Breed); ``` + N.B.: Also works with fully qualified type name ## DeserializeObject with custom type mapping