MCPcopy Create free account
hub / github.com/danielaparker/jsoncons / as_byte_string

Function as_byte_string

include/jsoncons/basic_json.hpp:1624–1632  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1622
1623 template <typename BytesAlloc=std::allocator<uint8_t>>
1624 basic_byte_string<BytesAlloc> as_byte_string() const
1625 {
1626 auto result = try_as_byte_string<basic_byte_string<BytesAlloc>>(make_alloc_set(BytesAlloc()));
1627 if (!result)
1628 {
1629 JSONCONS_THROW(conv_error(result.error().code()));
1630 }
1631 return *result;
1632 }
1633
1634 conversion_result<byte_string_view> try_as_byte_string_view() const
1635 {

Callers

nothing calls this directly

Calls 4

make_alloc_setFunction · 0.85
conv_errorClass · 0.85
errorMethod · 0.80
codeMethod · 0.45

Tested by

no test coverage detected