[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: REST with JSON returned



   Hi Daniel-
   Search http_url_get_raw / http_url_post_raw functions.  Believe
   Scott/others have provided examples.  You will need to convert the JSON
   response to EBCDIC(eg..http_xlate).
   Scott has also provided YAHL library as a download to assist in parsing
   JSON (eg.. yajl_buf_load_tree).  Since the JSON response is consistent
   and simple, it may be easier to handle your returned JSON with a data
   structure or parsing the results by yourself.
   hth,
   -Bob.

   Robert Dunn
   President
   Dunn-Rite Services, Inc.
   rdunn@xxxxxxxxxxxxxxxxxxxxx
   815.462.3017
   I do not stand on the shoulders of giants.
   I stand on their heads, to reach higher!
     __________________________________________________________________

   From: "Hayes, Daniel" <Daniel.Hayes@xxxxxxxxxxxxxxx>
   To: "ftpapi@xxxxxxxxxxxxxxxxxxxxxx" <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
   Sent: Thursday, February 18, 2016 8:10 AM
   Subject: REST with JSON returned
     I am trying to consume a RESTful web service where the response will
   be
     in this format:
     {"ApNumber":32866062,"ApAmount":115.291}
     This is all I will get back.  I have gone through all of Scott's
     example programs and they always load the return into a file on the
     IFS, I just want it returned in a variable so I can parse this out.
   I
     started out using Cozzi's iSockets, but he does not handle SSL.
   Using
     that I just used `GetURLData'.  Is there an equivalent in HTTPAPI?
     Seems a little awkward to have my response go to the IFS and then
   have
     to pull it back in.
     Thanks,
     Danny Hayes
       __________________________________________________________________
     This communication is intended only for the use of the individual or
     entity named as the addressee. It may contain information which is
     privileged and/or confidential under applicable law. If you are not
   the
     intended recipient or such recipient's employee or agent, you are
     hereby notified that any dissemination, copy or disclosure of this
     communication is strictly prohibited. If you have received this
     communication in error, please immediately notify CareCentrix
     Compliance Hot Line at (877) 848-8229 and notify the sender by
     electronic mail. Please expunge this communication without making any
     copies. Thank you for your cooperation.
   -----------------------------------------------------------------------
   This is the FTPAPI mailing list.  To unsubscribe, please go to:
   [1]http://www.scottklement.com/mailman/listinfo/ftpapi
   -----------------------------------------------------------------------

References

   1. http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------