1. Create the story with identifier story01. The handle is 1 because the CreateObject method applies at app level.
The client sends:
{
"jsonrpc": "2.0",
"id": 2,
"method": "CreateObject",
"handle": 1,
"params": [
{
"title": "A Story",
"description": "This is the story",
"qInfo": {
"qId": "story01",
"qType": "story"
},
"qChildListDef": {
"qData": {
"title": "/title",
"description": "/description",
"children": "/qChildListDef"
}
}
}
]
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 2,
"result": {
"qReturn": {
"qType": "GenericObject",
"qHandle": 2
},
"qInfo": {
"qId": "story01",
"qType": "story"
}
},
"change": [
2
]
}
The story story01 is created and has 2 as a handle.
For more information, see the CreateObject method.