Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inner search results are not squashed #7

Closed
gavv opened this issue Aug 1, 2018 · 0 comments
Closed

Inner search results are not squashed #7

gavv opened this issue Aug 1, 2018 · 0 comments

Comments

@gavv
Copy link
Contributor

gavv commented Aug 1, 2018

Currently, inner search results are not squashed, like in other parsers, e.g.:

See examples below.

Test JSON:

{
  "A": [
    "string",
    23.3,
    3,
    true,
    false,
    null
  ],
  "B": "value",
  "C": 3.14,
  "D": {
    "C": 3.1415,
    "V": [
      "string2a",
      "string2b",
      {
        "C": 3.141592
      }
    ]
  },
  "E": {
    "A": [
      "string3"
    ],
    "D": {
      "V": {
        "C": 3.14159265
      }
    }
  },
  "F": {
    "V": [
      "string4a",
      "string4b",
      {
        "CC": 3.1415926535
      },
      {
        "CC": "hello"
      },
      [
        "string5a",
        "string5b"
      ],
      [
        "string6a",
        "string6b"
      ]
    ]
  }
}

Expression: $..V[2,3].CC

Actual results:

[[3.1415926535, "hello"]]

Expected results:

[3.1415926535, "hello"]

Expression: $.*.V[0,1]

Actual results:

[["string2a", "string2b"], ["string4a", "string4b"]]

Expected results:

["string2a", "string2b", "string4a", "string4b"]

Expression: $.F.V[4:6][0,1]

Actual results:

[["string5a", "string5b"], ["string6a", "string6b"]]

Expected results:

["string5a", "string5b", "string6a", "string6b"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants