option to parse cbor at set depth only
See original GitHub issueI would like to have an option that can allow to parse CBOR at set depth and return array/map with resulting remaining CBOR
eg. below CBOR is a map of 2 items with keys 0, and 1
a200828258200eb27dc73da5a83e42ac63ff6d9f86db182f554ae175e6f66acf48c6bdd28930584013feb04f914e5ec16bdcc343604b3aef2640fa6be1b74e1096f93bdedaba17f4e4f00aa688c09182881ecb801255c1b7f24bda432c017a2da614261338c8ea03825820ca98beb4dd9477e8a0d800c2e2989c9f32e9ea384b30521e4c03df1eeb73920f5840549d800db8b91b5cf7fb35e7447a59b1577a58fb029a688da4831d65903b1308fbcd5b856ac8424295f7d5d9c19a5f1038b90dd54802038d6ae7850450e8510701818200581c8fb4ba5ddf2af3075162567d61456e3482f3f462f60d21d480a88828
After parsing I would like to get a result as below,
Map {
0 -> unparsed CBOR as is that is under this key (0)
1 -> unparsed CBOR as is that is under this key (1)
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
jsoncons/cbor_options.md at master - GitHub
The maximum nesting depth allowed when decoding and encoding CBOR. Default is 1024. Parsing can have an arbitrarily large depth limited only by...
Read more >Concise Binary Object Representation (CBOR) - IETF
CBOR decoders by definition only return contents from well-formed data ... or exhaust the stack depth by setting up deeply nested items.
Read more >XS - Concise Binary Object Representation (CBOR, RFC7049)
Setting the maximum depth to one disallows any nesting, so that ensures that the object is only a single hash/object or array. If...
Read more >RFC 7049: Concise Binary Object ... - » RFC Editor
1. Incomplete CBOR Data Items The representation of a CBOR data item has a specific length, determined by its initial bytes and by...
Read more >XS - Concise Binary Object Representation (CBOR, RFC7049)
Setting the maximum depth to one disallows any nesting, so that ensures that the ... The opposite of "encode": expects CBOR data and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Take a look at the discussion thread I just started there so you can influence my approach before I go too far: https://github.com/hildjj/cbor-wasm/discussions/12
Sure, I will give it a shot.
very interesting what you doing with cbor-wasm 👌👌. Would love to see this feature available in there.