Constructor
# new SerializedCrudContract(name, clazz) → {void}
Exposes the same CRUD operations as FabricCrudContract but takes and returns JSON strings to facilitate simple client interactions.
CRUD contract variant that serializes/deserializes payloads
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string
|
The contract name |
clazz |
Constructor.<M>
|
The model constructor used to instantiate models from JSON |
void
Example
const contract = new SerializedCrudContract<MyModel>('MyModelContract', MyModel);
// Client submits JSON string payloads and receives JSON string responses