JSONPath icon indicating copy to clipboard operation
JSONPath copied to clipboard

Dot Notation With Number

Open SoftCreatR opened this issue 5 years ago • 7 comments

Test Data:

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

Selector:

$.2

Result (Proposal A):

--- Expected
+++ Actual
@@ @@
-'[]'
+'["third"]'

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

SoftCreatR avatar Nov 02 '20 20:11 SoftCreatR

I think, the expected result from Proposal A is questionable in this case.

SoftCreatR avatar Nov 02 '20 20:11 SoftCreatR

Hey @SoftCreatR, I am new here and wanted to make some online contributions. I think I am too dumb to understand the issue here. Would you mind explaining to me what exactly is needed to be done here?

Amoldreamer avatar Nov 03 '20 13:11 Amoldreamer

Hey,

there are two types of issues: Bugs and enhancements. While bugs are typical malfunctions that should be fixed, the enhancements I'm posting are queries, where the expected results are unclear, because multiple implementations returning multiple/different results. In this cases, I expect "Proposal A" to be the correct solution: https://github.com/cburgmer/json-path-comparison/blob/master/proposals/Proposal_A/README.md

While there's no clear consensus, these enhancements are not necessarily required, but nice to have. So, if you want to contribute, you can either try fixing the bugs (there are currently 4) or find solutions, that provide the correct results, according to Proposal A.

SoftCreatR avatar Nov 03 '20 13:11 SoftCreatR

Ok, first I am trying to understand what this library is about. You have described it as "json path implementation for PHP". My understanding of it is that you are trying devise new ways or maybe creating new syntax for the easier implementation of json. Am I right?

Amoldreamer avatar Nov 04 '20 05:11 Amoldreamer

Maybe this original proposal helps you to understand, what JSONPath is: https://goessner.net/articles/JsonPath/

SoftCreatR avatar Nov 04 '20 06:11 SoftCreatR

I think I now have some understanding of JSONPath and its implementation in PHP. I went through the README.md and the PHP usage. The example implementation seems to be working fine. You said that there are bugs. Where should I go about looking for bugs?

Amoldreamer avatar Nov 04 '20 14:11 Amoldreamer

https://github.com/SoftCreatR/JSONPath/labels/bug

SoftCreatR avatar Nov 04 '20 15:11 SoftCreatR