Hi all,
Just today I managed to get the company I'm contracting with to upgrade their Cache instance from 2009 to 2015. This is ahead of a project that will entail receiving a rather huge JSON blob from a mobile device. I think I kindasorta see what I need in Lee's tip here
https://sites.google.com/site/intersystemsmv/home/a-cache-of-tips/usingjsonoutsideofzen but I want to wrap my head around the input and output before I start barging into legacy code.
Currently, the app accepts a string (since that's what %request gives me) and deals with a fairly small object containing two, three, maybe five or six array elements (call it tickets). Since before 2015 (likely a lot earlier) some pieces of the request might be a stream. That's easy to tell whether you've got a stream or string with $ISOBJECT(). With phones, the element with the JSON in it was small enough to be a string (until we hit a size limit without streams which we coded around until we could upgrade). With the new black-boxes the status update message Cache will receive could contain hundreds of these ticket elements.
The decryption part is easy since Cache now can decrypt a stream and hand you back a nice stream. Now I still have a stream of plain-text JSON I need to turn into an %ArrayOfDataTypes. Rather than passing in and getting out a Person object (per the example), can I have a plain %ArrayOfDataTypes? If that's the case then my coding job is already near complete; I can use existing logic since it doesn't care how small or huge the array is.
I'm looking at a ton of legacy DSM-looking code, several new spec documents, and a load of nice, shiny, new features in 2015 (LOVE the Studio!). Any hint or boost to cut my study time down would be appreciated. As most projects go, this one is typical: "We need it done a month ago so we're giving you the spec today" <lol>
Here's hoping,
Bill