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



Booth,

I don't understand. You say you're getting a lexical error -- but then you also say that yajl_object_find() is failing to find the "success" node.

1) If you're getting a lexical error, then docNode should be *null, and errMsg = 'The Lexical Error Message'. Your code doesn't actually call yajl_object_find when errMsg isn't blank.

2) Do you understand that the 2nd parameter in yajl_object_find() is the name of the JSON element you are trying to retrieve? You are asking for an element named 'success' inside your document. So your document would look like this:

{
"success": true,
.. other stuff ...
}

Are you sure it has a "success" element in it? The examples you posted earlier did not.

You didn't answer my questions about the SQL LOB and SUBSTR, either.

-SK



On 9/5/17 8:02 PM, Booth Martin wrote:
I have been following the thread closely and fully understand the issue about "noise".  Defining the problem has been difficult for me because I am not understanding the differences between what happens and what is supposed to happen.A few points and a few questions may help me figure out a way to ask useful questions.

Yes, I validated the .json file with both Eclipse and with the link Bradley provided https://jsonformatter.curiousconcept.com/ .  I also edited out the CR&LF. Either way, I get the "lexical error: invalid char in json text " error message.

Is the docNode value an address to the location of the .json file?

       docNode = yajl_stmf_load_tree(%trim(wIFSFileName): errMsg );
       if errMsg = ' ';
          node = YAJL_object_find(docNode: 'success');
          result.success = YAJL_is_true(node);

docNode has a value, errMsg is blank.
Yet node is *null and result.success = "0"

Is that the way it should be?



On 9/5/2017 3:36 PM, Scott Klement wrote:
Hi Booth,
...

Honestly, I'm finding this whole thread hard to follow, there's so much "noise" in it.  So a full description that doesn't rely on reading other messages in this thread would help a lot :-)

-SK



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.