|
On Jun 2, 2020, at 1:08 PM, Nathan Andelin <nandelin@xxxxxxxxx> wrote:
On Tue, Jun 2, 2020 at 10:22 AM Jon Paris <jon.paris@xxxxxxxxxxxxxx> wrote:
"I'm developing a JSON parser."
May I ask why Nathan? This sounds like reinventing the wheel when there
are at least three really good parsers already available.
No problem. BTW, which three parsers might you be referring to? YAJL must
be one, for sure. I agree that it sounds like reinventing the wheel, but
I'll share some of my rationale.
Broadly speaking I need a JSON parser to consume web services as well as
support web-service clients. That's a big deal to me. But in response to
reinventing the wheel, let's take YAJL as an example. It implements a CGI
interface, whereas none of our web applications use CGI.
Also, I need to support the parser. As I've reviewed the YAJL C code, I
didn't feel comfortable enough with the code to support it. It also
includes a procedure that converts the JSON to UTF-8 prior to parsing,
which I question. The parsing logic to me looks like it could be coded to
perform more efficiently. I'd like to come up with something that performs
better, even though my standards for performance may be higher than most.
I have several ideas that would streamline the API. For example reading
JSON arrays directly into RPG data structures, comparable to data-into, but
implemented with a procedure interface instead.
SAX parsing within YAJL is very confusing to me. I think that can be
improved significantly.
Nathan.
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com
As an Amazon Associate we earn from qualifying purchases.
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.