-Fixed missing XML documentation
-Updated custom documentation pages to use MAML
This commit is contained in:
@@ -303,5 +303,16 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
Assert.AreEqual(1.1m, orderedValues[1]);
|
||||
Assert.AreEqual(1.2d, orderedValues[2]);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void WriteSingle()
|
||||
{
|
||||
float f = 5.2f;
|
||||
JValue value = new JValue(f);
|
||||
|
||||
string json = value.ToString(Formatting.None);
|
||||
|
||||
Assert.AreEqual("5.2", json);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -116,6 +116,10 @@
|
||||
<Compile Include="Converters\ObjectIdConverterTests.cs" />
|
||||
<Compile Include="Converters\StringEnumConverterTests.cs" />
|
||||
<Compile Include="Converters\VersionConverterTests.cs" />
|
||||
<Compile Include="Documentation\ConvertingJsonAndXmlTests.cs" />
|
||||
<Compile Include="Documentation\ReadingAndWritingJsonTests.cs" />
|
||||
<Compile Include="Documentation\LinqToJsonTests.cs" />
|
||||
<Compile Include="Documentation\SerializationTests.cs" />
|
||||
<Compile Include="FileSystemEntityModel.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
|
||||
@@ -72,5 +72,5 @@ using System.Security;
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("4.5.0.0")]
|
||||
#if !PocketPC
|
||||
[assembly: AssemblyFileVersion("4.5.7.15115")]
|
||||
[assembly: AssemblyFileVersion("4.5.7.15121")]
|
||||
#endif
|
||||
|
||||
@@ -464,7 +464,7 @@ namespace Newtonsoft.Json.Bson
|
||||
/// <summary>
|
||||
/// Writes a <see cref="T:Byte[]"/> value that represents a BSON object id.
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <param name="value">The Object ID value to write.</param>
|
||||
public void WriteObjectId(byte[] value)
|
||||
{
|
||||
ValidationUtils.ArgumentNotNull(value, "value");
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace Newtonsoft.Json.Converters
|
||||
/// <summary>
|
||||
/// Create a custom object
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <typeparam name="T">The object type to convert.</typeparam>
|
||||
public abstract class CustomCreationConverter<T> : JsonConverter
|
||||
{
|
||||
/// <summary>
|
||||
@@ -70,7 +70,7 @@ namespace Newtonsoft.Json.Converters
|
||||
/// Creates an object which will then be populated by the serializer.
|
||||
/// </summary>
|
||||
/// <param name="objectType">Type of the object.</param>
|
||||
/// <returns></returns>
|
||||
/// <returns>The created object.</returns>
|
||||
public abstract T Create(Type objectType);
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -37,9 +37,6 @@ using System.Linq;
|
||||
|
||||
namespace Newtonsoft.Json.Converters
|
||||
{
|
||||
/// <summary>
|
||||
/// Converts an <see cref="Enum"/> to and from its name string value.
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Converts an <see cref="Enum"/> to and from its name string value.
|
||||
/// </summary>
|
||||
|
||||
@@ -1167,6 +1167,7 @@ namespace Newtonsoft.Json.Linq
|
||||
/// <summary>
|
||||
/// Creates the specified .NET type from the <see cref="JToken"/>.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The object type that the token will be deserialized to.</typeparam>
|
||||
/// <returns>The new object created from the JSON value.</returns>
|
||||
public T ToObject<T>()
|
||||
{
|
||||
@@ -1176,6 +1177,7 @@ namespace Newtonsoft.Json.Linq
|
||||
/// <summary>
|
||||
/// Creates the specified .NET type from the <see cref="JToken"/> using the specified <see cref="JsonSerializer"/>.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The object type that the token will be deserialized to.</typeparam>
|
||||
/// <param name="jsonSerializer">The <see cref="JsonSerializer"/> that will be used when creating the object.</param>
|
||||
/// <returns>The new object created from the JSON value.</returns>
|
||||
public T ToObject<T>(JsonSerializer jsonSerializer)
|
||||
|
||||
@@ -85,6 +85,15 @@ namespace Newtonsoft.Json.Linq
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="JValue"/> class with the given value.
|
||||
/// </summary>
|
||||
/// <param name="value">The value.</param>
|
||||
public JValue(float value)
|
||||
: this(value, JTokenType.Float)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="JValue"/> class with the given value.
|
||||
/// </summary>
|
||||
@@ -531,7 +540,10 @@ namespace Newtonsoft.Json.Linq
|
||||
writer.WriteValue(Convert.ToInt64(_value, CultureInfo.InvariantCulture));
|
||||
return;
|
||||
case JTokenType.Float:
|
||||
writer.WriteValue(Convert.ToDouble(_value, CultureInfo.InvariantCulture));
|
||||
if (_value is float)
|
||||
writer.WriteValue(_value);
|
||||
else
|
||||
writer.WriteValue(Convert.ToDouble(_value, CultureInfo.InvariantCulture));
|
||||
return;
|
||||
case JTokenType.String:
|
||||
writer.WriteValue((_value != null) ? _value.ToString() : null);
|
||||
|
||||
@@ -90,7 +90,7 @@ using System.Security;
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("4.5.0.0")]
|
||||
#if !PocketPC
|
||||
[assembly: AssemblyFileVersion("4.5.7.15115")]
|
||||
[assembly: AssemblyFileVersion("4.5.7.15121")]
|
||||
#endif
|
||||
|
||||
[assembly: CLSCompliant(true)]
|
||||
|
||||
@@ -486,7 +486,7 @@ namespace Newtonsoft.Json.Serialization
|
||||
/// Resolves the default <see cref="JsonConverter" /> for the contract.
|
||||
/// </summary>
|
||||
/// <param name="objectType">Type of the object.</param>
|
||||
/// <returns></returns>
|
||||
/// <returns>The contract's default <see cref="JsonConverter" />.</returns>
|
||||
protected virtual JsonConverter ResolveContractConverter(Type objectType)
|
||||
{
|
||||
return JsonTypeReflector.GetJsonConverter(objectType.GetCustomAttributeProvider(), objectType);
|
||||
|
||||
@@ -28,5 +28,6 @@ namespace Newtonsoft.Json.Serialization
|
||||
/// <summary>
|
||||
/// Represents a method that constructs an object.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The object type to create.</typeparam>
|
||||
public delegate object ObjectConstructor<T>(params object[] args);
|
||||
}
|
||||
Reference in New Issue
Block a user