Refactor json_unpack()
authorPetri Lehtinen <petri@digip.org>
Mon, 24 Jan 2011 19:20:56 +0000 (21:20 +0200)
committerPetri Lehtinen <petri@digip.org>
Tue, 25 Jan 2011 06:53:54 +0000 (08:53 +0200)
commit6d1f28f0508cbae7a14203be5bdf25bc41ad13b9
tree3e8df8c3eabb8ebcd1ac58ef37579d1c58ede82a
parent7f3018a4fb547a10ce250db91ec0d41b0cc57bf2
Refactor json_unpack()

* Use the format string scanner from the previous commit (with the
  simpler separator skipping semantics)

* Split json_vnunpack() to three separate functions for unpacking
  objects, arrays and "simple" values

* Always return 0 on success, 1 on error

This shaves around 100 more lines from the original implementation.
src/variadic.c