-Performance
This commit is contained in:
@@ -85,8 +85,9 @@ namespace Newtonsoft.Json.Serialization
|
||||
|
||||
private void SerializePrimitive(JsonWriter writer, object value, JsonPrimitiveContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
|
||||
{
|
||||
if (contract.UnderlyingType == typeof (byte[]))
|
||||
if (contract.TypeCode == PrimitiveTypeCode.Bytes)
|
||||
{
|
||||
// if type name handling is enabled then wrap the base64 byte string in an object with the type name
|
||||
bool includeTypeDetails = ShouldWriteType(TypeNameHandling.Objects, contract, member, containerContract, containerProperty);
|
||||
if (includeTypeDetails)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user