FasterXML / FasterXML/jackson-dataformats-text

Yaml keys starting with number are being double quoted when mapper.writeValue()

Đang mở
#447 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
yaml
Ngôn ngữ chính
Java
Star
455
Fork
164
Merge trung bình
6 ngày 10 giờ
Pull request đã merge (30 ngày)
2

Mô tả

I am writing a YAML file with mapper.writeValue() but the keys that start with a number are being double quoted even if the original key doesn't have the quotes.
I understand that the double quotes are being added because mapper want to avoid YAML to consider a String as a number, but it would be better for me to avoid the quotes.
I've tried with enable(YAMLGenerator.Feature.MINIMIZE_QUOTES)) but not helping with this issue.

Example:
//original key -> after writeValue()
6712dd2a-2695-49cb-89a8-9b5592951522: -> "6712dd2a-2695-49cb-89a8-9b5592951522":

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.