Skip to content

Releases: JamesNK/Newtonsoft.Json

4.0.1

03 Nov 18:36
Compare
Choose a tag to compare
  • New feature - Added Windows Phone 7 project
  • New feature - Added dynamic support to LINQ to JSON
  • New feature - Added dynamic support to serializer
  • New feature - Added INotifyCollectionChanged to JContainer in .NET 4 build
  • New feature - Added ReadAsDateTimeOffset to JsonReader
  • New feature - Added ReadAsDecimal to JsonReader
  • New feature - Added covariance to IJEnumerable type parameter
  • New feature - Added XmlSerializer style Specified property support
  • New feature - Added support for deserializing to JToken
  • New feature - Added CamelCaseText flag to StringEnumConverter
  • New feature - Added WriteArrayAttribute to XmlNodeConverter to include an attribute to help round tripping JSON and XML
  • New feature - Added OmitRootObject to XmlNodeConverter to skip writing the root JSON object when converting XML
  • New feature - Added DeepClone and ICloneable implementation to JToken
  • New feature - Added JSON schema PatternProperties, ExclusiveMinimum and ExclusiveMaximum for JSON schema spec 3
  • New feature - Added .NET 3.5 project
  • Change - Updated source code to VS2010
  • Change - Updated main project to .NET 4
  • Change – Updated Silverlight project to Silverlight 4
  • Change - ICustomTypeDescriptor implementation moved to JObject
  • Change - Improved error message when converting JSON with an empty property to XML
  • Change - JSON schema Required replaced with Optional, as defined in JSON schema spec 3
  • Change - JSON schema MaxDecimals replaced with DivisibleBy, as defined in JSON schema spec 3
  • Remove - Compact Framework project removed. Compact Framework is not supported in VS2010
  • Remove - JTypeDescriptionProvider and JTypeDesciptor removed
  • Fix - BSON writing of binary values fixed. Added JsonNet35BinaryCompatibility flag for reading existing incorrect BSON binary values
  • Fix - Timezone information no longer lost when deserializing DateTimeOffsets
  • Fix – Decimal precision no longer lost when deserializing decimals
  • Fix - SelectToken no longer skips the last project name when it is a single character
  • Fix – Deserializing structs correctly set when reusing existing values is true
  • Fix – Private getter/setters on base classes are now correctly accessible
  • Fix – Nullable structs correctly deserialize
  • Fix - JSON Schema option label now written correctly
  • Fix – Deserializing a DataSet when it is a property of another object no longer breaks
  • Fix - JToken Load and Parse methods now check that content is complete

3.5.8

03 Nov 18:39
Compare
Choose a tag to compare
  • New feature - Added TypeNameHandling.Auto to automatically write the type name when a value doesn't match the declared type
  • New feature - Added CLSCompliant attributes
  • New feature - Added Required.Always attribute validation when writing JSON
  • New feature - Added DateTimeKindHandling to BsonWriter to control how a DateTime is converted prior to being serialized
  • New feature - Added SerializeCompilerGeneratedMembers to DefaultContractResolver to control serializing compiler generated fields
  • Change - Improved OverflowException message for integer values larger than an Int64
  • Change - Added interfaces, structs and enums as valid targets of JsonConverterAttribute
  • Change - Added structs as a valid target of JsonObjectAttribute
  • Change - Improved default null and value handing when JSON value is not compatible with property value
  • Change - Serialization attributes now supported in .NET 2.0
  • Change - HtmlColorConverter and System.Drawing.dll dependency removed
  • Fix - Fix reading hexadecimal numbers that contain an e
  • Fix - Generic simple type names no longer include full qualified assembly information for nested generate types
  • Fix - Corrected culture invariance issues
  • Fix - Correct incorrect BSON string reading for multi-byte characters
  • Fix - Fix error when converting a JValue to a compatible type
  • Fix - Fix security exception when generating simple type names on Silverlight
  • Fix - JsonProperty now inherited on overriden properties
  • Fix - JTokenReader.ReadAsBytes no longer errors when reading null token value

3.5.7

