Home
last modified time | relevance | path

Searched refs:cbor (Results 1 - 25 of 34) sorted by relevance

12

/third_party/node/deps/v8/third_party/inspector_protocol/crdtp/
H A Ddispatch_test.cc7 #include "cbor.h"
65 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; TEST() local
117 std::vector<uint8_t> cbor; TEST() local
134 std::vector<uint8_t> cbor; TEST() local
151 std::vector<uint8_t> cbor; TEST() local
170 std::vector<uint8_t> cbor; TEST() local
187 std::vector<uint8_t> cbor; TEST() local
202 std::vector<uint8_t> cbor; TEST() local
242 std::vector<uint8_t> cbor; TEST() local
[all...]
H A 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 in Deserialize()
[all...]
H A Ddispatch.cc8 #include "cbor.h"
89 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 in Dispatchable()
[all...]
H A 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);
H A Ddispatch.h22 namespace cbor { namespace
24 } // 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);
H A Dcbor.h19 namespace cbor { namespace
53 // Checks whether |msg| is a cbor message.
108 // cbor::EnvelopeEncoder - for wrapping submessages
133 // cbor::NewCBOREncoder - for encoding from a streaming parser
144 // cbor::CBORTokenizer - for parsing individual CBOR items
273 // cbor::ParseCBOR - for receiving streaming parser events for CBOR messages
283 // cbor::AppendString8EntryToMap - for limited in-place editing of messages
286 // Modifies the |cbor| message by appending a new key/value entry at the end
288 // If not successful, |cbor| may be corrupted after this call.
291 std::vector<uint8_t>* cbor);
[all...]
H A Dprotocol_core.h14 #include "cbor.h"
43 cbor::CBORTokenizer* tokenizer() { return &tokenizer_; } in tokenizer()
47 cbor::CBORTokenizer tokenizer_;
79 cbor::EncodeString8( in AddField()
102 cbor::EnvelopeEncoder envelope_;
148 if (tokenizer->TokenTag() == cbor::CBORTokenTag::ENVELOPE) in Deserialize()
150 if (tokenizer->TokenTag() != cbor::CBORTokenTag::ARRAY_START) { in Deserialize()
156 for (; tokenizer->TokenTag() != cbor::CBORTokenTag::STOP; in Deserialize()
168 bytes, cbor::EncodeIndefiniteLengthArrayStart()); in Serialize()
394 cbor
[all...]
H A Djson.cc14 #include "cbor.h"
1000 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 in ConvertJSONToCBORTmpl()
1023 ConvertJSONToCBOR(span<uint8_t> json, std::vector<uint8_t>* cbor) ConvertJSONToCBOR() argument
1027 ConvertJSONToCBOR(span<uint16_t> json, std::vector<uint8_t>* cbor) ConvertJSONToCBOR() argument
[all...]
H A Dcbor.cc5 #include "cbor.h"
15 namespace cbor { namespace
345 // cbor::EnvelopeEncoder - for wrapping submessages
373 // cbor::NewCBOREncoder - for encoding from a streaming parser
490 // cbor::CBORTokenizer - for parsing individual CBOR items
779 // cbor::ParseCBOR - for receiving streaming parser events for CBOR messages
1006 // cbor::AppendString8EntryToMap - for limited in-place editing of messages
1011 std::vector<uint8_t>* cbor) { in AppendString8EntryToCBORMap()
1012 // Careful below: Don't compare (*cbor)[idx] with a uint8_t, since in AppendString8EntryToCBORMap()
1014 span<uint8_t> bytes(reinterpret_cast<const uint8_t*>(cbor in AppendString8EntryToCBORMap()
1009 AppendString8EntryToCBORMap(span<uint8_t> string8_key, span<uint8_t> string8_value, std::vector<uint8_t>* cbor) AppendString8EntryToCBORMap() argument
[all...]
H A Dprotocol_core_test.cc9 #include "cbor.h"
104 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()
H A Djson_test.cc17 #include "cbor.h"
718 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/deps/v8/src/inspector/
H A Dv8-inspector-session-impl.cc7 #include "../../third_party/inspector_protocol/crdtp/cbor.h"
32 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 in ParseState()
188 std::vector<uint8_t> cbor = message->Serialize(); serializeForFrontend() local
455 std::vector<uint8_t> cbor; schedulePauseOnNextStatement() local
469 std::vector<uint8_t> cbor; breakProgram() local
[all...]
H A 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()
H A Dv8-stack-trace-impl.cc134 std::vector<uint8_t> cbor; in V8StackTraceId()
137 v8_crdtp::span<uint8_t>(json.characters8(), json.length()), &cbor); in V8StackTraceId() local
140 v8_crdtp::span<uint16_t>(json.characters16(), json.length()), &cbor); in V8StackTraceId() local
143 protocol::Value::parseBinary(cbor.data(), cbor.size())); in V8StackTraceId()
H A Dv8-runtime-agent-impl.cc963 std::vector<uint8_t> cbor; in reportExecutionContextCreated() local
965 v8_crdtp::span<uint16_t>(aux.characters16(), aux.length()), &cbor); in reportExecutionContextCreated() local
967 protocol::Value::parseBinary(cbor.data(), cbor.size()))); in reportExecutionContextCreated()
/third_party/json/include/nlohmann/detail/input/
H A 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_t>(-1) - number); in parse_cbor_internal()
516 return get_number(input_format_t::cbor, number) && sax->number_integer(static_cast<number_integer_t>(-1) - number); in parse_cbor_internal()
522 return get_number(input_format_t::cbor, number) && sax->number_integer(static_cast<number_integer_t>(-1) - number); in parse_cbor_internal()
528 return get_number(input_format_t::cbor, numbe in parse_cbor_internal()
[all...]
/third_party/node/tools/inspector_protocol/encoding/
H A Dencoding.h136 // See cbor::NewCBOREncoder, cbor::ParseCBOR, json::NewJSONEncoder,
160 namespace cbor { namespace
194 // Checks whether |msg| is a cbor message.
247 // cbor::EnvelopeEncoder - for wrapping submessages
274 // cbor::NewCBOREncoder - for encoding from a streaming parser
288 // cbor::CBORTokenizer - for parsing individual CBOR items
406 // cbor::ParseCBOR - for receiving streaming parser events for CBOR messages
416 // cbor::AppendString8EntryToMap - for limited in-place editing of messages
419 // Modifies the |cbor| messag
[all...]
H A Dencoding.cc95 namespace cbor { namespace
463 // cbor::EnvelopeEncoder - for wrapping submessages
509 // cbor::NewCBOREncoder - for encoding from a streaming parser
633 // cbor::CBORTokenizer - for parsing individual CBOR items
915 // cbor::ParseCBOR - for receiving streaming parser events for CBOR messages
1114 // cbor::AppendString8EntryToMap - for limited in-place editing of messages
1120 C* cbor) { in AppendString8EntryToCBORMapTmpl()
1121 // Careful below: Don't compare (*cbor)[idx] with a uint8_t, since in AppendString8EntryToCBORMapTmpl()
1123 span<uint8_t> bytes(reinterpret_cast<const uint8_t*>(cbor->data()), in AppendString8EntryToCBORMapTmpl()
1124 cbor in AppendString8EntryToCBORMapTmpl()
1118 AppendString8EntryToCBORMapTmpl(span<uint8_t> string8_key, span<uint8_t> string8_value, C* cbor) AppendString8EntryToCBORMapTmpl() argument
1154 AppendString8EntryToCBORMap(span<uint8_t> string8_key, span<uint8_t> string8_value, std::vector<uint8_t>* cbor) AppendString8EntryToCBORMap() argument
1159 AppendString8EntryToCBORMap(span<uint8_t> string8_key, span<uint8_t> string8_value, std::string* cbor) AppendString8EntryToCBORMap() argument
2140 ConvertCBORToJSONTmpl(const Platform& platform, span<uint8_t> cbor, C* json) ConvertCBORToJSONTmpl() argument
2150 ConvertCBORToJSON(const Platform& platform, span<uint8_t> cbor, std::vector<uint8_t>* json) ConvertCBORToJSON() argument
2155 ConvertCBORToJSON(const Platform& platform, span<uint8_t> cbor, std::string* json) ConvertCBORToJSON() argument
2162 ConvertJSONToCBORTmpl(const Platform& platform, span<T> json, C* cbor) ConvertJSONToCBORTmpl() argument
2169 ConvertJSONToCBOR(const Platform& platform, span<uint8_t> json, std::string* cbor) ConvertJSONToCBOR() argument
2174 ConvertJSONToCBOR(const Platform& platform, span<uint16_t> json, std::string* cbor) ConvertJSONToCBOR() argument
2179 ConvertJSONToCBOR(const Platform& platform, span<uint8_t> json, std::vector<uint8_t>* cbor) ConvertJSONToCBOR() argument
2184 ConvertJSONToCBOR(const Platform& platform, span<uint16_t> json, std::vector<uint8_t>* cbor) ConvertJSONToCBOR() argument
[all...]
H A Dencoding_test.cc137 namespace cbor { namespace
157 // cbor::CBORTokenizer - for parsing individual CBOR items
423 // set to their index. 250 is interesting because the cbor spec uses a in TEST()
670 // cbor::NewCBOREncoder - for encoding from a streaming parser
819 // cbor::ParseCBOR - for receiving streaming parser events for CBOR messages
862 std::vector<uint8_t> bytes = {cbor::InitialByteForEnvelope(), in TEST()
863 cbor::InitialByteFor32BitLengthByteString(), in TEST()
868 bytes.push_back(cbor::EncodeIndefiniteLengthMapStart()); in TEST()
873 bytes.push_back(cbor::EncodeStop()); in TEST()
1199 // cbor
1844 TypeParam cbor; TYPED_TEST() local
1865 TypeParam cbor; TYPED_TEST() local
[all...]
/third_party/json/tests/src/
H A 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/libwebsockets/include/libwebsockets/
H A Dlws-lecp.h261 uint8_t cbor[64]; /* literal cbor capture */ member
360 * lws_lec_init() - prepare a cbor writing context
362 * \param ctx: the cbor writing context to prepare
366 * Prepares a cbor writing context so that les_lec_printf can be used to
373 * lws_lec_setbuf() - update the output buffer for an initialized cbor writing ctx
375 * \param ctx: the cbor writing context to prepare
379 * Leaves the cbor writing context state as it is, but resets the output buffer
386 * lws_lec_vsprintf() - write into a cbor writing context
388 * \param ctx: the cbor writin
[all...]
/third_party/json/docs/examples/
H A Dsax_parse__binary.cpp104 bool result = json::sax_parse(vec, &sec, json::input_format_t::cbor); in main()
/third_party/json/tests/abi/include/nlohmann/
H A Djson_v3_10_5.hpp5233 enum class input_format_t { json, cbor, msgpack, ubjson, bson };
8281 case input_format_t::cbor:
8584 return unexpect_eof(input_format_t::cbor, "value");
8616 return get_number(input_format_t::cbor, number) && sax->number_unsigned(number);
8622 return get_number(input_format_t::cbor, number) && sax->number_unsigned(number);
8628 return get_number(input_format_t::cbor, number) && sax->number_unsigned(number);
8634 return get_number(input_format_t::cbor, number) && sax->number_unsigned(number);
8667 return get_number(input_format_t::cbor, number) && sax->number_integer(static_cast<number_integer_t>(-1) - number);
8673 return get_number(input_format_t::cbor, number) && sax->number_integer(static_cast<number_integer_t>(-1) - number);
8679 return get_number(input_format_t::cbor, numbe
[all...]
/third_party/json/single_include/nlohmann/
H A Djson.hpp6103 enum class input_format_t { json, cbor, msgpack, ubjson, bson, bjdata }; member in detail::input_format_t
9193 case input_format_t::cbor:
9501 return unexpect_eof(input_format_t::cbor, "value");
9533 return get_number(input_format_t::cbor, number) && sax->number_unsigned(number);
9539 return get_number(input_format_t::cbor, number) && sax->number_unsigned(number);
9545 return get_number(input_format_t::cbor, number) && sax->number_unsigned(number);
9551 return get_number(input_format_t::cbor, number) && sax->number_unsigned(number);
9584 return get_number(input_format_t::cbor, number) && sax->number_integer(static_cast<number_integer_t>(-1) - number);
9590 return get_number(input_format_t::cbor, number) && sax->number_integer(static_cast<number_integer_t>(-1) - number);
9596 return get_number(input_format_t::cbor, numbe
[all...]
/third_party/libwebsockets/lib/misc/
H A Dlecp.c371 lecp_parse(struct lecp_ctx *ctx, const uint8_t *cbor, size_t len) in lecp_parse() argument
382 c = *cbor++; in lecp_parse()
391 ctx->cbor[ctx->cbor_pos++] = c; in lecp_parse()
392 if (ctx->cbor_pos == sizeof(ctx->cbor) && in lecp_parse()

Completed in 47 milliseconds

12