Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Inconsistent null Handling Across JSONObject Construction Paths

オープン
#1,049 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
64/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
java
領域
backend

調査の方向性

Start by tracing the three construction paths shown in the reproduction: the String constructor, Map constructor, and put() call. Compare their current null behavior and add or update tests for each path; done means all retain a JSON null value consistently and the relevant test suite passes.

索引モデルが issue の本文から書いたものです。

説明

Active discussion Investigating

Jar version : json-20251224.jar

Reproduction :

// String constructor — null preserved
new JSONObject("{\"name\":null}");         // {"name":null}

// Map constructor — null dropped
Map<Object, Object> map = new HashMap<>();
map.put("name", null);
new JSONObject(map);                       // {}

// put() — null dropped
JSONObject json = new JSONObject();
json.put("name", (String) null);           // {}

Expected :
All construction paths should treat null consistently. Per the JSON spec (RFC 8259), null is a valid value and should be retained.

主要言語
Java
スター
4.7k
フォーク
2.6k
平均マージ
6日 20時間
マージ済み PR(30日)
2

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

stleary/JSON-java のほかの issue

stleary/JSON-java の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。