TypedJSON
TypedJSON copied to clipboard
Cross reference models
Can we handle cross reference? at the moment if two class reference each other we have got the error @JsonMember: type detected for '${propertyName}' is undefined.
Unfortunately, this is inherently a problem with how decorators are evaluated at runtime. It could be possible to defer them by passing a callback to them, but this would require either:
- significant additions of code to the serialization/deserialization process to check if the involved objects are ready, and wait if not (requiring an async API of TypedJSON)
- not calling TypedJSON functions (parse, stringify) until the decorators have been applied, which would require some kind of detection mechanism to work reliably
Nevertheless, I'll have a look at this once the new TypedJSON is out. It might be included through an experimental API.