[CDRIVER-164] BCON (BSON C Object Notation) C initializers for BSON Created: 01/Aug/12 Updated: 19/Oct/16 Resolved: 01/Aug/12 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 0.7 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Gary Murakami | Assignee: | Gary Murakami |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
BCON provides for JSON-like (or BSON-like) initializers in C. bcon hello[] = { "hello", "world", "." }; ; Cstring literals in double quotes are used for keys as well as for string values. Macros are used to enclose specific types, and an internal type-specifier string prefixes a typed value. Sub-documents are framed by " {" "}" string literals, and sub-arrays are framed by "[" "]" literals. All of this is needed because C arrays and initializers are mono-typed unlike dict/array types in modern languages. |
| Comments |
| Comment by auto [ 01/Aug/12 ] |
|
Author: {u'date': u'2012-08-01T07:40:56-07:00', u'email': u'gary.murakami@10gen.com', u'name': u'Gary Murakami'}Message: |