The Combined JSON object
Each time a client browser requests data, the USoft Page Engine makes a new Combined JSON object. The purpose of this object is to merge design-time data specifications with runtime data values and return the outcome of this as a response to the browser. This object is also logged in the
*web-publication*\logs
folder with a [Response] tag in the Page Engine logfile and is visible only if the logging level is set to DEBUG.
This mechanism uses a Combined JSON object. This object has several property values, an authentication info object, and arrays for data and messages:
{
"stateId": "1",
"lang": "en",
"loginStatus": "true",
"logonRequired": "true",
"defaultPage": "ApplicationPage",
"eventState": "success",
"commit": "false",
"module": ".",
"Auth": {
"roles": "ADMIN,ROLE1"
},
"Data": [],
"Message": []
}
The most important element is the Data element. This element contains any records that were queried from the database, ordered in a format that the web client can process quickly.
An example of a data query result in the Combined JSON looks as follows:
{
"queried": "Y",
"dsId": "1.DS61",
"maxDataSetSize": 20,
"Rows": [
{
"refId": "1",
"Row": [
{
"$62": "BLA1234",
"$63": "USOFT",
"$64": "Here"
},
{
"$62": "HOI0987",
"$63": "NESS",
"$64": "lThereChangedo"
}
]
}
],
"Keys": ["$62"],
"ExtraKeys": [],
"Inserts": [],
"Counts": [
{
"refId": "1",
"count": "2"
}
]
}
The Auth element contains a reference to the roles of the current user. This has an effect on the menus that this user may see, if a MenuControl based on authorization role is present.
The Message element contains a list of all messages generated by the request. They are immediately displayed on the browser after processing the Combined JSON response object.