× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Jumping into the conversation a little late so I don't know if this has
been mentioned.

According to json.org the solidus / needs to be escaped with a reverse
solidus \

{"presidents":[
{"name":"George Washington" "life":"1732\/1799"},
... 43 lines deleted
]}

Brian Garland



On Fri, Nov 11, 2016 at 4:26 PM, <web400-request@xxxxxxxxxxxx> wrote:

Send WEB400 mailing list submissions to
web400@xxxxxxxxxxxx

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.midrange.com/mailman/listinfo/web400
or, via email, send a message with subject or body 'help' to
web400-request@xxxxxxxxxxxx

You can reach the person managing the list at
web400-owner@xxxxxxxxxxxx

When replying, please edit your Subject line so it is more specific
than "Re: Contents of WEB400 digest..."


*** NOTE: When replying to this digest message, PLEASE remove all text
unrelated to your reply and change the subject line so it is meaningful.

Today's Topics:

1. Re: JSON and the IFS (Kevin Turner)
2. Re: JSON and the IFS (Booth Martin)
3. Re: JSON and the IFS (Kevin Turner)
4. Virtual hosts (Booth Martin)
5. Re: PHP and RPG, work file question (Roche, Bob)
6. Re: PHP and RPG, work file question (Jon Paris)
7. Re: JSON and the IFS (Justin Taylor)


----------------------------------------------------------------------

message: 1
date: Fri, 11 Nov 2016 19:13:14 +0000
from: Kevin Turner <kevin.turner@xxxxxxxxxxxxxxx>
subject: Re: [WEB400] JSON and the IFS

From what I can gather in this case the issue is fairly obvious to the
naked eye although Booth has yet to confirm that it is the braces ({}) or
other chars.

Sent from my iPad


