FasterXML / FasterXML/jackson-dataformats-text

Add an option to serialize List<String> as "comma,separated,value"

オープン
#1 コメント 4 件 リアクション 5 件 担当者 0 名 GitHub で見る
Properties
主要言語
Java
スター
455
フォーク
164
平均マージ
6日 10時間
マージ済み PR(30日)
2

説明

(note: moved from https://github.com/FasterXML/jackson-dataformat-properties/issues/5)

Comma-separated lists are quite common in property or *.ini style configuration files. The only way I found to generate/parse these with `JavaPropsMapper` is to annotate a custom value class with `@JsonCreator` and `@JsonValue`, but this also affects other data formats that do have a proper list representation. If I want to convert between *.ini and json/yaml/xml, it gets quite messy.

I would like to propose (and help with) the following feature: Arrays or lists of primitive types can be configured to be serialized and deserialized as CSV (Split at configurable delimiter, strip whitespace around delimiter, do not split or remove whitespace within quoted strings, remove quotes from quoted strings).

This would make *.ini style configuration a real alternative to json/yaml/xml for some use cases.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。