FasterXML / FasterXML/jackson-dataformats-text
Infer non-string types from property values.
- Langage dominant
- Java
- Étoiles
- 455
- Forks
- 164
- Merge moyen
- 6 j 10 h
- PR mergées (30 j)
- 2
Description
It would be great if there was a way to specify a non-string property value when mapping to the generic `ObjectNode` type. For example:
```
Properties props = new Properties();
props.setProperty("booleanExample", "true");
props.setProperty("integerExample", "4");
props.setProperty("stringExample", "some string");
ObjectNode root = new JavaPropsMapper().readValue(props, ObjectNode.class);
System.out.println(new ObjectMapper().writeValueAsString(root));
```
This code outputs
`{"integerExample":"4","booleanExample":"true","stringExample":"some string"}`
But it would be great if there was some configuration or way to escape property values such that the output inferred integer or boolean types from the values themselves:
`{"integerExample":4,"booleanExample":true,"stringExample":"some string"}`
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.