B
benBuckley
Guest
The JsonSerializer appears to be intended for deserializing ProgressObjects for exchanging Progress objects, not data. The JsonObject has a Read method that can take a dataset, temp-table, or temp-table buffer handle as input. The JsonArray has a Read method that can take a temp-table handle as input, so If you can get your response data into a temp-table or dataset, you can serialize to proper JSON: USING Progress.Json.ObjectModel.JsonObject. DEFINE VARIABLE oJson AS JsonObject NO-UNDO. /* quick-and-ugly to get a valid temp-table buffer */ DEFINE TEMP-TABLE ttCustomer LIKE Customer. FIND FIRST Customer NO-LOCK. CREATE ttCustomer. BUFFER-COPY Customer TO ttCustomer. oJson = NEW JsonObject(). oJson:Read(BUFFER ttCustomer:HANDLE). WebReponse:entity = oJson
Continue reading...
Continue reading...