Suggestion: Add more constructors with parameters for JSONParserConfiguration

Abierto
#939 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
42/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
java

Línea de trabajo

Start by locating JSONParserConfiguration and reviewing its existing withStrictMode() and related configuration methods. Check the relevant configuration tests and API conventions before assessing the requested parameterized constructors; done means the requested settings can be supplied at construction and existing behavior remains covered.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

No changes at this time

to me it was counter intuitive to create a default configured JSONParserConfiguration to then call withStrictMode() on it returning a clone and making the first instance obsolete. I would even need to create multiple clones until I have the correct configuration, when I want to set multiple values. I would like to be able to create my desired configuration in one go.

This would require a Constructor JSONParserConfiguration(boolean overwriteDuplicateKey, boolean strictMode) or even JSONParserConfiguration(boolean overwriteDuplicateKey, boolean strictMode, boolean keepStrings, int maxNestingDepth).

I would also allow the make the configuration fiels final although that would be a backwards compatible breaking change, and therefore will most probably not be added. I would make it reasier to reason about the codes behaviour and avoid the potential of changing an already used configuration.

What do you think of it?

Lenguaje dominante
Java
Estrellas
4.7k
Forks
2.6k
Merge medio
11 d 18 min
PR fusionados (30 d)
1

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de stleary/JSON-java

Todos los issues de stleary/JSON-java

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.