03 Nov 18:40
Compare
Choose a tag to compare
  • New feature - Improved BSON performance
  • New feature - Added WriteOid and WriteRegex to BsonWriter
  • New feature - Added support for ShouldSerialize conditional methods
  • New feature - Added TypeNameHandling to JsonProperty attribute. Allows a type names to be included on an individual property basis
  • New feature - Support for reading octal and hexadecimal numbers from JSON
  • New feature - Added support for enum values to LINQ to JSON
  • New feature - Added TypeNameAssemblyFormat property to JsonSerializer
  • New feature - Added DateTimeConverterBase
  • New feature - Added JsonPrimitiveContract and JsonLinqContract
  • New feature - Added CreateMemberValueProvider method to DefaultContractResolver
  • New feature - INotifyCollectionChanged implemented on JContainer in Silverlight
  • New feature - Included BSON in .NET 2.0, Silverlight and Compact Framework builds
  • New feature - Added ReadRootValueAsArray, DateTimeKindHandling properties to BsonReader
  • New feature - ISerializable support
  • New feature - Added GetSchema, CanRead, CanWrite to JsonConverter
  • New feature - LINQ to XML support added to XmlNodeConverter
  • New feature - SerializeXNode, DeserializeXNode methods added to JsonConvert
  • New feature - Added support for sharing a static cache for contract resolvers inheriting from DefaultControlResolver
  • New feature - Added support for switching between dynamic and late bound reflection for medium trust environments
  • New feature - Support for using implicit/explicit casts when converting a JSON property name to a dictionary value
  • Change – JsonConverter.ReadJson method is now passed the existing value of the property it is converting
  • Change - Built in JsonConverters are resolved once when the contract is created rather than runtime
  • Change - JsonRaw removed and replaced with JRaw
  • Change - Type is now always written as AssemblyQualifiedName
  • Change - Dictionary key serialization falls back to ToString for keys
  • Change - Schema generator now uses JsonContracts to determine schema information
  • Change - Removed the "-" prefix when serializing a JSON constructor - prefix not compatible with XML naming standard
  • Change - When converting JSON to XML using XmlNodeConverter, changed special JSON properties ($id, $ref, $type) to be attributes rather than child elements
  • Fix - Fix dynamic code generation IL verification issues in .NET 4
  • Fix - Fix error when deserializing nullable array
  • Fix - Escape JSON property text
  • Fix - Silverlight serialization security error
  • Fix - Private base members marked with JsonProperty attribute now correctly serialized
  • Fix - Error message when attempting to deserialize custom dictionary with no default constructor
  • Fix - Correctly deserialize empty BSON objects
  • Fix - When a class has a metadata class defined, fall back the original class from the metadata class when attribute not found
  • Fix - Deserialize HashSet without error
  • Fix - Correctly skip ignored JSON properties when deserializing via a non-default constructor
  • Fix - Schema with no properties now correctly validates
  • Fix - Dictionary and array schemas now marked as nullable
  • Fix - Serialize generic dictionary that doesn't implement IDictionary correctly
  • Fix - CustomCreationConverter no longer errors when writing JSON
  • Fix - JsonProperty.Readable and Writable not being correctly set for .NET properties with modified getter/setter visibility
  • Fix - Fix error caused by private properties on a base class when reflecting a type
  • Fix - Correct property CanRead and CanWrite coming back as false when a base class property has a private getter/setter visibility
  • Fix - Fix reading BSON multi byte UTF8 characters
  • Fix - CustomCreationConverter to return null when converting a null JSON value
  • Fix - Fix for possible errors caused by mutable GetHashCode implementations and reference tracking
  • Fix - Fix JTokenReader.ReadAsBytes to read strings as base64 data

3.5.6

03 Nov 18:41
Compare
Choose a tag to compare
  • New feature - Added reading and writing binary JSON (BSON) support via BsonReader, BsonWriter
  • New feature - Added support for reading and writing byte arrays to JsonReader, JsonWriter and LINQ to JSON classes
  • New feature - Added ReadAsBytes to JsonReader
  • New feature - Added DataSetConverter, DataTableConverter
  • New feature - Added JPath and SelectToken to JToken
  • New feature - Added ObjectCreationHandling to JsonPropertyAttribute
  • New feature - Added IValueProvider, ReflectionValueProvider, DynamicValueProvider
  • New feature - Added serialization event support to Silverlight version
  • New feature - Added DBNull support to JValue
  • Change - Removed dependency on Entity Framework, LINQ to SQL and data annotations assemblies
  • Change - Upgraded Silverlight project to Silverlight 3
  • Change - Changed IsRequired to Required enum on JsonPropertyAttribute with options Default, AllowNull and Always
  • Change - Change converter to be resolved from new Converter property on JsonProperty
  • Change - Improved error message when JSON array encountered for object and vice-versa when deserializing
  • Change - Improved error message for converting types when deserializing
  • Change - Improved error message from getting and setting properties when serializing and deserializing
  • Change - Class converter now resolved from contract
  • Change - Built in serializers now resolved when contract is created
  • Change - JsonRaw removed and replaced with JRaw
  • Fix - Schema id not being written for collections
  • Fix - TimeSpan serialization incorrect on Compact Framework
  • Fix - Unicode line break string encoding when writing JSON
  • Fix - Empty string being incorrectly converted to null when deserializing
  • Fix - Unclosed object when including type name with array
  • Fix - Serializing objects with generic methods failing on Compact Framework
  • Fix - Remove DateTimeOffset stand-in from Compact Framework build
  • Fix - Modified .NET 2.0 build to run on environments without .NET 2.0 SP1
  • Fix - Changed deserialization to always use a new value created from a JsonConverter
  • Fix - XmlNodeConverter not converting comments in JSON
  • Fix - ToString culture inconsistency when serializing dictionary key
  • Fix - JTokenWriter not writing comments
  • Fix - Properties on existing derived objects not being populated during deserialization

