Positive numbers with plus sign not quoted correctly with ALWAYS_QUOTE_NUMBERS_AS_STRINGS
#373
Milestone
ALWAYS_QUOTE_NUMBERS_AS_STRINGS
#373
Hello!
I found a case which is very similar to #182 but for positive numbers with plus sign.
Serializing
14
currently results in"14"
.Serializing
-14
currently results in"-14"
.But Serializing
+14
currently results in+14
, instead of"+14"
.It looks like update
PLAIN_NUMBER_P
regexp with(-|\\+)?[0-9]*(\\.[0-9]*)?
in https://github.com/FasterXML/jackson-dataformats-text/blob/2.15/yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/YAMLGenerator.java#L220 should solve this problem.https://regex101.com/r/eQo6ag/1
Do you have any objections about this fix?
I am ready to open PR =)
The text was updated successfully, but these errors were encountered: