Hello,
we wish to implement webservices on our iSeries. The data format shall be JSON. I think Universal Display files can be a way to send data from the iSeries to the pc users. (I didn't try it). But is an Universal Display file also a solution to read JSON data into the iSeries? Do you have an example how this could be implemented?
Dieter
Using Universal Display File to read/write JSON
-
- Experienced User
- Posts: 122
- Joined: Tue May 22, 2012 6:45 am
- First Name: Dieter
- Last Name: Schröder
- Company Name: Ecclesia Holding GmbH
- State / Province: Outside Canada/USA
- Country: Germany
- Contact:
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Using Universal Display File to read/write JSON
The Univrersal Display File is a general-purpose templating/formatting tool. It can be used to format output in any format... JSON, XML, CSV, HTML, etc.. just about any text output you wish can be generated with it. But, you need to code the text and tell it where to insert variable data. It's basically an open access version of CGIDEV2. So you can generate JSON with it if you like, but the tool doesn't exactly understand JSON itself... it's you who codes that part, it won't generate it for you.
For input data, the UDF has a built-in ability to receive in the format that HTML uses to send forms. (i.e. URL-encoded name/value pairs.) It does not understand JSON.
I do have an open source tool that can be used to read/generate JSON, it's called YAJL. I have a presentation that I give on the topic at conferences & user groups, and you can download the handout for that presentation here:
http://www.scottklement.com/presentations/#YAJL
You can find the YAJL program itself here:
http://www.scottklement.com/yajl/
For input data, the UDF has a built-in ability to receive in the format that HTML uses to send forms. (i.e. URL-encoded name/value pairs.) It does not understand JSON.
I do have an open source tool that can be used to read/generate JSON, it's called YAJL. I have a presentation that I give on the topic at conferences & user groups, and you can download the handout for that presentation here:
http://www.scottklement.com/presentations/#YAJL
You can find the YAJL program itself here:
http://www.scottklement.com/yajl/
-
- Experienced User
- Posts: 122
- Joined: Tue May 22, 2012 6:45 am
- First Name: Dieter
- Last Name: Schröder
- Company Name: Ecclesia Holding GmbH
- State / Province: Outside Canada/USA
- Country: Germany
- Contact:
Re: Using Universal Display File to read/write JSON
Thank you Scott. I will have a look to your YAJL project.
Who is online
Users browsing this forum: Majestic-12 [Bot] and 0 guests