-
Notifications
You must be signed in to change notification settings - Fork 80
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
Open up the coercion stack #224
Conversation
Codecov Report
@@ Coverage Diff @@
## master #224 +/- ##
==========================================
- Coverage 79.97% 79.74% -0.23%
==========================================
Files 42 42
Lines 2597 2622 +25
Branches 150 151 +1
==========================================
+ Hits 2077 2091 +14
- Misses 370 380 +10
- Partials 150 151 +1
Continue to review full report at Codecov.
|
test/jackdaw/serdes/avro_test.clj
Outdated
:type-registry (merge avro/+base-schema-type-registry+ | ||
avro/+UUID-type-registry+)} | ||
valid-edn) | ||
(json/read-str))] |
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.
if you add a keywordize-keys
here (or probably pass an option to json/read-string) you can avoid all the get
below and just use the usual keyword syntax.
You can remove that from the description of the PR since you added them |
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.
LGTM
A few people have noticed that the JSON representation of an avro object is a bit different to the edn representation of an avro object. This behaviour was originally copied from the abracad.avro project but it makes it a little bit inconvenient to work with data obtained via more "avro-oriented" tools like the kafka-avro-console-consumer or the avro-random-generator.
The pair of functions in this PR make it a bit easier to convert between these two representations.
Example Usage
as-json
as-edn
Checklist