cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Send Remote Source in JSON body

From: Alex Bligh <alex_at_alex.org.uk>
Date: Wed, 29 Jul 2015 00:05:13 +0100

On 28 Jul 2015, at 22:13, Aaron Meriwether <me_at_ameriwether.com> wrote:

> libcurl does not provide methods for manipulating JSON. You will need to compose your JSON document via some other mechanism, then pass the finished document to libcurl.
> The simplest way to compose a JSON document in C is probably to use sprintf to interpolate your data into a JSON skeleton.

Or (better, particularly if your document has strange characters in that need escaping, like quotes), a JSON library, e.g. cjson.
  http://sourceforge.net/projects/cjson/

-- 
Alex Bligh
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2015-07-29