-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Open
Description
Problem
The "Json Path" field on the Tools tab of the admin console is misleadingly labeled, as it's eventually processed by jq rather than using the JSONPath specification. This creates confusion for users who expect standard JSONPath syntax.
Current behavior:
- Field labeled as "Json Path"
- Actually requires
jqsyntax (e.g.,.result.items[]) - No indication that
jqformat is required
Expected behavior:
- Field name should reflect actual syntax requirements
- OR: Support standards-compliant JSONPath
- OR: Support multiple query formats with clear indication
Proposed Solutions
Option 1: Use Standards-Compliant JSONPath Library
Replace jq processing with a JSONPath RFC 9535 compliant library:
- Python:
jsonpath-ngorjsonpath-rw - Benefits: Industry standard, more portable, better documentation
- Considerations: Feature parity with current
jqcapabilities
Option 2: Support Multiple Formats
Add format selection with multi-field input:
- Dropdown to select query language:
jq|JSONPath|JMESPath - Field label updates based on selection
- Backend routes to appropriate processor
- Benefits: Maximum flexibility, backward compatibility
Option 3: Rename Field
Simplest fix: Rename "Json Path" to "jq Query" or "jq Expression"
- Minimal code change
- Accurate labeling
- Maintains current functionality
Additional Context
Affected files (likely):
- Admin UI templates/components for Tools tab
- Backend validation/processing for tool JSON path queries
- Any documentation referencing this field
Standards References:
Impact
- User Experience: Confusing for users familiar with JSONPath standard
- Documentation: Misleading field name requires extra explanation
- Interoperability: Non-standard query syntax limits portability
Metadata
Metadata
Assignees
Labels
No labels