librelist archives

« back to archive

Generating JSON from internal structure in C

Generating JSON from internal structure in C

From:
Matthias Beyer
Date:
2014-10-31 @ 14:14
Hi,

I use yajl to parse/generate JSON based API messages. The
deserializing part is written an works, but now I have to write a
serializer for translating the internal structs into JSON.

So far, so good. The problem I'm currently facing is, that I can not
expect the buffer I write to as large enough for the data I want to
write.

Can you please provide me some pointers on how to do this with yajl?

Besides this: Thanks for writing this library! It's API is really sane
and nice and I enjoy working with it!

-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.

Re: [yajl] Generating JSON from internal structure in C

From:
Verifications-CIC
Date:
2014-10-31 @ 15:03
Thank you for your email.  Your request has been assigned to the 
appropriate staff, and we will respond as soon as possible.  We apologize 
for the delay.

Sincerely,
Pre-Licensure, Registration and Consumer Services (PRC) Department Texas 
Medical Board Phone (512) 305-7030 Toll Free 1-800-248-4062 (TX only) Fax 
(888) 790-0621

DISCLAIMER
Any and all statements herein should not be construed as official policy 
or positions of the Texas Medical Board and are merely provided by Board 
staff for general guidance. No individual staff member is authorized to 
provide a binding opinion or statement for the full Board. Nothing herein 
should be construed as legal advice for any particular situation.
P Please consider the environment before printing this e-mail.

-----Original Message-----
From: yajl@librelist.com [mailto:yajl@librelist.com] On Behalf Of Matthias Beyer
Sent: Friday, October 31, 2014 9:14 AM
To: yajl@librelist.com
Subject: [yajl] Generating JSON from internal structure in C

Hi,

I use yajl to parse/generate JSON based API messages. The deserializing 
part is written an works, but now I have to write a serializer for 
translating the internal structs into JSON.

So far, so good. The problem I'm currently facing is, that I can not 
expect the buffer I write to as large enough for the data I want to write.

Can you please provide me some pointers on how to do this with yajl?

Besides this: Thanks for writing this library! It's API is really sane and
nice and I enjoy working with it!

--
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.