Releases: rikimaru0345/Ceras
Releases · rikimaru0345/Ceras
Ceras 4.0
Major Changes
- Public properties are now also serialized by default!
- The default value for
config.DefaultTargets
has changed fromPublicFields
toAllPublic
- The default value for
- TypeConfig:
- Fluent syntax:
config.ConfigType<MyClass>()
/.ConfigType(type)
- Easily config types without attributes
config.OnConfigNewType
to 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(...);
- Specify how to construct a class
- 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.Expressions
now!
- Ceras can fully serialize and deserialize everything in
- Built-in support for:
System.Collections.Immutable.*
through an extension nuget packageStack<>
,Queue<>
System.Drawing.Bitmap
andColor
BigInteger
BitArray
,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.CustomSearchAssemblies
can now be used to specify additional assemblies that should be searched to resolve types- You can set
CerasBufferPool.Pool
to 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
VerifySizes
setting 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
)