This repository was archived by the owner on Jul 8, 2020. It is now read-only.
Releases: Blacksmoke16/CrSerializer
Releases · Blacksmoke16/CrSerializer
Some Bug Fixes
Refactor
- Refactors the syntax to use a more individual annotation approach
- Abstracts the logic to support the same annotations for various formats
- Adds some additional features like exclusion strategies
Compiler bug fix
Bug Fixes
- Fixes an issue related to the compiler bug crystal-lang/crystal#7960 resulting from some removing some leftover testing code in last release.
Better handle readonly properties
Bug Fixes
- Sets the ivar default value directly to avoid setter type restrictions.
Crystal 0.29.0 + Modules instead of inheritence
Bug Fixes
- Fixes some issues with the specs and updates ameba dependency to support Crystal 0.29.0
Changes
- breaking Custom assertions should now include
CrSerializer::Assertions::Assertioninstead of inheriting from it.
Fix "errors" name conflict
Bug Fixes
- breaking Fix a name conflict when a model has a property named
errorsCrSerializererrors are now accessed via.validation_errors.
Delegation + Generics
Features
Breaking Changes
- Validation methods now must be called directly on the model. No need to include the
.validator.model.valid?vsmodel.validator.valid?.
- When including
CrSerializer, a generic type must be included that determines the format that should be supported. See the docs for more info.
Fix name conflict
Bug Fixes
- Fix a name conflict when a model has a property named
groups
Fix issue with serializing structs
Bug Fixes
- Fix issue with serializing structs
Fix issue with deserializing to structs
Bug Fixes
- Structs including
CrSerializercan now correctly deserialize from json/yaml strings.