`$..true`, `$..false` and `$..null` are rejected as member names

Đang mở
#40 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
72/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go
Lĩnh vực
backend

Hướng nghiên cứu

Start by tracing how the Go parser handles member names after . and .., then compare that with member-name parsing inside filters. Reproduce the reported cases and use the existing parser tests as the entry point; the issue does not name specific files or tests. Done when all three names parse in each reported context and the examples return the stated results.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

A property literally named true, false or null works after . but not after .. or inside a filter.

$.true on {"true":1} gives [1], which is right. But $..true on the same document is a parse error
("unexpected byte at position 4"), and it should also give [1]. $..false and $..null fail the same way.

It also shows up inside filters: $[[email protected]] on [1] is a parse error at position 9 (it should just parse and
match nothing), and $[?1 == @.true] on [{"true":1}] is a parse error at position 11 (it should give [{"true":1}]).

So the same name is fine after a child . but rejected after a descendant .. and in a filter's member-name
position. The Python reference implementation (jsonpath-rfc9535) accepts all of these.

Ngôn ngữ chính
Go
Star
41
Fork
4
Merge trung bình
2 ngày 8 giờ
Pull request đã merge (30 ngày)
3

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của theory/jsonpath

Tất cả issue của theory/jsonpath

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.