We are working on a requirement where our application is receiving a GZIP encoded response json from another system(or a 3rd party system). We are required to decode the response json and then parse it to read the information. We are using ABL HTTP client for sending request and receiving responses in a UNIX based environment.
We are trying to implement this to improve the overall transmission and processing performance. We are looking for options in Progress 4gl(or OpenEdge) where we can decode the response and parse it.
Any inputs will be highly appreciated.
If you are on later versions and using Tomcat, you should be able to handle compression/decompression under Tomcat. The switch is in conf/server.xml in <Connector> for the port desired.
If one is using Apache, look up mod_deflate.
Thanks Scott for your answer. But what we are looking for is something in ABL(Progress 4gl) to handle this.
install 7zip and call 7z..exe to unpack JSON or I think UNIX has its own in built gunzip commad to uncompress GZIP files. Once uncompressed, you would get JSON file which can be read directly using OE11 4GL code. I used to do similar work in ProgressV9 using my own JSON reader by stripping out curly braces and tokenize data elements but OE10+ versions are having rich library of JSON reader.
> On Dec 24, 2019, at 3:24 AM, prakashs wrote:
> Thanks Scott for your answer. But what we are looking for is something in ABL(Progress 4gl) to handle this.
you can call the zlib decompress functions from the 4GL. the shared library for zlib ships with OpenEdge. should be in DLC/bin
zlib doc (and source code) are here: https://www.zlib.net