× 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.



So are we talking about the time to load the IFS file into the parser?

On Mon, Jun 1, 2015 at 4:21 PM, Kevin Turner <
kevin.turner@xxxxxxxxxxxxxxxxxxxx> wrote:

No I just generated a big test JSON from http://www.json-generator.com/
and stuck it in my IFS, then used both service programs to parse it.....so
this is just the parser that I was benchmarking as this is the slow bit. I
haven't retrieved anything from the parsed result yet.


-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Henrik
Rützou
Sent: 01 June 2015 15:19
To: Web Enabling the IBM i (AS/400 and iSeries)
Subject: Re: [WEB400] receiving POST encoded in JSON

Kevin

is it a test program that just creates 140 K JSON in a loop

On Mon, Jun 1, 2015 at 4:12 PM, Kevin Turner <
kevin.turner@xxxxxxxxxxxxxxxxxxxx> wrote:

JSON from RPGNEXTGEN.COM (that is what we use at the moment)

-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Henrik
Rützou
Sent: 01 June 2015 15:10
To: Web Enabling the IBM i (AS/400 and iSeries)
Subject: Re: [WEB400] receiving POST encoded in JSON

Kevin

I'm also looking into YAJL, but what are you comparing ?

On Mon, Jun 1, 2015 at 4:05 PM, Kevin Turner <
kevin.turner@xxxxxxxxxxxxxxxxxxxx> wrote:

Well, a staggering difference - using a 140kb JSON as a benchmark

JSON parse=16107ms
YAJL parse=53ms


-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Kevin
Turner
Sent: 30 May 2015 08:52
To: Web Enabling the IBM i (AS/400 and iSeries)
Subject: Re: [WEB400] receiving POST encoded in JSON

I think I'm going to have to compare take a closer look at YAJL to
properly compare it to JSON from rpgnextgen.com. The latter is
attractive because it is written entirely in RPG and the procedure
names seem a bit more intuitive (e.g. json_parse() compared to
yajl_tree_load_buf() ) - however as YAJL is, I believe, written in C
it might bring some performance benefits.





On 30 May 2015, at 04:08, Scott Klement <web400@xxxxxxxxxxxxxxxx>
wrote:

Raul,

I don't understand your complaint about calling QtmhRdStin? it's
an
extremely simple call, and then your JSON data is loaded into a
variable in your program, and you can parse it. What could be simpler?

If you're interested in YAJL, you can use the yajl_tree_load_buf()
procedure to load the buffer you got from QtmhRdStin() to parse the
JSON, and then you'll have a yajl tree that you can extract the data
from.
There's info on parsing XML with yajl in the following handout (this
is from talks I give on yajl):

http://www.scottklement.com/presentations/Working%20with%20JSON%20
in
%2
0RPG.pdf

I've been considering adding a wrapper to my YAJL tools that does
the
call to QtmhRdStin() for you so you don't have to code it by hand --
this wouldn't save you all that much, really, just eliminates the
need
to code
it each time. Would that be more attractive to you? (That's
basically
what CGIDEV2 does, after all.)


On 5/29/2015 5:00 PM, Raul A Jager W wrote:
We are planing to wor with a company that will send us data as
POST in json format.
CGIDEV seems to ignore this data. With another company I used
QtmhRdStin, but I wonder if there is an easier way to read it.

I installed YAJL from Scot's site, but it seems that is great to
create json and to parse it, but I did not find how to receive it.

According to this: http://www.w3.org/TR/html-json-forms/ browsers
will be able to send json encode data.

Here is part of the document they send me.

Recurso: Pago (POST / JSON)
Pedido

Nombre Campo Tipo Longitud Descripción codServicio String 5
tipoTrx Num 2 03 = Pago usuario String 20 password String 20
nroFactura Num
15 importe String 15,2 Ej.: 10.000 = 000000001000000 moneda
String
1 1= Guaraní, 2= Dólar.
medioPago Num 1 1=Efectivo, 2=Cheque codTransaccion Num 10
Identificador único de la transacción.

{
"usuario": "test",
"password": "*134*",
"nroFactura": "60",
"moneda": "1",
"importe": "335500",
"codTransaccion": "0012929861"
}

-- Este e-mail fue enviado desde el Mail Server del diario ABC
Color
--
-- Verificado por Anti-Virus Corporativo Symantec --
--
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.


___________________________________________
This email has been scanned by iomartcloud.
http://www.iomartcloud.com/


________________________________

NOTICE: The information in this electronic mail transmission is
intended by CoralTree Systems Ltd for the use of the named
individuals or entity to which it is directed and may contain
information that is privileged or otherwise confidential. If you
have received this electronic mail transmission in error, please
delete it from your system without copying or forwarding it, and
notify the sender of the error by reply email or by telephone, so
that the sender's address
records can be corrected.




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


CoralTree Systems Limited
Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton
Hampshire
SO15 2EA
VAT Registration Number 834 1020 74.
--
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.


___________________________________________
This email has been scanned by iomartcloud.
http://www.iomartcloud.com/


________________________________

NOTICE: The information in this electronic mail transmission is
intended by CoralTree Systems Ltd for the use of the named
individuals or entity to which it is directed and may contain
information that is privileged or otherwise confidential. If you
have received this electronic mail transmission in error, please
delete it from your system without copying or forwarding it, and
notify the sender of the error by reply email or by telephone, so
that the sender's address
records can be corrected.




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


CoralTree Systems Limited
Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton
Hampshire
SO15 2EA
VAT Registration Number 834 1020 74.
--
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.




--
Regards,
Henrik Rützou

http://powerEXT.com <http://powerext.com/>
--
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.


___________________________________________
This email has been scanned by iomartcloud.
http://www.iomartcloud.com/


________________________________

NOTICE: The information in this electronic mail transmission is
intended by CoralTree Systems Ltd for the use of the named individuals
or entity to which it is directed and may contain information that is
privileged or otherwise confidential. If you have received this
electronic mail transmission in error, please delete it from your
system without copying or forwarding it, and notify the sender of the
error by reply email or by telephone, so that the sender's address
records can be corrected.




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


CoralTree Systems Limited
Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton
Hampshire
SO15 2EA
VAT Registration Number 834 1020 74.
--
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.




--
Regards,
Henrik Rützou

http://powerEXT.com <http://powerext.com/>
--
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.


___________________________________________
This email has been scanned by iomartcloud.
http://www.iomartcloud.com/


________________________________

NOTICE: The information in this electronic mail transmission is intended
by CoralTree Systems Ltd for the use of the named individuals or entity to
which it is directed and may contain information that is privileged or
otherwise confidential. If you have received this electronic mail
transmission in error, please delete it from your system without copying or
forwarding it, and notify the sender of the error by reply email or by
telephone, so that the sender's address records can be corrected.




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


CoralTree Systems Limited
Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton
Hampshire
SO15 2EA
VAT Registration Number 834 1020 74.
--
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.





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.