[MGNLREST-117] Facilitate operating on subnodes Created: 25/Sep/17 Updated: 10/Oct/17 Resolved: 09/Oct/17 |
|
| Status: | Closed |
| Project: | Magnolia REST Framework |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.0 |
| Type: | Improvement | Priority: | Neutral |
| Reporter: | Hieu Nguyen Duc | Assignee: | Sang Ngo Huu |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 1d 5h | ||
| Original Estimate: | 1d | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Template: |
|
||||||||
| Acceptance criteria: |
Empty
|
||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||
| Date of First Response: | |||||||||
| Epic Link: | REST Queries | ||||||||
| Sprint: | Saigon 116, Saigon 117 | ||||||||
| Story Points: | 3 | ||||||||
| Description |
|
Current NodeWriter prints out JCR node structure "as is", with all child-nodes being sub-maps. This makes it hard to iterate over child-nodes and to distinguish them from properties. As discussed here, option #2 and #4 look promising and meet the need. – update Only arrays guarantee the order of child-nodes when iterating, so option #4 is our best compromise to start with. {
"title": "SUB-MAPPINGS",
"company": {
"title": "Our Company"
},
"what-we-believe": {
"title": "What We Believe"
},
"careers": {
"title": "Careers"
},
@nodes: ["company", "what-we-believe", "careers"]
}
We will still consider as future improvement/ticket how to give more flexibility there (applying array vs. map serialization selectively). |
| Comments |
| Comment by Christopher Zimmermann [ 28/Sep/17 ] |
|
Some notes on how nodes are used in typical magnolia content structures: |