Expand the pack/unpack API, implement unpack flags
authorPetri Lehtinen <petri@digip.org>
Tue, 25 Jan 2011 07:36:43 +0000 (09:36 +0200)
committerPetri Lehtinen <petri@digip.org>
Tue, 25 Jan 2011 08:02:27 +0000 (10:02 +0200)
commit579c291882e1ccd09153665adf585d8e4830fc23
treee8f6f19852abe371521fb06d4c7672672e6460b8
parent2770dca2c091a9c5c898ff0922d905449111ff95
Expand the pack/unpack API, implement unpack flags

Expand the pack/unpack API: json_(un)pack is the simple version with
no error output, json_(un)pack_ex has error output and flags,
json_v(un)pack_ex is a va_list version of json_(un)pack_ex.

Implement unpacking flags:

- JSON_UNPACK_ONLY turns off extra validation, i.e. array and object
  unpacking doesn't check that all items are unpacked. This is really
  just convenience for not adding '*' after each object and array.

- JSON_VALIDATE_ONLY turns off unpacking, i.e. no varargs are expected
  and nothing is unpacked.
src/jansson.h
src/pack_unpack.c
test/suites/api/check-exports
test/suites/api/test_pack.c
test/suites/api/test_unpack.c