separate object_t::key_type from basic_json::key_type, and use an allocator which returns object_t::key_type #1274
Labels
state: stale
the issue has not been updated in a while and will be closed automatically soon unless it is updated
I would like the key_type which is searched for:
json j = { "hi", "there" };
j.at("hi") <--- that "hi" is a going to be object_t::key_type, I believe.
To be different from the internal key type
for instance object_t::key_type might be string_view,
but the parameter types, might still be string... but most likely would be string_view (if the internal type is string_view).
I deal with json which has many millions of objects containing the same keys.
I would like there to be an allocator type which allocates strings in a big set of strings. And returns the string_view of that string, rather than a new string, (or a may even return a const char * of the string.c_str())
This is close to the way the jvm allocates strings.
In this way, I would save a lot of memory, and also, key/value lookups in maps would be faster.
The text was updated successfully, but these errors were encountered: