You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to put the float value into the BSON object, after printing JSON I always get 0.0. Is there an example of a working float field inside BSON?
Code:
BSONObjBuilder bob;
BSONElement be;
bob.append("1", (double)3.55);
// Generate BSON Object
BSONObject bo = bob.obj();
// Get string object
char *json = bo.jsonString();
// Print BSON in JSON format
Serial.print("JSON: ");
Serial.println(json);
Result:
JSON: {
"1":0.000
}
Total Size of BSON raw data: 16
BSON Element data (raw):
0x10 0x00 0x00 0x00 0x01 0x31 0x00 0x00
0x00 0x00 0xA0 0x33 0x33 0xE3 0xA5 0x00
The text was updated successfully, but these errors were encountered:
When I try to put the float value into the BSON object, after printing JSON I always get 0.0. Is there an example of a working float field inside BSON?
Code:
Result:
The text was updated successfully, but these errors were encountered: