Constructor
new UnionLayoutDiscriminator(layout, propertyopt)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
layout |
module:Layout~ExternalLayout | ||
property |
string |
<optional> |
Default for property, superseding the property
from |
Extends
Members
layout
The ExternalLayout used to access the discriminator value.
property
The property to be used when the discriminator is referenced in isolation (generally when Union decode cannot delegate to a specific variant).
- Inherited From:
- Source:
Methods
decode()
Delegate decoding to layout.
- Overrides:
- Source:
encode()
Delegate encoding to layout.
- Overrides:
- Source: