-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(parse_cbor): add parse_cbor function #1152
base: main
Are you sure you want to change the base?
Conversation
8d6a19d
to
1ca2e81
Compare
1ca2e81
to
554d4d0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @MiracleWisp, thank you for your contribution!
src/stdlib/parse_cbor.rs
Outdated
| Kind::object(Collection::any()) | ||
} | ||
|
||
fn type_def() -> TypeDef { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the intention for this and inner_kind()
to be identical to JSON type defs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, cbor uses the same data model as JSON (https://cbor.io/)
I will provide more tests to cover other types besides object and create a PR with documentation to the main vector repository
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the explanation.
TIOLI: we can extract these type defs under a new directory src/stdlib/json_utils
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved type defs to separate module and provided more examples for parse_cbor
b1d7103
to
1ecef46
Compare
dd269f4
to
4193d5f
Compare
4193d5f
to
38f70bb
Compare
@@ -0,0 +1,2 @@ | |||
[overrides] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't recall what does this do. Did you run dd-rust-license-tool
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dd-rust-licence-tool fails without this config because "crunchy" package doesn't have repository config in cargo.toml
eira-fransham/crunchy#9
Summary
In this PR I would like to add support for cbor. We use this format as an alternative to JSON for more efficient data transfer to Kafka. And we would really like to be able to use vector in our projects
Change Type
Is this a breaking change?
How did you test this PR?
Unit tests are provided in this PR
Does this PR include user facing changes?
our guidelines.
Checklist
run
dd-rust-license-tool write
and commit the changes. More details here.References