Releases: JohnWeisz/TypedJSON
Releases · JohnWeisz/TypedJSON
0.1.4 Hotfix
- Fixed TypedJSON.parse engaging custom deserialization (and throwing "not known type" errors where applicable) when the root type was not JsonObject. It will now resort to the JSON.parse function in this case, a root JsonObject type is required when doing custom deserialization.
0.1.3 consistency improvements
Consistency update and bugfixes. Notable changes and fixes:
- Serializing/deserializing a non-JsonObject value with JsonMember properties will no longer throw error. It will be ignored in regard to custom deserialization instead, as if no JsonMembers were used on the given class.
- To use typed serialization/deserialization, always use JsonObject on involved classes.
- Compiled
.js
is now included in NuGet package to prevent IntelliSense from occasional panicking. - Minor performance improvements.
Breaking changes
TypedJSON.config
no longer returns the TypedJSON object. This was a ninja feature that has now been removed.
0.1.2 Source Preview
Stability update. New version is available as a NuGet package as well:
Install-Package TypedJSON
- Mashed everything into single file
- Added
.d.ts
and.min.js
Breaking changes:
TypedJSON.stringify
andTypedJSON.parse
no longer accept a configuration object. TheTypedJSON.config
method can be used instead- Classes without a parameterless constructor are no longer supported, and their return is not planned
- Using
JsonObject
is now mandatory
Fixed issues:
- Interface and abstract class as property type can now be used (see issues #9 and #10)
- Requires setting the
refersAbstractType
option totrue
(for both abstract classes and interfaces) - For interfaces, use
Object
for thetype
setting (or use reflect-metadata) - Requires type-hint to be enabled (default)
- Requires setting the
- Objects in nested arrays should now deserialize correctly (see issue #4)
- Requires type-hint to be enabled (default)
- Known types accepting only classes containing a parameterless constructor is now expected behavior (see issue #8)
- The type of primitive values being deserialized should now be checked correctly (see issue #7)