[https://www.netcracker.com/assets/img/netcracker-social-final.png] ?
On 11 Nov 2016, at 18:29, Pete Helgren <pete@xxxxxxxxxx> wrote:

If you are just checking the format, jsonlint.com is a great site to
vet and ID any issues. Copy and paste the data onto the site, it will tell
you where the issues are.

On very complex JSON, it is a lifesaver and even on simple stuff, it has
pointed me to really simple errors I have made....

Pete Helgren
www.petesworkshop.com
GIAC Secure Software Programmer-Java
LinkedIn - www.linkedin.com/in/petehelgren
Twitter - Sys_i_Geek IBM_i_Geek

On 11/11/2016 12:18 PM, Booth Martin wrote:
Thank you Kevin. Danny, Henrik, and Justin.

Clearly, lesson 56 is to be learning about ccsid.

Also, IE. hmmmm Good tip. I tried IE 11 and discovered the data
on http://ventures.martinvt.com/ did not show up with IE either.
Apparently it only works in Firefox.

Again, thank you all for the pointers. Very much appreciated.



On 11/11/2016 3:28 AM, Kevin Turner wrote:
It shouldn't have any problem as long as the data is correctly
encoded. With JSON the typical mistake is with the braces ({}) especially
when hardcoded in RPG source. If your job ccsid is 37 (using the US
example) and your source files is ccsid 37 then what you key in will look
fine in the source and any file you spew out to the IFS, but that doesn't
mean that it actually is correct when converted by Apache to (for example)
UTF-8. We never hardcode those characters for that reason. It would be
useful to see what Booth gets on the browser and if indeed it is the braces
that are screwed.

Sent from my iPad

On 11 Nov 2016, at 09:00, Henrik R?tzou<hr@xxxxxxxxxxxx> wrote:

I have had the same problem with IE loading external XML via AJAX
into DOM

On Fri, Nov 11, 2016 at 9:30 AM, Kevin Turner<
kevin.turner@xxxxxxxxxxxxxxx>
wrote:

"First, its telling me the file is badly formed and points to row
1,"

What is "it" in this sentence? Your browser? If so what does the
JSON
look like when it is downloaded? For example you can use the
Google Chrome
developer tools - Network tab to look at it.

Sounds to me like you have a ccsid issue with the file.



--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.




________________________________
The information transmitted herein is intended only for the person or
entity to which it is addressed and may contain confidential, proprietary
and/or privileged material. Any review, retransmission, dissemination or
other use of, or taking of any action in reliance upon, this information by
persons or entities other than the intended recipient is prohibited. If you
received this in error, please contact the sender and delete the material
from any computer.

------------------------------

message: 2
date: Fri, 11 Nov 2016 14:06:36 -0600
from: Booth Martin <booth@xxxxxxxxxxxx>
subject: Re: [WEB400] JSON and the IFS

Here is a copy & paste from a 5250 session:

{"presidents":[
{"name":"George Washington" "life":"1732/1799"},
... 43 lines deleted
]}

The web console reports the error is row 1 col 16. Which is the first
blank, if I counted right. Its also a linefeed. I repeated the exercise
without linefeeds and got the same message.
-----------
Part 2:
So then I decided to double check. I copied the entire file from the
5250 screens with "Copy Append" and pasted the data into a new JSON file
on my PC. It looked fine. I opened the web page. No data was
displayed. The web console reported a problem at Row 2, column 28; it
was looking for a "}". I am satisfied that it is a ccsid issue. At the
moment it seems likely the answer lays with learning more about
configuring the Apache server on the iSeries.


On 11/11/2016 1:13 PM, Kevin Turner wrote:
From what I can gather in this case the issue is fairly obvious to the
naked eye although Booth has yet to confirm that it is the braces ({}) or
other chars.

Sent from my iPad
...


------------------------------

message: 3
date: Fri, 11 Nov 2016 20:17:10 +0000
from: Kevin Turner <kevin.turner@xxxxxxxxxxxxxxx>
subject: Re: [WEB400] JSON and the IFS

Use the browser developer tools to see just what exactly is being
downloaded from the server. All browsers have developer tools included now
- even IE. Each will have a console or network tab to show you the files
that are downloaded.

Sent from my iPad


[https://www.netcracker.com/assets/img/netcracker-social-final.png] ?
On 11 Nov 2016, at 20:07, Booth Martin <booth@xxxxxxxxxxxx> wrote:

Here is a copy & paste from a 5250 session:

{"presidents":[
{"name":"George Washington" "life":"1732/1799"},
... 43 lines deleted
]}

The web console reports the error is row 1 col 16. Which is the first
blank, if I counted right. Its also a linefeed. I repeated the exercise
without linefeeds and got the same message.
-----------
Part 2:
So then I decided to double check. I copied the entire file from the
5250 screens with "Copy Append" and pasted the data into a new JSON file on
my PC. It looked fine. I opened the web page. No data was displayed.
The web console reported a problem at Row 2, column 28; it was looking for
a "}". I am satisfied that it is a ccsid issue. At the moment it seems
likely the answer lays with learning more about configuring the Apache
server on the iSeries.


On 11/11/2016 1:13 PM, Kevin Turner wrote:
From what I can gather in this case the issue is fairly obvious to the
naked eye although Booth has yet to confirm that it is the braces ({}) or
other chars.

Sent from my iPad
...
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.




________________________________
The information transmitted herein is intended only for the person or
entity to which it is addressed and may contain confidential, proprietary
and/or privileged material. Any review, retransmission, dissemination or
other use of, or taking of any action in reliance upon, this information by
persons or entities other than the intended recipient is prohibited. If you
received this in error, please contact the sender and delete the material
from any computer.

------------------------------

message: 4
date: Fri, 11 Nov 2016 14:25:28 -0600
from: Booth Martin <booth@xxxxxxxxxxxx>
subject: [WEB400] Virtual hosts

A couple of weeks ago there was a thread concerning web addresses and
port numbers. Perhaps this is relevant?

Today while looking for something else I stumbled across a "Virtual
Host" configuration for the servers administered on port :2001/HTTPAdmin

I read the Help section and played with it for a bit. I wonder if this
a place where one could, with the DNS, make http://10.0.0.5:8585 resolve
to Norse/Thor and http://10.0.0.5:8586 resolve to Norse/Odin ?



------------------------------

message: 5
date: Fri, 11 Nov 2016 20:26:13 +0000
from: "Roche, Bob" <broche@xxxxxxxxxxxxxxxxx>
subject: Re: [WEB400] PHP and RPG, work file question

I searched how to use SQL in the toolkit and could only find a reference
in GITHUB to that being a future option for the toolkit.
So I went with a TEMP library that is not QTEMP and creating a duplicate
file in there with a unique name. After some changes to make sure the new
name is never too long, and getting my override scope set properly, it now
works. Since I am already using the toolkit to create the file. I have
added another cl call when the job finishes to delete the file.

------------------------------

message: 6
date: Fri, 11 Nov 2016 16:00:34 -0500
from: Jon Paris <jon.paris@xxxxxxxxxxxxxx>
subject: Re: [WEB400] PHP and RPG, work file question

Glad to hear it. It seems to me to be a far more bullet-proof approach.


Jon Paris

www.partner400.com
www.SystemiDeveloper.com

On Nov 11, 2016, at 3:26 PM, Roche, Bob <broche@xxxxxxxxxxxxxxxxx>
wrote:

I searched how to use SQL in the toolkit and could only find a reference
in GITHUB to that being a future option for the toolkit.
So I went with a TEMP library that is not QTEMP and creating a duplicate
file in there with a unique name. After some changes to make sure the new
name is never too long, and getting my override scope set properly, it now
works. Since I am already using the toolkit to create the file. I have
added another cl call when the job finishes to delete the file.
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.




------------------------------

message: 7
date: Fri, 11 Nov 2016 21:26:45 +0000
from: Justin Taylor <JUSTIN@xxxxxxxxxxxxx>
subject: Re: [WEB400] JSON and the IFS

Provided you don't include superfluous data in the JSON with the
assumption that your web page will remove it, I don't see much harm in
exposing the raw JSON.

Of course, you'll likely need dynamic data before long, in which case
you'll want to pipe your JSON directly to the browser.



-----Original Message-----
From: Kevin Turner [mailto:kevin.turner@xxxxxxxxxxxxxxx]
Sent: Friday, November 11, 2016 12:16 PM
To: Web Enabling the IBM i (AS/400 and iSeries) <web400@xxxxxxxxxxxx>
Subject: Re: [WEB400] JSON and the IFS

The point is that the JSON holds data and you are presumably downloading
it to display it in something user friendly on the page - like a data grid
or graph or something. However, if they user is savvy, they can just use
the address bar to point at (and download) the raw JSON data as well, which
might not be so good (depending on what is in it).


------------------------------

Subject: Digest Footer

--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) digest
list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.



------------------------------

End of WEB400 Digest, Vol 14, Issue 152
***************************************





As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.