3.5.5

03 Nov 18:41
Compare
Choose a tag to compare
  • New feature - Added .NET 2.0 support
  • New feature - Added serialization error handling via Error event on JsonSerializer and OnErrorAttribute
  • New feature - Added implicit conversions from primitive values to JValue
  • New feature - Added type descriptor objects to support LINQ to JSON databinding
  • New feature - Added ITypedList and IBindingList to JContainer
  • New feature - Added INotifyPropertyChanging and INotifyPropertyChanged to JObject
  • New feature - Added ConstructorHandling to allow object creation using non-public default constructors
  • New feature - Added roundtrip ADO.NET Entities serialization and deserialization
  • New feature - Added set indexer to JToken
  • Change - IsRequired now accepts null properties
  • Change - JsonSerializer now creates JObject/JArray when deserializing complex JSON to an object type
  • Change - Empty string to be deserialized as null for nullable types
  • Change - CloneNode on JToken renamed to CloneToken
  • Change - JProperty constructor that doesn't take a value made internal
  • Fix - Schema generation with negative enum values
  • Fix - Exception when loading JObject with multiple properties of the same name. Last property will be used
  • Fix - Exception when deserializing null value to List<Nullable>
  • Fix - Generic type deserialization with type name tracking enabled

3.5.4

03 Nov 18:45
Compare
Choose a tag to compare
  • New feature - Added StringEnumConverter to convert enum values to and from their string name rather than number value
  • New feature - Added BinaryConverter which converts byte array's, Binary and SqlBinary values to and from base64 text.
  • New feature - Added NullValueHandling, DefaultValueHandling and ReferenceLoopHandling to JsonPropertyAttribute
  • New feature - Added MetadataTypeAttribute support when searching for attributes
  • New feature - JsonSerializer now looks for DataContractAttribute and DataMemberAttribute on a type
  • New feature - Now able to explicitly serialize private members when marked up with JsonPropertyAttribute or DataMemberAttribute
  • New feature - Added CustomCreationConverter. Used to customize creation of an object before the serializer populates values
  • New feature - Added Populate method to JsonSerializer. Pass existing object to serializer and have current object's values populated onto it
  • New feature - Added IsReference to JsonContainerAttribute and JsonPropertyAttribute
  • New feature - Added PreserveReferencesHandling to JsonSerializer
  • New feature - Added IReferenceResolver (replacing IMappingResolver) to JsonSerializer
  • New feature - JsonObjectAttribute will now force a collection class to be serialized as an object
  • New feature - Added JsonContract, JsonObjectContract, JsonArrayContract and JsonDictionaryContract
  • New feature - Added support for OnSerializing, OnSerialized, OnDeserializing, OnDeserialized callback methods
  • Change - Rename JsonTokenReader, JsonTokenWriter, JsonTokenType to JTokenReader, JTokenWriter, JTokenType
  • Change - DefaultDateTimeFormat on IsoDateTimeConverter no longer displays milliseconds zeros
  • Change - JObject now enumerates over KeyValuePair<string, JToken> rather than JToken
  • Change - Moved serialize stack used to check for reference loops from JsonWriter (yuck) to JsonSerializerWriter (yay)
  • Change - Renamed JsonMemberMapping to JsonProperty
  • Fix - JToken now successfully casts to a float or decimal value
  • Fix - Serializer now handles comments encountered in JSON while deserializing
  • Fix - Fixed (hopefully) cache threading issues
  • Fix - Uri objects are now correctly serizlized on Silverlight/Compact Framework
  • Fix - Whole decimals will now always be written with a decimal place

3.5.3

03 Nov 18:46
Compare
Choose a tag to compare
  • New feature - Added IMappingResolver interface and DefaultMappingResolver class. IMappingResolver property added to JsonSerializer, JsonSerializerSettings, JsonSchemaGenerator
  • New feature - Added CamelCaseMappingResolver
  • New feature - Added DeserializeNode overload to JsonConvert that allows a root element to be added to the XML
  • New feature - Added support for deserializing to IEnumerable, ICollection, IList and IDictionary<TKey, TValue> members
  • New feature – Deserializer will now populate an object’s members with unused values after creating an object from a non-default constructor
  • New feature - Deserializer now attempts a case insensitive match to a member if the exact case match fails
  • New feature - Added a ToString(Formatting, JsonConverters[]) overload to JToken
  • New feature - Added AddAfterSelf, AddBeforeSelf methods to JToken
  • Change - JsonSerializer now ignores missing members by default
  • Fix - Made the error message when attempting to deserialize to an interface or abstract class clearer
  • Fix - Fixed the whitespace issues when writing a raw JValue token
  • Fix - XmlNodeConverter now handles nested arrays when converting JSON to XML
  • Fix - Ensure JavaScriptDateTimeConverter converts nullable DateTime members
  • Fix - Fix possible thread safety issues by adding double check locking to static reflection cache

