- #105: Support prop schemas for "*" properties by @pyrogenic
- #104: Add the
@optional
decorator to skip properties not present in the serialized object by @pyrogenic - #99: Allow
serialize
-ing plain objects by specifying constructor by @pyrogenic
- Fixed potential memory leak, fixes #95 through #100 by @svennergr
- Fixed make beforeDeserialize, afterDeserialize optional, see #94 by zeevl
- Introduced enhanced debug messages on invariant errors, see #68 by @chengjianhua
- Fixed undefined should not throw error in Arraylike object, see #58
- switched build and tests to Babel 7
- switched code compression to Terser
- Introduced beforeDeserialize and afterDeserialize lifecycle methods to support e.g. better error handling during deserialization by @1R053
- Introduced cancelDeserialize to stop async requests that get stuck, e.g. in case of unresolved waiting references by @1R053
- Added capability to deserialize arrays with empty entries by @1R053
- Fixed mapAsArray to always push elements to the serialized array by @1R053
- Introduced async ability into
custom
(de)serializer, to support asynchronous custom deserialization by @1R053 - Fixed missed typescript export of
raw
type by @VChastinet - Documentation updates by @maslade and @razetdinov
- Introduced
raw
type, to allow for complex dynamic types to be deserialized
- Improved documentation examples, see #43 by @brikou
- Fixed
class constructor cannot be invoked without 'new'
error, see #42 by @pinksquidhat - Introduced
mapAsArray
, to support maps that serialize to arrays with objects with identifiers. And vice versa. By @vonovak. See #22
- Introduced
serializr.SKIP
, the can be used to skip certain properties during deserialization when usingcustom
serializers. #32 by @nathanstitt - Fixed #27: Skip non primitive primitive properties instead of throwing for
*
decorator - Introduced
@serializeAll
decorator, see #27
- Schema was not correctly picked up for classes passed as first arg to deserialize. Fixed. See #36
- Fixed typings of deserialize for arrays. by @Podlas29
- Fixed #21 wrong export of
setDefaultModelSchema
export, by @vonovak
- Added support for serializable constructor arguments (TypeScript only), by @bfsmith, see #11
- Fixed issue where custom arguments passed to
update
where not correctly handled, see #12, by @robclouth
- Fixed issue when deserializing deeply nested objects, see #10
- Avoid implicit any in typings (by @bnaya)
- Fixed UMD build issues
- Fixed package.json: d.ts files are now exported as well (#7)
Which should have been called 1.0...:-)
- the
lookupFunction
ofref
is now optional, if it is not provided, serializr will try to resolve the reference within the current document. Types are respected while resolving ref
has been renamed toreference
child
has been renamed toobject
false
is now also an acceptable value for propSchema's- the prop schema
"*": true
now has the special meaning that all enumerable, primitive fields will be serialized. Will throw on non-primitive fields - introduced
custom(serializer, deserializer)
identifier
now supports an optional callback that can be used to register new instances in some store- circular dependency on default schema's for classes are now a bit better handled (but remain a fundamental JS problem, especially for classes)
Initial release