GetJsonObject( INPUT property-name AS CHARACTER )
|
{
"CustOrder": { "CustNum": 1, "Name": "Lift Tours", "NewCust": false, "Order": {"OrderNum": 82, "OrderDate": "2010-09-20"} ] } } |
DEFINE VARIABLE CustInfo AS LONGCHAR NO-UNDO.
DEFINE VARIABLE myObj AS JsonObject NO-UNDO. DEFINE VARIABLE myOrderObj AS JsonObject NO-UNDO. DEFINE VARIABLE myLongchar as LONGCHAR NO-UNDO. /* . . Set CustInfo to the JsonObjet shown above. . */ myObj = CAST(myParser:Parse(CustInfo), JsonObject). myOrderObj = myObj:GetJsonObject("CustOrder"):GetJsonObject("Order"). myOrderObject:Write(myLongchar, TRUE). |
{"OrderNum": 82, "OrderDate": "2010-09-20"}
|