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

Function decode_inline_array

include/jsoncons_ext/toon/toon_reader.hpp:1089–1114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1087}
1088
1089inline
1090jsoncons::expected<void,std::error_code> decode_inline_array(jsoncons::span<char> content,
1091 char delimiter,
1092 std::size_t expected_length,
1093 const toon_decode_options& options,
1094 json_visitor& visitor)
1095{
1096 using result_type = jsoncons::expected<void,std::error_code>;
1097
1098 bool strict = options.strict();
1099
1100 if (content.empty() && expected_length == 0)
1101 {
1102 visitor.begin_array();
1103 visitor.end_array();
1104 return result_type{};
1105 }
1106 visitor.begin_array();
1107 auto r = parse_delimited_values(content, delimiter, expected_length, strict, visitor);
1108 if (!r)
1109 {
1110 return r;
1111 }
1112 visitor.end_array();
1113 return result_type{};
1114}
1115
1116inline
1117std::pair<std::size_t,char> find_first_unquoted(jsoncons::span<char> line,

Callers 2

decode_list_arrayFunction · 0.85
decode_array_from_headerFunction · 0.85

Calls 5

parse_delimited_valuesFunction · 0.85
strictMethod · 0.80
emptyMethod · 0.45
begin_arrayMethod · 0.45
end_arrayMethod · 0.45

Tested by

no test coverage detected