@@ -82,8 +82,8 @@ type JSONPathValue interface {
8282
8383// NodesType defines a node list (a list of JSON values) for a function
8484// expression parameters or results, as defined by [RFC 9535 Section 2.4.1].
85- // It can also be used in filter expressions. The underlying values should be
86- // strings, integers, floats , [json.Number]s , nil, true, false, []any, or
85+ // It can also be used in filter expressions. The underlying types should be
86+ // string, integer, float , [json.Number], nil, true, false, []any, or
8787// map[string]any. Interfaces implemented:
8888//
8989// - [JSONPathValue]
@@ -93,8 +93,8 @@ type JSONPathValue interface {
9393type NodesType []any
9494
9595// Nodes creates a NodesType that contains val, all of which should be the Go
96- // equivalent of the JSON data types: strings, integers, floats ,
97- // [json.Number]s, nil, true, false, []any, or map[string]any.
96+ // equivalent of the JSON data types: string, integer, float, [json.Number] ,
97+ // nil, true, false, []any, or map[string]any.
9898func Nodes (val ... any ) NodesType {
9999 return NodesType (val )
100100}
@@ -134,8 +134,8 @@ func (nt NodesType) String() string {
134134// parameters or results, as defined by [RFC 9535 Section 2.4.1]. Interfaces
135135// implemented:
136136//
137- // - [JSONPathValue]
138- // - [fmt.Stringer]
137+ // - [JSONPathValue]
138+ // - [fmt.Stringer]
139139//
140140// [RFC 9535 Section 2.4.1]: https://www.rfc-editor.org/rfc/rfc9535.html#section-2.4.1
141141type LogicalType uint8
@@ -192,21 +192,21 @@ func (lt LogicalType) writeTo(buf *strings.Builder) {
192192
193193// ValueType encapsulates a JSON value for a function expression parameter or
194194// result, as defined by [RFC 9535 Section 2.4.1]. It can also be used as in
195- // filter expression. The underlying value should be a string, integer, float,
196- // nil, true, false, []any, or map[string]any. A nil ValueType pointer
197- // indicates no value. Interfaces implemented:
195+ // filter expression. The underlying value should be a string, integer,
196+ // [json.Number], float, nil, true, false, []any, or map[string]any. A nil
197+ // ValueType pointer indicates no value. Interfaces implemented:
198198//
199- // - [JSONPathValue]
200- // - [BasicExpr]
201- // - [fmt.Stringer]
199+ // - [JSONPathValue]
200+ // - [BasicExpr]
201+ // - [fmt.Stringer]
202202//
203203// [RFC 9535 Section 2.4.1]: https://www.rfc-editor.org/rfc/rfc9535.html#section-2.4.1
204204type ValueType struct {
205205 any
206206}
207207
208- // Value returns a new ValueType for val, which must be the Go equivalent of a
209- // JSON data type: string, integer, float, [json.Number], nil, true, false,
208+ // Value returns a new [ ValueType] for val, which must be the Go equivalent of
209+ // a JSON data type: string, integer, float, [json.Number], nil, true, false,
210210// []any, or map[string]any.
211211func Value (val any ) * ValueType {
212212 return & ValueType {val }
@@ -357,7 +357,7 @@ func (la *LiteralArg) asValue(_, _ any) JSONPathValue {
357357}
358358
359359// SingularQueryExpr represents a query that produces a single [ValueType]
360- // (JSON value), or nothing. Used in contexts that require a singular value,
360+ // (JSON value) or nothing. Used in contexts that require a singular value,
361361// such as comparison operations and function arguments. Interfaces
362362// implemented:
363363//
@@ -373,7 +373,7 @@ type SingularQueryExpr struct {
373373}
374374
375375// SingularQuery creates and returns a [SingularQueryExpr] that selects a
376- // single value.
376+ // single value at the path defined by selectors .
377377func SingularQuery (root bool , selectors ... Selector ) * SingularQueryExpr {
378378 return & SingularQueryExpr {relative : ! root , selectors : selectors }
379379}
@@ -469,7 +469,7 @@ func (fq *NodesQueryExpr) writeTo(buf *strings.Builder) {
469469}
470470
471471// PathFunction represents a JSONPath function. See
472- // [github.com/theory/jsonpath/registry] for the implementation.
472+ // [github.com/theory/jsonpath/registry.Function ] for the implementation.
473473type PathFunction interface {
474474 Name () string
475475 ResultType () FuncType
@@ -570,7 +570,7 @@ type NotFuncExpr struct {
570570}
571571
572572// NotFunction creates and returns a new NotFuncExpr that will execute fn
573- // against the return values of args and return the inverses of its return
573+ // against the return values of args and return the inverse of its return
574574// value.
575575func NotFunction (fn * FuncExpr ) NotFuncExpr {
576576 return NotFuncExpr {fn }
0 commit comments