Uploaded image for project: 'VXQuery (Retired)'
  1. VXQuery (Retired)
  2. VXQUERY-226

Issue in JSONiq Object key listing and Array unboxing

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • None
    • Important

    Description

      The code

      let $x := {
      “name” :

      {“id” : 123, “first” : “Riyafa”, “Last” : “Abdul Hameed”}

      }
      return $x(“name”)()

      returns

      {“id” : 123, “first” : “Riyafa”, “Last” : “Abdul Hameed”}

      but the code,

      let $x := {
      “name” :

      {“id” : 123, “first” : “Riyafa”, “Last” : “Abdul Hameed”}

      }
      let $y := $x(“name”)
      return $y()

      returns

      id
      first
      Last

      But, as both code should return:

      id
      first
      Last

      The same issue is present in Array unboxing:
      For example the code

      let $x := [
      [ “mercury”, “venus”, “earth”, “mars” ],
      [ “monday”, “tuesday”, “wednesday”, “thursday” ]
      ]
      return $x(1)()

      returns

      [ “mercury”, “venus”, “earth”, “mars” ]

      while the code

      let $x := [
      [ “mercury”, “venus”, “earth”, “mars” ],
      [ “monday”, “tuesday”, “wednesday”, “thursday” ]
      ]
      let $y := $x(1)
      return $y()

      returns

      mercury
      venus
      earth
      mars

      Here also both should return:

      mercury
      venus
      earth
      mars

      Attachments

        Issue Links

          Activity

            People

              Riyafa Abdul Hameed Riyafa Abdul Hameed
              Riyafa Abdul Hameed Riyafa Abdul Hameed
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: