Closed mdorier closed 3 years ago
You can't create an empty object from your C code unless you insert some key. The reason is that Object and Arrays share the same implementation under the hood (Hashmap
) and arrays take precedence over objects when the instance is empty (Assumed to be an indexed array).
I noticed that
unqlite_new_array
andjx9_new_array
create both objects and arrays. However arrays turn into objects only if I add key/value pairs to them. How can I create an empty object (i.e.{}
) in C with unqlite/jx9?