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



Hi Brad,

So it looks like you changed yajl_get_string_buf() to calculate the buffer size based on looking for a zero-terminator in 'buf'. This is not, normally, now C strings work, though... Normally the x'00' terminator is the end of the string, but the buffer size may be larger. For example, I could declare a string as char data[256], and put just "hello" in the string. The x'00' would be found after 5 characters, buf the buffer is still 256 characters long. That is why my approach passed the buffer size as a parameter.

I'm thinking the best approach is to create a hybrid of your solution and mine... basically, use my solution, but return a length instead of just on/off.

Thoughts?

-SK


On 5/14/2016 9:07 AM, Bradley Stone wrote:
Just for the record I did end up adding a couple subprocedures to YAJL. I
only ended up using the yajl_get_string_buf (with some slight modifications
from your suggestion) though, not the UTF8 one. Although the
yajl_get_string_utf8 does seem to work as well.

Here they are if you want to add them to your distro:

http://www.fieldexit.com/forum/display?threadid=321

I put the changes in an article so the formatting would be better. If you
want me to email you the changed source files just let me know and I'd be
happy to do so.

Brad
www.bvstools.com


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.