Changelog
All notable changes to this package will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
[3.1.2] - 2024-07-23
Add version 3.1.2 by name.Changed
- Updated
com.unity.collections
to version2.4.2
. - Updated minimum Unity version to
2022.3
.
Fixed
- Fixed the way type names are exported to ensure that they can be correctly retrieved using
Type.GetType()
.
[3.1.1] - 2023-05-10
Add version 3.1.1 by name.Changed
- Updated
com.unity.collections
to version2.1.4
.
[3.1.0] - 2023-04-26
Add version 3.1.0 by name.Added
- Added
JsonSerializationParameters.StringEscapeHandling
to optionally disable escape character handling. The default value is true.
Changed
- Updated
com.unity.collections
to version2.1.2
. - Updated
JsonSerialization
to allow primitive and string types to be adapted usingIJsonAdapter{T}
.
Removed
- Removed dependency on
com.unity.test-framework.performance
.
[3.0.0-pre.3] - 2023-04-12
Add version 3.0.0-pre.3 by name.Changed
- Updated
com.unity.test-framework.performance
to version3.0.0-pre.1
.
[3.0.0-pre.2] - 2023-02-01
Add version 3.0.0-pre.2 by name.Fixed
- Fixed tokenization error when reading strings ending with escape character.
[3.0.0-pre.1] - 2022-11-16
Add version 3.0.0-pre.1 by name.Changed
- Updated minimum Unity version to
2022.2
. - Updated
com.unity.collections
to version2.1.0-pre.2
. - Removed dependency on
com.unity.jobs
. - Removed dependency on
com.unity.properties
.
Added
- Added
JsonSerializationParameters.Indent
to optionally provide a custom indent. - Added
JsonSerializationParameters.DisableValidation
to optionally disable the validation pass. - Added
SerializedObjectReader.RequiresExplicitExceptionHandling
to allow disabling exceptions when the reader is run from job threads.
Fixed
- Fixed SJSON validation errors.
[2.1.1] - 2022-09-29
Add version 2.1.1 by name.Changed
- Removed
[NotBurstCompatible]
and[BurstCompatible]
attributes to support newer versions of collections.
[2.1.0] - 2022-08-12
Add version 2.1.0 by name.Added
- Added
SerializedObjectReader.SetSource
method to allow re-use of the same instance. - Added
FixedString
support for allSerializedViews
.
Changed
- Updated
com.unity.properties
to version2.1.0-exp.2
. - Updated
com.unity.collections
to version1.4.0
. - Updated
com.unity.burst
to version1.7.2
. - Updated
com.unity.jobs
to version0.70.0-preview.7
. - Updated
SerializedObjectReader
to be fully burst compatible.- Important change All existing burst compiled methods and jobs were removed from the reader and instead it is up to user code to add burst or jobs.
[2.0.0] - 2022-06-14
Add version 2.0.0 by name.Added
- Added
SerializeValue
API forSerializationContext
objects for serialization re-entry. - Added
DeserializeValue
API forSerializationContext
objects for serialization re-entry. - JSON serialization now supports simple json validation as an option.
- Added
JsonWriter.WriteValue
override for bool values. JsonSerialization.ToJson
supports serializingSerializedObjectView
andSerializedArrayView
.
Changed
- Updated minimum Unity version to
2021.3
. - Updated
com.unity.properties
to version2.0.0-exp.13
. - Updated
com.unity.collections
to version1.1.0
. - Updated
com.unity.burst
to version1.6.1
. - Updated
com.unity.jobs
to version0.11.0-preview.6
. - Updated
com.unity.test-framework.performance
to version2.8.0-preview
. - Breaking change
IJsonAdapter
now pass a context object (JsonSerializationContext
andJsonDeserializationContext
). These context objects provide access to the underlying writer or serialized views. - Breaking change
IBinaryAdapter
now pass a context object (BinarySerializationContext
andBinaryDeserializationContext
). These context objects provide access to the underlying writer or reader.
Fixed
- Fixed an issue where
BinarySerialization
was keeping serialized references until the nextToBinary
call. - Fixed an issue where
JsonSerialization
validation was not detecting open scopes at the end of a stream. - JSON serialization now properly adds escape characters to
char
value\0
.
[1.7.0] - 2021-02-26
Add version 1.7.0 by name.Changed
- Updated
com.unity.properties
to version1.7.0-preview
.
[1.6.2] - 2020-12-03
Add version 1.6.2 by name.Fixed
- Fixed a regression causing
object
fields with bool values to be serialized as a quoted string.
Removed
- Breaking change
JsonStringBuffer
has been removed.JsonWriter
should be used instead.
[1.6.1] - 2020-10-22
Add version 1.6.1 by name.Fixed
- Fixed internal API compatibility with
FixedString
.
[1.6.0] - 2020-10-07
Add version 1.6.0 by name.Changed
- Updated minimum Unity version to
2020.1
. - Update
com.unity.burst
to version1.3.5
. - Update
com.unity.collections
to version0.12.0-preview.13
. - Update
com.unity.jobs
to version0.5.0-preview.14
. - Update
com.unity.properties
to version1.6.0-preview
. - Update
com.unity.test-framework.performance
to version2.3.1-preview
.
Added
- Added low level
JsonWriter
class which can be used as a forward only JSON writer. - Added binary serialization support for
System.Guid
,System.DateTime
,System.TimeSpan
,System.Version
,System.IO.FileInfo
,System.IO.DirectoryInfo
,UnityEditor.GUID
,UnityEditor.GlobalObjectId
.
[1.5.0] - 2020-08-21
Add version 1.5.0 by name.Added
- Added unsafe constructor overload to
SerializedObjectReader
that takeschar*
and length.
Changed
- Enabled minimal support for
NET_DOTS
. Low level tokenization and parsing is now available. - Updated
com.unity.properties
to version1.5.0-preview
.
[1.4.3] - 2020-08-04
Add version 1.4.3 by name.Changed
- Update
com.unity.properties
to version1.4.3-preview
.
Added
- Added built-in support for serialize/deserialize
System.Version
in Json.
[1.4.2] - 2020-08-03
Add version 1.4.2 by name.Changed
- Update
com.unity.properties
to version1.4.2-preview
.
[1.4.1] - 2020-07-31
Add version 1.4.1 by name.Changed
- Update
com.unity.properties
to version1.4.1-preview
.
[1.4.0] - 2020-07-30
Add version 1.4.0 by name.Changed
- Update
com.unity.properties
to version1.4.0-preview
.
[1.3.1] - 2020-06-11
Add version 1.3.1 by name.Changed
- Update
com.unity.properties
to version1.3.1-preview
.
[1.3.0] - 2020-05-13
Add version 1.3.0 by name.Added
- Added
UserData
parameter toJsonSerializationParameters
which can be retrieved during migration inJsonMigrationContext
.
Changed
- Update
com.unity.properties
to version1.3.0-preview
.
[1.2.0] - 2020-04-03
Add version 1.2.0 by name.Changed
- Update
com.unity.properties
to version1.2.0-preview
.
Fixed
- Fix binary deserialization to correctly ignore properties marked with
[DontSerialize]
or[NonSerialized]
.
Added
- Added
Minified
option toJsonSerializationParameters
. - Added
Simplified
option toJsonSerializationParameters
.
[1.1.1] - 2020-03-20
Add version 1.1.1 by name.Changed
- Update
com.unity.properties
to version1.1.1-preview
.
Fixed
- Fix JSON deserialization of polymorphic array types.
[1.1.0] - 2020-03-11
Add version 1.1.0 by name.Changed
- Update
com.unity.properties
to version1.1.0-preview
.
Fixed
- Fix exception thrown when encountering null
FileInfo
orDirectoryInfo
during JSON serialization.
Added
- Added built-in support to serialize/deserialize
LazyLoadReference
in editor. Not supported at runtime.
[1.0.0] - 2020-03-02
Add version 1.0.0 by name.Changed
- Breaking change Complete API overhaul, see the package documentation for details.
[0.6.3] - 2019-11-08
Add version 0.6.3 by name.Changed
- Updated
com.unity.properties
to version0.10.3-preview
.
[0.6.2] - 2019-11-05
Add version 0.6.2 by name.Changed
- Updated
com.unity.properties
to version0.10.1-preview
.
Fixed
- Reference type values set to
null
will now serialize asnull
instead of{}
.
[0.6.1] - 2019-10-25
Add version 0.6.1 by name.Fixed
- Fixed a major serialization regression for
UnityEngine.Object
derived objects.
[0.6.0] - 2019-10-25
Add version 0.6.0 by name.Changed
- Breaking change
JsonSerialization.Deserialize
will now return a disposableVisitResult
containing logs, errors and exceptions that occurred during deserialization. - Updated
com.unity.properties
to version0.10.0-preview
.
Added
- Support JSON serialization of
System.DateTime
andSystem.TimeSpan
.
[0.5.1] - 2019-10-21
Add version 0.5.1 by name.Added
- Support JSON serialization of
UnityEditor.GlobalObjectId
. - Support JSON serialization of
UnityEditor.GUID
. - New method
DeserializeFromStream
to deserialize from stream object.
Changed
- Updated
com.unity.properties
to version0.9.1-preview
. - Deserialization will now attempt to construct the destination container using
PropertyContainer.Construct
utility. - Deserialization will now attempt to read type information field
$type
by default.
[0.5.0] - 2019-10-07
Add version 0.5.0 by name.Changed
- Updated
com.unity.properties
to version0.9.0-preview
.
[0.4.1] - 2019-09-25
Add version 0.4.1 by name.Changed
- Updated
com.unity.properties
to version0.8.1-preview
.
[0.4.0] - 2019-09-24
Add version 0.4.0 by name.Added
- Support JSON serialization of
UnityEngine.Object
.
Changed
- Now requires Unity 2019.3 minimum.
- Now requires
com.unity.properties
version0.8.0-preview
.
[0.3.1] - 2019-09-16
Add version 0.3.1 by name.Added
- Support JSON serialization of
DirectoryInfo
andFileInfo
using string as underlying type.
[0.3.0] - 2019-08-28
Add version 0.3.0 by name.Changed
- Updated
com.unity.properties
to version0.7.1-preview
. - Support JSON serialization of enums using numeric integral types as underlying type.
[0.2.1] - 2019-08-08
Add version 0.2.1 by name.Changed
- Support for Unity 2019.1.
[0.2.0] - 2019-08-06
Add version 0.2.0 by name.Changed
JsonVisitor
virtual methodGetTypeInfo
now provides the property, container and value parameters to help with type resolution.
[0.1.0] - 2019-07-22
Add version 0.1.0 by name.- This is the first release of Unity.Serialization.