-
-
Notifications
You must be signed in to change notification settings - Fork 141
Add support for generating IonSexps #242
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
Conversation
Ok, ideally I think this change would go in 2.13 since it changes types a bit... but I assume this is for a bug fix that'd be good to get out sooner. As usual I think I'd want @jobarr-amzn (or one of other developers with knowledge) to add their ok as well. I will probably need some help merging this to |
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.
Overall this looks good for adding support for reading/writing sexp
values.
An interesting backlog item might be a way to more conveniently treat lists as an Ion sexp
. (something like @JsonFormat(shape = JsonFormat.Shape.SEXP
).
ion/src/test/java/com/fasterxml/jackson/dataformat/ion/GenerateSexpTest.java
Outdated
Show resolved
Hide resolved
ion/src/test/java/com/fasterxml/jackson/dataformat/ion/GenerateSexpTest.java
Outdated
Show resolved
Hide resolved
@mcliedtke On |
Yeah, this is maybe something peculiar about Ion that it has both |
Thanks I appreciate the flexibility! It would be really great if we could get this into 2.12.
Sure, I'll add a test against the message and add some more tests for |
Add writeStartSexp and writeEndSexp methods to the IonGenerator. This requires extending the JsonWriteContext into a new class that recognizes the sexp context.
@mcliedtke right, Format-specific formatting aspects is one part of configurability that is sort of missing from Jackson: while it is now possible to more easily have format-specific read/write settings, those are global and very simple (on/off). Conversely it is also quite easy to have per-mapper-format-specific settings of any kind (via ObjectMapper.Builder, sub-classable), but those are also immutable and global (that is, have to be set before use and cannot be change on per-read or per-write basis; nor scoped to specific property). Another possible approach is to improve support to format-specific value objects (there is Above are just concepts that exist and might be usable; I don't know how exactly they would apply. |
@cowtowncoder Thanks for the background, I'll poke around and maybe create a issue for it. Latest changes LGTM |
Any blockers to merging this? Thanks! |
Just my time: Jackson is just my avocation, not job. This change will likely not merge cleanly to master and I'll need to figure that out. |
Was able to merge to master; also realized that pretty-printing does not really work as is and filed a new issue (#245). Will need help resolving that one, but at least this is merged. |
Thanks for merging this! I really appreciate the prompt responses. |
@JacekLach np! Do you think there are other changes coming soon -- I am thinking of possibly releasing 2.12.2 over the weekend, but wanted to see if there might be something else pending. |
Nothing else from my end :) |
Add writeStartSexp and writeEndSexp methods to the IonGenerator. This requires extending the
JsonWriteContext into a new class that recognizes the sexp context.