-
Notifications
You must be signed in to change notification settings - Fork 50
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
Support tagged nodes #7
Support tagged nodes #7
Conversation
EdwarDDay
commented
Sep 9, 2019
- implement Support Polymorphic serialization #4
- support yaml tags for polymorphic de-/serialization
14edb9b
to
30fc12b
Compare
- implement charleskorn#4 - support yaml tags for polymorphic de-/serialization
30fc12b
to
2029f22
Compare
Hey @EdwarDDay, thanks for the PR! Before I take a closer look, could you please fix the compilation error Travis is reporting? |
- fix java 8 bug
Codecov Report
@@ Coverage Diff @@
## master #7 +/- ##
===========================================
+ Coverage 93.55% 93.7% +0.14%
- Complexity 101 108 +7
===========================================
Files 9 9
Lines 388 429 +41
Branches 76 85 +9
===========================================
+ Hits 363 402 +39
- Misses 10 13 +3
+ Partials 15 14 -1
Continue to review full report at Codecov.
|
- fix java 8 bug
|
||
context("given some input representing an object with a tagged value as a key") { | ||
val input = """ | ||
!<sealedInt> { }: something |
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.
To make the intent of this test clear, could you remove the { }
and replace it with a string (eg. !<sealedInt> thing: something
)?
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.
That's not yet possible, but I can create another PR after that one. Currently scalar nodes with tags are not supported and supporting them would be a new feature with a new PR in my opinion.
|
||
context("given some tagged input representing an object where the resulting type should be a sealed class (int)") { | ||
val input = """ | ||
element: !<sealedInt> |
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 there any way to support !sealedInt
instead of !<sealedInt>
?
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 think that can be done via the %TAG
directive, but I'm not sure how to do that.
- cleanup tests
Hey @EdwarDDay, thanks for incorporating my feedback and apologies for the delay in getting back to you. This is looking really good. The only things I'd like to see before I merge this are:
|
- remove unused code - ignore tags on lists an maps if not needed
I removed the |
Looks good to me, thanks @EdwarDDay! |