commit | 2620ae093286674f8d5aa85d01eeb8afd53a4692 | [log] [tgz] |
---|---|---|
author | Marti Bolivar <marti.bolivar@linaro.org> | Wed Jun 07 11:50:15 2017 -0400 |
committer | Anas Nashif <nashif@linux.intel.com> | Thu Jun 08 15:11:23 2017 -0400 |
tree | 52be58b7369e5e4352828aaac9bf284a91e3373b | |
parent | a4b67de3fd3b00b4de88f57a5643f1aa68ebb622 [diff] |
lib: json: fix arr_encode() The JSON library doesn't properly encode arrays whose elements are of object type. Fix that. This fix avoids allocating a temporary descriptor on the stack, and keeps the size of struct json_obj_descr unchanged, by preserving an unintuitive size optimization made by the library. See the comments in the patch for more details. Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>