Repository navigation
Experimental NumberFormatter for JSON writer
#184
Marcono1234
started this conversation in
Ideas
Replies: 1 comment
|
An alternative would be something more low-level, like serde_json's However, that might be too low-level, covering things which the user should not be able to customize, e.g. how a JSON |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Struson 0.8 will include a new experimental trait
NumberFormatter. This trait is intended for customizing howJsonStreamWriterformats numbers (u8,f64, ...) as JSON number strings.This discussion here is for collecting your feedback on this new functionality, for example:
NumberFormatterNumberFormatter::format_number_strDo you think that method is useful?
JsonWriter::number_formatterIn case you are implementing a custom
JsonWriter, does that method make sense for your use case?(note that currently Struson's Serde integration uses it when serializing numbers as map keys)
Any feedback is appreciated! Ideally also with a bit of context on your use case.
This helps deciding whether to stabilize this API or how to refactor and improve it.
All reactions