akheron/jansson — pull request #53 by csm (2012-03-09 22:11:04+00:00)
Title: Preserve insertion order in objects

My application requires that objects preserve the order of elements when parsed. This modifies the hashtable code to also maintain a linked list of `struct hashtable_pair` pointers, in the order they are added to the hashtable. Iterator operations now use this instead.

It adds a bit more space to hashtables and key/value pairs, and adds a list append/remove operation on putting a new value, or deleting a value.

It does not modify the order on update: it preserves creation order, not update order.

I kind of butchered linked list handling. I couldn't break out of the "NULL terminates the list" mode of thinking, at least for append-only lists.