Home
last modified time | relevance | path

Searched refs:cbor (Results 1 – 25 of 60) sorted by relevance

123

/third_party/node/deps/v8/third_party/inspector_protocol/crdtp/
Ddispatch_test.cc65 std::vector<uint8_t> cbor; in TEST() local
66 ASSERT_TRUE(json::ConvertJSONToCBOR(SpanFrom("{}"), &cbor).ok()); in TEST()
67 Dispatchable dispatchable(SpanFrom(cbor)); in TEST()
77 std::vector<uint8_t> cbor; in TEST() local
79 json::ConvertJSONToCBOR(SpanFrom("{\"id\":\"foo\"}"), &cbor).ok()); in TEST()
80 Dispatchable dispatchable(SpanFrom(cbor)); in TEST()
90 std::vector<uint8_t> cbor; in TEST() local
91 ASSERT_TRUE(json::ConvertJSONToCBOR(SpanFrom("{\"id\":42}"), &cbor).ok()); in TEST()
92 Dispatchable dispatchable(SpanFrom(cbor)); in TEST()
102 std::vector<uint8_t> cbor; in TEST() local
[all …]
Dprotocol_core.cc75 if (tokenizer->TokenTag() == cbor::CBORTokenTag::DONE && in Deserialize()
79 if (tokenizer->TokenTag() == cbor::CBORTokenTag::ENVELOPE) in Deserialize()
81 if (tokenizer->TokenTag() != cbor::CBORTokenTag::MAP_START) { in Deserialize()
87 for (; tokenizer->TokenTag() != cbor::CBORTokenTag::STOP; tokenizer->Next()) { in Deserialize()
88 if (tokenizer->TokenTag() != cbor::CBORTokenTag::STRING8) { in Deserialize()
142 if (tag == cbor::CBORTokenTag::TRUE_VALUE) { in Deserialize()
146 if (tag == cbor::CBORTokenTag::FALSE_VALUE) { in Deserialize()
156 bytes->push_back(value ? cbor::EncodeTrue() : cbor::EncodeFalse()); in Serialize()
161 if (state->tokenizer()->TokenTag() != cbor::CBORTokenTag::INT32) { in Deserialize()
171 cbor::EncodeInt32(value, bytes); in Serialize()
[all …]
Ddispatch.cc89 Status s = cbor::CheckCBORMessage(serialized); in Dispatchable()
94 cbor::CBORTokenizer tokenizer(serialized); in Dispatchable()
95 if (tokenizer.TokenTag() == cbor::CBORTokenTag::ERROR_VALUE) { in Dispatchable()
102 assert(tokenizer.TokenTag() == cbor::CBORTokenTag::ENVELOPE); in Dispatchable()
112 if (tokenizer.TokenTag() == cbor::CBORTokenTag::ERROR_VALUE) { in Dispatchable()
116 if (tokenizer.TokenTag() != cbor::CBORTokenTag::MAP_START) { in Dispatchable()
120 assert(tokenizer.TokenTag() == cbor::CBORTokenTag::MAP_START); in Dispatchable()
122 while (tokenizer.TokenTag() != cbor::CBORTokenTag::STOP) { in Dispatchable()
124 case cbor::CBORTokenTag::DONE: in Dispatchable()
128 case cbor::CBORTokenTag::ERROR_VALUE: in Dispatchable()
[all …]
Djson.h42 Status ConvertCBORToJSON(span<uint8_t> cbor, std::string* json);
44 Status ConvertCBORToJSON(span<uint8_t> cbor, std::vector<uint8_t>* json);
46 Status ConvertJSONToCBOR(span<uint8_t> json, std::vector<uint8_t>* cbor);
48 Status ConvertJSONToCBOR(span<uint16_t> json, std::vector<uint8_t>* cbor);
Ddispatch.h22 namespace cbor {
126 bool MaybeParseProperty(cbor::CBORTokenizer* tokenizer);
127 bool MaybeParseCallId(cbor::CBORTokenizer* tokenizer);
128 bool MaybeParseMethod(cbor::CBORTokenizer* tokenizer);
129 bool MaybeParseParams(cbor::CBORTokenizer* tokenizer);
130 bool MaybeParseSessionId(cbor::CBORTokenizer* tokenizer);
Djson.cc1000 Status ConvertCBORToJSONTmpl(span<uint8_t> cbor, C* json) { in ConvertCBORToJSONTmpl() argument
1003 cbor::ParseCBOR(cbor, json_writer.get()); in ConvertCBORToJSONTmpl()
1007 Status ConvertCBORToJSON(span<uint8_t> cbor, std::vector<uint8_t>* json) { in ConvertCBORToJSON() argument
1008 return ConvertCBORToJSONTmpl(cbor, json); in ConvertCBORToJSON()
1011 Status ConvertCBORToJSON(span<uint8_t> cbor, std::string* json) { in ConvertCBORToJSON() argument
1012 return ConvertCBORToJSONTmpl(cbor, json); in ConvertCBORToJSON()
1016 Status ConvertJSONToCBORTmpl(span<T> json, std::vector<uint8_t>* cbor) { in ConvertJSONToCBORTmpl() argument
1018 std::unique_ptr<ParserHandler> encoder = cbor::NewCBOREncoder(cbor, &status); in ConvertJSONToCBORTmpl()
1023 Status ConvertJSONToCBOR(span<uint8_t> json, std::vector<uint8_t>* cbor) { in ConvertJSONToCBOR() argument
1024 return ConvertJSONToCBORTmpl(json, cbor); in ConvertJSONToCBOR()
[all …]
Dprotocol_core.h43 cbor::CBORTokenizer* tokenizer() { return &tokenizer_; } in tokenizer()
47 cbor::CBORTokenizer tokenizer_;
79 cbor::EncodeString8(
102 cbor::EnvelopeEncoder envelope_;
148 if (tokenizer->TokenTag() == cbor::CBORTokenTag::ENVELOPE)
150 if (tokenizer->TokenTag() != cbor::CBORTokenTag::ARRAY_START) {
156 for (; tokenizer->TokenTag() != cbor::CBORTokenTag::STOP;
168 bytes, cbor::EncodeIndefiniteLengthArrayStart());
394 cbor::EncodeIndefiniteLengthMapStart());
Dcbor.h19 namespace cbor {
291 std::vector<uint8_t>* cbor);
295 cbor::MajorType* type,
298 void WriteTokenStart(cbor::MajorType type,
Dcbor.cc15 namespace cbor { namespace
1011 std::vector<uint8_t>* cbor) { in AppendString8EntryToCBORMap() argument
1014 span<uint8_t> bytes(reinterpret_cast<const uint8_t*>(cbor->data()), in AppendString8EntryToCBORMap()
1015 cbor->size()); in AppendString8EntryToCBORMap()
1022 size_t old_size = cbor->size(); in AppendString8EntryToCBORMap()
1029 return Status(Error::CBOR_MAP_STOP_EXPECTED, cbor->size() - 1); in AppendString8EntryToCBORMap()
1030 cbor->pop_back(); in AppendString8EntryToCBORMap()
1031 EncodeString8(string8_key, cbor); in AppendString8EntryToCBORMap()
1032 EncodeString8(string8_value, cbor); in AppendString8EntryToCBORMap()
1033 cbor->push_back(EncodeStop()); in AppendString8EntryToCBORMap()
[all …]
Dprotocol_core_test.cc104 crdtp::cbor::EnvelopeEncoder envelope; in TEST()
106 encoded.push_back(crdtp::cbor::EncodeIndefiniteLengthMapStart()); in TEST()
107 crdtp::cbor::EncodeString8(crdtp::SpanFrom("value"), &encoded); in TEST()
108 crdtp::cbor::EncodeInt32( in TEST()
110 encoded.push_back(crdtp::cbor::EncodeStop()); in TEST()
270 if (serialized_[position] == crdtp::cbor::EncodeTrue()) { in TEST_F()
271 serialized_[position] = crdtp::cbor::EncodeNull(); in TEST_F()
Djson_test.cc718 std::vector<uint8_t> cbor; in TYPED_TEST() local
720 Status status = ConvertJSONToCBOR(SpanFrom(json), &cbor); in TYPED_TEST()
725 Status status = ConvertCBORToJSON(SpanFrom(cbor), &roundtrip_json); in TYPED_TEST()
737 std::vector<uint8_t> cbor; in TYPED_TEST() local
740 ConvertJSONToCBOR(span<uint16_t>(json16.data(), json16.size()), &cbor); in TYPED_TEST()
745 Status status = ConvertCBORToJSON(SpanFrom(cbor), &roundtrip_json); in TYPED_TEST()
/third_party/node/tools/inspector_protocol/lib/
DValues_cpp.template75 namespace cbor {
76 using {{"::".join(config.encoding_lib.namespace + ['cbor'])}}::CBORTokenTag;
77 using {{"::".join(config.encoding_lib.namespace + ['cbor'])}}::CBORTokenizer;
78 using {{"::".join(config.encoding_lib.namespace + ['cbor'])}}::EncodeBinary;
79 using {{"::".join(config.encoding_lib.namespace + ['cbor'])}}::EncodeDouble;
80 using {{"::".join(config.encoding_lib.namespace + ['cbor'])}}::EncodeFalse;
81 using {{"::".join(config.encoding_lib.namespace + ['cbor'])}}::EncodeFromLatin1;
82 using {{"::".join(config.encoding_lib.namespace + ['cbor'])}}::EncodeFromUTF16;
83 using {{"::".join(config.encoding_lib.namespace + ['cbor'])}}::EncodeIndefiniteLengthArrayStart;
84 using {{"::".join(config.encoding_lib.namespace + ['cbor'])}}::EncodeIndefiniteLengthMapStart;
[all …]
Dencoding_h.template145 // See cbor::NewCBOREncoder, cbor::ParseCBOR, json::NewJSONEncoder,
169 namespace cbor {
203 // Checks whether |msg| is a cbor message.
256 // cbor::EnvelopeEncoder - for wrapping submessages
283 // cbor::NewCBOREncoder - for encoding from a streaming parser
297 // cbor::CBORTokenizer - for parsing individual CBOR items
415 // cbor::ParseCBOR - for receiving streaming parser events for CBOR messages
425 // cbor::AppendString8EntryToMap - for limited in-place editing of messages
428 // Modifies the |cbor| message by appending a new key/value entry at the end
430 // If not successful, |cbor| may be corrupted after this call.
[all …]
Dencoding_cpp.template103 namespace cbor {
471 // cbor::EnvelopeEncoder - for wrapping submessages
517 // cbor::NewCBOREncoder - for encoding from a streaming parser
641 // cbor::CBORTokenizer - for parsing individual CBOR items
923 // cbor::ParseCBOR - for receiving streaming parser events for CBOR messages
1122 // cbor::AppendString8EntryToMap - for limited in-place editing of messages
1128 C* cbor) {
1129 // Careful below: Don't compare (*cbor)[idx] with a uint8_t, since
1131 span<uint8_t> bytes(reinterpret_cast<const uint8_t*>(cbor->data()),
1132 cbor->size());
[all …]
/third_party/node/deps/v8/third_party/inspector_protocol/lib/
DValues_cpp.template9 #include "{{config.crdtp.dir}}/cbor.h"
19 namespace cbor {
20 using {{config.crdtp.namespace}}::cbor::ParseCBOR;
21 using {{config.crdtp.namespace}}::cbor::EncodeBinary;
22 using {{config.crdtp.namespace}}::cbor::EncodeDouble;
23 using {{config.crdtp.namespace}}::cbor::EncodeFalse;
24 using {{config.crdtp.namespace}}::cbor::EncodeFromLatin1;
25 using {{config.crdtp.namespace}}::cbor::EncodeFromUTF16;
26 using {{config.crdtp.namespace}}::cbor::EncodeIndefiniteLengthArrayStart;
27 using {{config.crdtp.namespace}}::cbor::EncodeIndefiniteLengthMapStart;
[all …]
DValueConversions_cpp.template40 cbor::CBORTokenizer* tokenizer = state->tokenizer();
42 case cbor::CBORTokenTag::TRUE_VALUE:
44 case cbor::CBORTokenTag::FALSE_VALUE:
46 case cbor::CBORTokenTag::NULL_VALUE:
48 case cbor::CBORTokenTag::INT32:
50 case cbor::CBORTokenTag::DOUBLE:
52 case cbor::CBORTokenTag::STRING8: {
56 case cbor::CBORTokenTag::STRING16: {
60 case cbor::CBORTokenTag::ENVELOPE: {
65 case cbor::CBORTokenTag::BINARY:
[all …]
/third_party/json/include/nlohmann/detail/input/
Dbinary_reader.hpp119 case input_format_t::cbor: in sax_parse()
427 return unexpect_eof(input_format_t::cbor, "value"); in parse_cbor_internal()
459 return get_number(input_format_t::cbor, number) && sax->number_unsigned(number); in parse_cbor_internal()
465 return get_number(input_format_t::cbor, number) && sax->number_unsigned(number); in parse_cbor_internal()
471 return get_number(input_format_t::cbor, number) && sax->number_unsigned(number); in parse_cbor_internal()
477 return get_number(input_format_t::cbor, number) && sax->number_unsigned(number); in parse_cbor_internal()
510 …return get_number(input_format_t::cbor, number) && sax->number_integer(static_cast<number_integer_… in parse_cbor_internal()
516 …return get_number(input_format_t::cbor, number) && sax->number_integer(static_cast<number_integer_… in parse_cbor_internal()
522 …return get_number(input_format_t::cbor, number) && sax->number_integer(static_cast<number_integer_… in parse_cbor_internal()
528 …return get_number(input_format_t::cbor, number) && sax->number_integer(static_cast<number_integer_… in parse_cbor_internal()
[all …]
/third_party/node/deps/v8/src/inspector/
Dv8-inspector-session-impl.cc32 using v8_crdtp::cbor::CheckCBORMessage;
41 Status ConvertToCBOR(StringView state, std::vector<uint8_t>* cbor) { in ConvertToCBOR() argument
44 span<uint8_t>(state.characters8(), state.length()), cbor) in ConvertToCBOR()
46 span<uint16_t>(state.characters16(), state.length()), cbor); in ConvertToCBOR()
51 span<uint8_t> cbor; in ParseState() local
53 cbor = span<uint8_t>(state.characters8(), state.length()); in ParseState()
55 cbor = SpanFrom(converted); in ParseState()
56 if (!cbor.empty()) { in ParseState()
58 protocol::Value::parseBinary(cbor.data(), cbor.size()); in ParseState()
188 std::vector<uint8_t> cbor = message->Serialize(); in serializeForFrontend() local
[all …]
Dstring-util.cc258 if (tokenizer->TokenTag() == cbor::CBORTokenTag::STRING8) { in Deserialize()
263 if (tokenizer->TokenTag() == cbor::CBORTokenTag::STRING16) { in Deserialize()
276 cbor::EncodeFromUTF16( in Serialize()
286 if (tokenizer->TokenTag() == cbor::CBORTokenTag::BINARY) { in Deserialize()
291 if (tokenizer->TokenTag() == cbor::CBORTokenTag::STRING8) { in Deserialize()
305 cbor::EncodeBinary(span<uint8_t>(value.data(), value.size()), bytes); in Serialize()
/third_party/node/tools/inspector_protocol/encoding/
Dencoding.h160 namespace cbor {
424 std::vector<uint8_t>* cbor);
427 std::string* cbor);
431 cbor::MajorType* type,
434 void WriteTokenStart(cbor::MajorType type,
437 void WriteTokenStart(cbor::MajorType type,
490 span<uint8_t> cbor,
493 span<uint8_t> cbor,
497 std::vector<uint8_t>* cbor);
500 std::vector<uint8_t>* cbor);
[all …]
Dencoding.cc95 namespace cbor { namespace
1120 C* cbor) { in AppendString8EntryToCBORMapTmpl() argument
1123 span<uint8_t> bytes(reinterpret_cast<const uint8_t*>(cbor->data()), in AppendString8EntryToCBORMapTmpl()
1124 cbor->size()); in AppendString8EntryToCBORMapTmpl()
1131 size_t old_size = cbor->size(); in AppendString8EntryToCBORMapTmpl()
1138 return Status(Error::CBOR_MAP_STOP_EXPECTED, cbor->size() - 1); in AppendString8EntryToCBORMapTmpl()
1139 cbor->pop_back(); in AppendString8EntryToCBORMapTmpl()
1140 EncodeString8(string8_key, cbor); in AppendString8EntryToCBORMapTmpl()
1141 EncodeString8(string8_value, cbor); in AppendString8EntryToCBORMapTmpl()
1142 cbor->push_back(EncodeStop()); in AppendString8EntryToCBORMapTmpl()
[all …]
/third_party/libcoap/build-env/
DDockerfile.develop14 RUN git clone --depth 1 https://github.com/cabo/cn-cbor.git && cd cn-cbor && ./build.sh all doc ins…
27 COPY --from=0 /usr/local/include/cn-cbor /usr/local/include/cn-cbor
/third_party/json/docs/mkdocs/docs/api/basic_json/
Dinput_format_t.md6 cbor,
19 cbor
/third_party/json/tests/src/
Dunit-regression2.cpp558 json cbor = json::from_cbor("B", true, false); variable
559 CHECK(cbor.is_discarded());
565 json cbor = json::from_cbor(input, true, false); variable
566 CHECK(cbor.is_discarded());
571 json cbor = json::from_cbor(std::string("B"), true, false); variable
572 CHECK(cbor.is_discarded());
/third_party/node/deps/v8/third_party/inspector_protocol/
DBUILD.gn18 "crdtp/cbor.cc",
19 "crdtp/cbor.h",

123