pointer to the hibon instance
pointer to the key
length of the key
pointer to the document buffer
length of the buffer
ErrorCode
auto sub_hibon = new HiBON; sub_hibon["sub_doc"] = "test"; const doc = Document(sub_hibon); HiBONT h; int rt = tagion_hibon_create(&h); assert(rt == ErrorCode.none, "could not create hibon"); string key = "some_key"; rt = tagion_hibon_add_document(&h, &key[0], key.length, &doc.data[0], doc.data.length); HiBON string_hibon = cast(HiBON) h.hibon; assert(string_hibon[key].get!Document == doc);
Add document to hibon