3.5.2

03 Nov 18:47
Compare
Choose a tag to compare
  • New feature - Added JSON Schema implementation
  • New feature - Added IJsonLineInfo. Implemented by JsonTextReader, JsonTokenReader, JsonValidatingReader, JToken
  • New feature - Added line details to JsonTextReader exception messages and JsonValidatingReader errors
  • New feature - Added JsonContainerAttribute with Id, Title and Description members. JsonObject and JsonArray inherit from this attribute
  • New feature - Added JsonArrayAttribute. Has flag to control whether array can contain null items
  • New feature - Added IsRequired to JsonProperty
  • New feature - Added Load(JsonReader) to JProperty, JConstructor
  • New feature - Added the ability for JsonTokenWriter to write individual values as well as arrays and objects
  • New feature - Added CreateReader to JToken
  • New feature - Added FromObject to JToken
  • New feature - Added ReadFrom to JToken
  • Change - Renamed JavaScriptConvert to JsonConvert
  • Change - Value on JObject supports getting nullable values
  • Change - Type values now serialize and deserialize to the type name string
  • Change - GetSerializableMembers has been removed and replaced with GetMemberMappings on JsonSerializer
  • Fix - JsonConvert now always write a floating point number with a decimal place
  • Fix - JsonSerializer now correctly skips missing members
  • Fix - JsonWriter now allows objects and arrays to be written in a constructor
  • Fix - QuoteChar not getting set when parsing property name
  • Fix - JProperty now correctly loads content from a collection

3.5.1

03 Nov 18:49
Compare
Choose a tag to compare
  • New feature - Compact framework support
  • New feature - Big serializer performance improvements through caching of static type data
  • New feature - Added DefaultValueHandling option to JsonSerializer
  • New feature - JsonSerializer better supports deserializing into ICollection objects
  • New feature - Added JsonSerializerSettings class along with overloads to JavaScriptConvert serialize/deserialize methods
  • New feature - IsoDateTimeConverter and JavaScriptDateTimeConverter now support nullable DateTimes
  • New feature - Added JsonWriter.WriteValue overloads for nullable types
  • New feature - Newtonsoft.Json.dll is now signed
  • New feature - Much better support for reading, writing and serializing raw JSON
  • New feature - Added JsonWriter.WriteRawValue
  • Change - Renamed Identifier to JsonRaw
  • Change - JSON date constructors deserialize to a date
  • Fix - JavaScriptConvert.DeserializeObject checks for addition content after deserializing an object
  • Fix - Changed JsonSerializer.Deserialize to take a TextReader instead of a StringReader
  • Fix - Changed JsonTextWriter.WriteValue(string) to write null instead of an empty string for a null value
  • Fix - JsonWriter.WriteValue(object) no longer errors on a null value
  • Fix - Corrected JContainer child ordering when adding multi values

3.0.1

03 Nov 18:50
Compare
Choose a tag to compare
  • New feature - Silverlight Json.NET build.
  • New feature - JObject now implements IDictionary, JArray now implements IList.
  • New feature - Added JsonConverterAttribute. Used to define a JsonConverter to serialize a class or member. Can be placed on classes or fields and properties.
  • New feature - Added DateTimeFormat to IsoDateTimeConverter to customize date format.
  • New feature - Added WriteValue(object) overload to JsonWriter.
  • New feature - Added JTokenEqualityComparer.
  • New feature - Added IJEnumerable. JEnumerable and JToken now both implement IJEnumerable.
  • New feature - Added AsJEnumerable extension method.
  • Change - JsonSerializer does a case insensitive compare when matching property names and constructor params.
  • Change - JObject properties must have a unique name.
  • Bug fix - Internal string buffer properly resizes when parsing long JSON documents.
  • Bug fix - JsonWriter no longer errors in certain conditions when writing a JsonReader's position.
  • Bug fix - JsonSerializer skips multi-token properties when putting together constructor values.
  • Bug fix - Change IConvertible conversions to use ToXXXX methods rather than casting.
  • Bug fix - GetFieldsAndProperties now properly returns a distinct list of member names for classes than have overriden abstract generic properties.