-
-
Notifications
You must be signed in to change notification settings - Fork 151
Closed
Milestone
Description
jackson-dataformat-yaml 2.8.11
read file config like this:
gemfireSwitchForRegions:
maxConnections: '20'
user: 'OFF'
legalEntity: 'ON'
----
java
ObjectMapper objectMapper = new ObjectMapper(new YAMLFactory().enable(Feature.MINIMIZE_QUOTES));
JsonNode jsonNode = objectMapper.readTree(inputStream);
SequenceWriter sw = objectMapper.writer().writeValues(System.out);
sw.write(jsonNode);
----
output:
gemfireSwitchForRegions:
maxConnections: 20
user: OFF
legalEntity: ON
read file config like this:
gemfireSwitchForRegions:
maxConnections: '20'
user: OFF
legalEntity: ON
----
java
ObjectMapper objectMapper = new ObjectMapper(new YAMLFactory().enable(Feature.MINIMIZE_QUOTES));
JsonNode jsonNode = objectMapper.readTree(inputStream);
SequenceWriter sw = objectMapper.writer().writeValues(System.out);
sw.write(jsonNode);
----
output:
gemfireSwitchForRegions:
maxConnections: 20
user: false
legalEntity: true
why in the first case it will convert it will output OFF/ON, but when it reads OFF/ON, it will change to false/true?
Metadata
Metadata
Assignees
Labels
No labels