Skip to content

Admin Console: 'Json Path' field uses jq syntax instead of JSONPath specification #2894

@jonpspri

Description

@jonpspri

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 jq syntax (e.g., .result.items[])
  • No indication that jq format 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-ng or jsonpath-rw
  • Benefits: Industry standard, more portable, better documentation
  • Considerations: Feature parity with current jq capabilities

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions