1
0
mirror of https://github.com/nlohmann/json.git synced 2025-08-07 18:02:57 +03:00

BSON: support doubles

This commit is contained in:
Julian Becker
2018-09-15 03:23:54 +02:00
parent 9a0dddc5d2
commit 0c0f2e44b5
4 changed files with 115 additions and 31 deletions

View File

@@ -137,8 +137,6 @@ class binary_reader
}
/*!
@param[in] len the length of the array or std::size_t(-1) for an
array of indefinite size
@return whether array creation completed
*/
bool get_bson_str(string_t& result)
@@ -179,15 +177,19 @@ class binary_reader
string_t key;
get_bson_str(key);
sax->key(key);
sax->boolean(static_cast<bool>(get()));
} break;
double number;
get_number_little_endian(number);
sax->number_float(static_cast<number_float_t>(number), "");
}
break;
case 0x08:
{
string_t key;
get_bson_str(key);
sax->key(key);
sax->boolean(static_cast<bool>(get()));
} break;
}
break;
}
}