[SERVER-15320] BSONElement does not support a simple encapsulation of the value Created: 18/Sep/14 Updated: 29/Jan/18 Resolved: 09/Jun/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Shell |
| Affects Version/s: | 2.7.6 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Alvin Richards (Inactive) | Assignee: | DO NOT USE - Backlog - Platform Team |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | 28qa | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Participants: | |||||
| Description |
|
Problem: There are cases when you you simply want to get the encapsulated value (type and object) of a BSONElement so that you can put this value elsewhere. Workaround: |
| Comments |
| Comment by Mira Carey [ 09/Jun/17 ] |
|
BSONElement::wrap() or wrap(StringData) can serve to wrap up the keyname, type and value, or basically just type and value (for "" key). I think that's a satisfactory work around |