Open didibus opened 2 years ago
Ion backend would need to support this. I think Ion textual format does have the functionality. Did you test with latest (2.13.3) version?
Ion backend does support "pretty printing" Ion text, they have some documentation on it here - https://amzn.github.io/ion-docs/guides/cookbook.html#pretty-printing.
It might be down to customizing the IonWriter being used to produce the Text output based on the feature flag.
In the meantime, you could be unblocked by using IonObjectMapper.writeValueAsIonValue
to output to an IonValue
and then pretty-print that value using the IonWriter
methods referenced in the link
Thank you @mcliedtke!
It sounds like this feature could well be implemented by someone with time on their hands.
In the meantime I think IonMapper
might have additional writeValue()
methods that could take properly initialized IonWriter
(not 100% sure as I didn't check but I think it does have some extensions to main ObjectMapper
API).
In the meantime, you could be unblocked by using IonObjectMapper.writeValueAsIonValue to output to an IonValue and then pretty-print that value using the IonWriter methods referenced in the link
I did this for now, and it worked.
Doesn't seem to work with an IonObjectMapper the way it does with the JSON ObjectMapper, any way to accomplish the same?