JsonEncoder
Configs
1
Configs
1encoder: Object
Configuration of the JSON encoder used by the Crud Manager.
| Parameter | Type | Description |
|---|---|---|
encoder.requestData | Object | Static data to send with the data request.
The above snippet will result adding "foo" property to all requests data: |
Properties
2
Properties
2Identifies an object as an instance of JsonEncoder class, or subclass thereof.
Identifies an object as an instance of JsonEncoder class, or subclass thereof.
Functions
2
Functions
2Decodes (parses) a JSON response string to an object. If parsing fails, it returns null. Supposed to be overridden in case data provided by server has to be transformed into format requested by the Crud Manager.
| Parameter | Type | Description |
|---|---|---|
responseText | String | The response text to decode. |
Returns: Object -
The decoded response.
Encodes a request object to JSON encoded string. If encoding fails (due to circular structure), it returns null. Supposed to be overridden in case data provided by the Crud Manager has to be transformed into format requested by server.
| Parameter | Type | Description |
|---|---|---|
requestData | Object | The request to encode. |
Returns: String -
The encoded request.