Uploaded image for project: 'Magnolia REST Framework'
  1. Magnolia REST Framework
  2. MGNLREST-117

Facilitate operating on subnodes

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Neutral
    • 2.0
    • None
    • None
    • None
    • Saigon 116, Saigon 117
    • 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).

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                sang.ngo Sang Ngo Huu
                hieu.nguyen Hieu Nguyen Duc
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Task DoD

                    Time Tracking

                      Estimated:
                      Original Estimate - 1d Original Estimate - 1d
                      1d
                      Remaining:
                      Remaining Estimate - 0d
                      0d
                      Logged:
                      Time Spent - 1d 5h
                      1d 5h