From 2cb89a7a3fd70202782a7233510609ce42f92525 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Sun, 13 Oct 2013 20:31:41 +1300 Subject: [PATCH] -Documentation --- .../Converters/JsonValueConverter.cs | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Src/Newtonsoft.Json/Converters/JsonValueConverter.cs b/Src/Newtonsoft.Json/Converters/JsonValueConverter.cs index c87a8d40..bea7b691 100644 --- a/Src/Newtonsoft.Json/Converters/JsonValueConverter.cs +++ b/Src/Newtonsoft.Json/Converters/JsonValueConverter.cs @@ -33,8 +33,17 @@ using Windows.Data.Json; namespace Newtonsoft.Json.Converters { + /// + /// Converts a to and from JSON. + /// public class JsonValueConverter : JsonConverter { + /// + /// Writes the JSON representation of the object. + /// + /// The to write to. + /// The value. + /// The calling serializer. public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) { WriteJsonValue(writer, (IJsonValue)value); @@ -99,6 +108,14 @@ namespace Newtonsoft.Json.Converters } } + /// + /// Reads the JSON representation of the object. + /// + /// The to read from. + /// Type of the object. + /// The existing value of object being read. + /// The calling serializer. + /// The object value. public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { if (reader.TokenType == JsonToken.None) @@ -191,6 +208,13 @@ namespace Newtonsoft.Json.Converters throw JsonSerializationException.Create(reader, "Unexpected end."); } + /// + /// Determines whether this instance can convert the specified object type. + /// + /// Type of the object. + /// + /// true if this instance can convert the specified object type; otherwise, false. + /// public override bool CanConvert(Type objectType) { return typeof(IJsonValue).IsAssignableFrom(objectType);