Which JSONParserConfiguration to use in JSONObject/JSONArray constructors

Cerrado
#945 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
38/100
Tipo de issue
Refactorización
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
java

Línea de trabajo

Start with the JSONArray and JSONObject constructors that accept JSONTokener and JSONParserConfiguration, then trace how each configuration is applied to nested values. Compare the constructor behavior and update the corresponding JavaDocs so the single configuration source and expected behavior are explicit.

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

Descripción

Fix in progress

From #927:

What is the purpose of JSONParserConfiguration parameter in JSONArray/JSONObject constructors? Is it not enough to use JSONTokener's JSONParserConfiguration? For example, when calling "JSONArray(JSONTokener x, JSONParserConfiguration jsonParserConfiguration)" constructor the array syntax is checked according to jsonParserConfiguration parameter, but nested objects/arrays syntax is checked according to JSONTokener's configuration. It seems a bit inconsistent.

Both the JSONArray/JSONObject instance and the JSONTokener parameter already have a JSONParserConfiguration. Only one of these should be used. I am leaning towards replacing the JSONTokener config instance with the config param. This should also be called out in the JavaDocs for the corresponding constructors.

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.