FasterXML / FasterXML/jackson-core

Allow registering "string-converter hook", for low-level coercion or String mutation

未关闭
#355 1 条评论 7 个 reaction 已指派 0 人 在 GitHub 查看
3.x most-wanted
主要语言
Java
星标
2.4k
派生
928
平均合并
2 天 18 小时
30 天内合并 PR
24

描述

One common wish for processing (at various levels) is to be able to modify incoming String values, to either:

1. Modify Strings themselves (trim whitespace, change casing etc), or
2. Change type of scalar token reported (coercion): for example, change String value "12" into number `12` (`int`)

While such functionality is most often needed for formats like `CSV` and `XML` (and perhaps `properties`), it seems that due to needed across multiple formats this would really make sense as `jackson-core` functionality.

What probably makes sense is to try to figure out abstractions needed, interaction, but require implementations to wire actual activity. In fact, it is almost certainly impossible to do it efficiently and cleanly from within `jackson-core` itself (or from databind).
But it should be possible to implement it in core both for API, and wiring for JSON, and then add similar functionality for other textual (and maybe, if there's demand, for binary?) codecs.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。