Opened 11 years ago
Last modified 4 years ago
#10536 assigned enhancement
[test case] dojox.json.ref: resolveJson should merge attributes from $ref objects to index instances
Reported by: | avoidscorn | Owned by: | |
---|---|---|---|
Priority: | high | Milestone: | 1.15 |
Component: | Dojox | Version: | 1.4.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Suppose we have a partially loaded object in the index, e.g.
index["1"] = {a: 2, _loadObject: ...}
Now, in a subsequent JSON message, the same id is used in another reference, but with different eagerly-provided attributes, e.g.
{$ref: "1", b: 3}
Currently, resolveJson
will not add attribute "b" to the instance already in the index, so the information about attribute "b" is essentially lost. I believe it is a common use case to supply references to the same object with different eagerly-provided attributes in each reference.
Attached is a patch to dojox/json/tests/ref.js that includes a small test case for this issue.
Attachments (1)
Change History (5)
Changed 11 years ago by
Attachment: | ref.js.patch added |
---|
comment:1 Changed 11 years ago by
Owner: | changed from Adam Peller to Kris Zyp |
---|
comment:2 Changed 8 years ago by
Milestone: | tbd → 2.0 |
---|
Patch may be stale, but should consider this for 1.9.
comment:3 Changed 5 years ago by
Milestone: | 2.0 → 1.12 |
---|---|
Owner: | Kris Zyp deleted |
Status: | new → assigned |
Summary: | dojox.json.ref: resolveJson should merge attributes from $ref objects to index instances → [test case] dojox.json.ref: resolveJson should merge attributes from $ref objects to index instances |
comment:4 Changed 4 years ago by
Milestone: | 1.13 → 1.15 |
---|
Ticket planning... move current 1.13 tickets out to 1.15 to make it easier to move tickets into the 1.13 milestone.
Test case patch