FasterXML / FasterXML/jackson-modules-base
Support for default values
- Lenguaje dominante
- Java
- Estrellas
- 180
- Forks
- 80
- Merge medio
- 3 h 26 min
- PR fusionados (30 d)
- 1
Descripción
Besides [this](http://stackoverflow.com/questions/37197174/how-to-specify-default-values-when-using-jackson-with-mr-bean) stackoverflow question, I couldn't really find any information related to this topic but it would be nice to extend the support of default values in Jackson, particularly in the context of the MrBean module.
One option could be using annotations:
```java
interface Person {
@DefaultValue("default first name")
String getFirstName();
@DefaultValue("default last name")
String getLastName();
}
```
Another option could be using Java 8 default methods:
```java
interface Person {
default String getFirstName() { return "default first name"; }
default String getLastName() { return "default last name"; }
}
```
Currently, there are two main limitation I see for MrBean:
1. No possibility to specify default values
2. No possibility to use Java 8 Optional
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.