Hello,
I am trying to create a JSON structure as follows:
Therefore I use the JSON functions from #include <bic_json>
I am struggling to insert a new object into the JSON array.
I use following code:
oResult = Json.newObject()
rep.hours = Json.set(oResult, "ReportedHours", Json.newArray())
order.js = Json.set(rep.hours, "", Json.newObject())
OData.ComplexValue.setString(order.js, "Order", bptmm120.orno)
OData.ComplexValue.setString(order.js, "Employee", bptmm120.emno)
OData.ComplexValue.setDouble(order.js, "hours", bptmm120.hrea)
If I run the program I get following error:
Process 25 - Fatal Error : json_set: invalid Json type
Does someone has an idee, how to insert/add objects into an JSON array?
Many thanks in advance for your help.