Skip to content

Deprecation warning about std::char_traits<unsigned char> #4163

Closed
@nlohmann

Description

@nlohmann

Description

When parsing a binary format from a std::vector<std::uint8_t>, there is a deprecation warning:

Screenshot 2023-09-24 at 11 36 41

Reproduction steps

Call nlohmann::json::from_bjdata on a std::vector<std::uint8_t>.

Expected vs. actual results

Expected: no deprecation warning.

Actual:

Screenshot 2023-09-24 at 11 36 41

Minimal code example

std::vector<std::uint8_t> vec {{ 0x7b, 0x55, 0x0b }};
nlohmann::json j = nlohmann::json::from_bjdata(vec);

Error messages

See screenshot above.

Compiler and operating system

Apple clang version 15.0.0 (clang-1500.0.40.1)

Library version

develop

Validation

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions