[CDRIVER-233] how to generate bson with unfinished data and append some more element here? Created: 11/Aug/13 Updated: 03/May/17 Resolved: 09/Nov/13 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | None |
| Affects Version/s: | 0.8.1 |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | smallrui | Assignee: | Gary Murakami |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
win7 32 |
||
| Description |
|
I code it like this below, but no one can work. char * buffer; size = bson_size(b); //bson_init_unfinished_data(b2, buffer, size, 0); // no effect bson_finish( b2 ); ====================================================== best regard and thanks. |
| Comments |
| Comment by Christian Hergert [ 09/Nov/13 ] | |||||||||||||||||||||||||||
|
Hi, You can do this with libbson, which can be found at https://github.com/mongodb/libbson Here is a small example. You can compile it with: gcc -Wall -g -o test test.c $(pkg-config --cflags --libs libbson-1.0)
|