Skip to content

Union With Wildcard And Number #61

Closed

Description

@SoftCreatR

Test Data:

[
   "first",
   "second",
   "third",
   "forth",
   "fifth"
]

Selector:

$[*,1]

Resul:

Unable to parse token *,1 in expression: [*,1]

Expected result (Proposal A):

[
   "first",
   "second",
   "third",
   "forth",
   "fifth",
   "second"
]

https://cburgmer.github.io/json-path-comparison/results/union_with_wildcard_and_number.html

Activity

  1. Amoldreamer commented on Nov 7, 2020

    @Amoldreamer

    Can you tell me what is meant by 'consensus'. For example in the link below:
    https://cburgmer.github.io/json-path-comparison/results/union_with_wildcard_and_number.html

  2. SoftCreatR commented on Nov 7, 2020

    @SoftCreatR
    OwnerAuthor

    See it as expected result.

  3. Amoldreamer commented on Nov 7, 2020

    @Amoldreamer

    ok

  4. Amoldreamer commented on Nov 7, 2020

    @Amoldreamer

    Then what does it mean if the consensus is "not supported"?

  5. SoftCreatR commented on Nov 7, 2020

    @SoftCreatR
    OwnerAuthor

    That's in fact just another consensus and simply means, that most implementations do not support this query.

    An example: Let's assume a math problem:

    5 + 1 = ?

    There are multiple ways to calculate it, but no way is guaranteed to provide the correct result. So let's assume, there are 5 ways to calculate the result:

    The first way gives 6
    The 2nd way gives 6
    The 3rd way gives 5
    The 4th way gives 6
    The 5th way gives 7

    Without knowing, what the expected result is, we assume it's 6, because that's the consensus of all possible ways is 6.

    I hope, this answers your question.

    However, in this specific case, "Not supported" isn't really a desirable result. That's why we use the result from Proposal A. There's still no guarantee, that this is the result we should expect, but it's pretty likely, that it's result is, what most people would expect, when executing the given query.

  6. Repository owner deleted a comment from Amoldreamer on Apr 6, 2021
  7. Repository owner deleted a comment from Amoldreamer on Apr 6, 2021
  8. Repository owner deleted a comment from Amoldreamer on Apr 6, 2021
  9. added
    enhancementNew feature or request
    and removed
    bugSomething isn't working
    on Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions