SetMemberValue - cJsonObject
Sets the member of an object directly to a simple value
Type: Procedure
Parameters
| Parameter | Type | Description |
|---|---|---|
| sMember | String | Explicit JSON typeConstantMeaning |
| eJsonType | Integer | |
| sValue | String | Value to set member to (should be an unescaped string) |
Syntax
Procedure SetMemberValue String sMember Integer eJsonType String sValue
Call Example
Send SetMemberValue sMember eJsonType sValue
Description
Sets the member of an object directly to a simple value.
The JSON type needs to be passed explicitly.
Sample
Procedure OnClick
String sFirst sLast
Handle hoJson
Get Value of oFirstName to sFirst
Get Value of oLastName to sLast
Get Create (RefClass(cJsonObject)) to hoJson
Send InitializeJsonType of hoJson jsonTypeObject
Send SetMemberValue of hoJson "first" jsonTypeString sFirst
Send SetMemberValue of hoJson "last" jsonTypeInteger sLast
Send Destroy of hoJson
End_Procedure