Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel6
outlinefalse
stylenone
typelist
printabletrue

Issues and Decisions table

...

Issue/Question

...

Panel
panelIconId1f4a1
panelIcon:bulb:
panelIconText💡
bgColor#E6FCFF

Use Discussion notes to capture meeting items, assign owners, and track actions and decisions.

Date

Item

Owner

Notes

Relevant Links

@someone

  •  Action

    Problem Statement

    When a list is fetched using Get a node API then instead of returning a JSON list containing n-number of list items, the API returns each list item as individual JSON object. And each of these JSON objects have same name as the list name.

    ...

    Expand
    titleList "books" when queried using Query a Node API with xpath to list node: /bookstore/categories[@code=4]/books
    Code Block
    [
        {
            "books": {
                "title": "Book 1",
                "lang": "N/A",
                "price": 11,
                "editions": [2009]
            }
        },
        {
            "books": {
                "title": "Book 2",        
                "lang": "German",
                "price": 39,
                "editions": [2007, 2013, 2021]
            }
        }
    ]

    Associated problems

    Impact on Delta Feature

    The inconsistency described above extends to CPS Delta feature when using it to compare list nodes.

    ...

    So, when comparing JSON containing a list, to a list fetched from the data base, an inconsistent delta is generated because logically the JSON list supplied as input by the user is compared to the first JSON object of the same name, returned by the code. This comparison can be imagined as follows:

    Expand
    titleVisual comparison of data when JSON list is provided by user

    ...

    and compared to JSON list fetched from database

    ...

    JSON list provided by user

    JSON

    ...

    objects fetched from database

    Code Block
    languagejson
    {
        "books": [
          {
                "title": "Book 1",
                "lang": "N/A",
                "price": 11,
                "editions": [2009]
          },
          {
                "title": "Book 2",        
                "lang": "German",
                "price": 39,
                "editions": [2007, 2013, 2021]
          }
        ]
      }

    ...

    Code Block

    ...

    titleJSON objects
    languagejson
    [
        {
            "books": {
                "title": "Book 1",
                "lang": "N/A",
                "price": 11,
                "editions": [2009]
            }
        },
        {
            "books": {
                "title": "Book 2",        
                "lang": "German",
                "price": 39,
                "editions": [2007, 2013, 2021]
            }
        }
    ]

    Problem extends to root node xpath

    This behavior extends to list items stored under root node as well. So, this case needs to be taken into consideration as well

    Proposed Solution

    Info

    WIP