Azure / Azure/azure-documentdb-java

new Document(JSONObject) constructor - yields empty results

未關閉
#67 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
bug
主要語言
Java
星號
51
分支
52
PR 合併指標
30 天內沒有已合併 PR

描述

When running
new Document(JSONObject) -> the document received is empty.
Running new Document(JSONObject.toString()) - works fine.
The root issue is that for some reason new JSONObject(JSONObject) returns an empty JSONObject (and that's what happens in JSONSerializable's constructor):

``
protected JsonSerializable(JSONObject jsonObject) {
this.propertyBag = new JSONObject(jsonObject);
}
``

貢獻指南

開啟貢獻指南

研究方向

從報告中展示的 protected JsonSerializable(JSONObject) 建構函式開始,然後追蹤 Document(JSONObject) 如何使用它。重現傳入 JSONObject 與傳入其 toString() 結果之間的差異,並檢查產生的 propertyBag 內容。完成的標準是:從一個已填充的 JSONObject 建構 Document 時能夠保留其欄位,而不是產生一個空文件。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
java
領域
database
Issue 類型
缺陷
難度
2/5
預估耗時
1-3 小時
活躍度
停滯
描述清晰度
基本清楚
新手友好度
42/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。