All Versions
1
Latest Version
Avg Release Cycle
-
Latest Release
2659 days ago
Changelog History
Changelog History
-
v4.0 Changes
February 27, 2019Major Changes
- 0๏ธโฃ Public properties are now also serialized by default!
- The default value for
config.DefaultTargetshas changed fromPublicFieldstoAllPublic
- The default value for
- TypeConfig:
- Fluent syntax:
config.ConfigType<MyClass>()/.ConfigType(type) - Easily config types without attributes
config.OnConfigNewTypeto handle new types (like generics, or also private types)- Set a custom
IFormatter<>orIFormatterResolver - Specify how to construct a class
[CerasConstructorAttribute]or.ConfigType<Thing>().ConstructBy(() => new Thing(x, y));- Any function can be used! (Many Examples)
- Automatically maps fields/props to arguments by matching the names
- You can also map arguments yourself
config.ConfigType<MyClass>().MapParameters(...);
- Fluent syntax:
- Debug Report
- For when you're not sure if/why some field/prop got included or not
- Use
ceras.GenerateSerializationDebugReport(type)to get a report explaining how Ceras will handle the given type, contains information about the used formatter, serialized members, and reasons for inclusion/exclusion.
- Support for Unity IL2CPP and other AoT platforms
- ๐ Full built-in support for ExpressionTrees!
- Ceras can fully serialize and deserialize everything in
System.Linq.Expressionsnow!
- Ceras can fully serialize and deserialize everything in
- ๐ Built-in support for:
System.Collections.Immutable.*through an extension nuget packageStack<>,Queue<>System.Drawing.BitmapandColorBigIntegerBitArray,DateTimeOffset,Uri
- Static Serialization!
- Easy API
ceras.Advanced.SerializeStatic(typeof(YourClassHere)); - TypeConfig works with static as well:
config.ConfigStaticType(typeof(StaticClassTest)) - Doesn't have to be a static class, you can also configure the static fields of a normal class
- API will be extended in future versions (since it's still a "preview feature")
- Easy API
โ Additional Changes
SimpleTypeBinder.CustomSearchAssembliescan now be used to specify additional assemblies that should be searched to resolve types- You can set
CerasBufferPool.Poolto customize how Ceras allocates and discards serialization buffers - ๐ Ceras now uses "capacity-constructors" for all supported types (like
new List<int>(knownSize)) - Attributes for your own
IFormatter<>implementations: [CerasInject] and [CerasNoInject] GetFormatterResolver<>()to obtain one of Ceras' internal resolvers, can be used to force usage of a specific resolver to handle some type.- ๐ New super-fast formatter:
ReinterpretFormatter<T>, used by default for all blittable types - โ Adding a type multiple times to KnownTypes will now tell you which types appear multiple times
VerifySizessetting for VersionTolerance, and many general improvements to version tolerance- Option to serialize instance delegates
- EnumAsStringFormatter
[Ignore]renamed to[Exclude]
Downloads
- ๐ฆ NuGet
- ๐ AppVeyor CI - .zip for each platform (
.dll,.pdb, and.xml)
Any feedback is always greatly appreciated! ๐
- 0๏ธโฃ Public properties are now also serialized by default!