Skip to content

Show error in interactive examples when query is invalid #53

Open

Description

@josdejong

The interactive examples on the website are great!

I noticed though that when you're changing the JMESPath query and it becomes invalid, nothing happens. Would be great if the output would display an error instead of showing the last result.

I can create a PR for this I think if someone can point me to the code of these interactive examples.

Activity

  1. maxxyme commented on Sep 27, 2018

    @maxxyme

    Using https://codebeautify.org/online-json-editor (disclaimer: that's how I discovered JMESPath) you can see the error message whenever your JMSEPath expression is wrong.
    You enter your JSON on the left, transfer it on the right with the ">" button, click on the action menu icon matching the root node on which you will apply your expression, then choose Transform from the menu.

  2. josdejong commented on Sep 27, 2018

    @josdejong
    Author

    @maxxyme ah that's a clone of my website https://jsoneditoronline.org :(. I opened this issue when implementing JMESPath in JSONEditor and was trying out stuff on the website of JMESPath.

  3. maxxyme commented on Sep 27, 2018

    @maxxyme

    So you're saying they just basically copied your stuff?? That's so rude & unfair.

  4. josdejong commented on Sep 27, 2018

    @josdejong
    Author

    Yes. The JSONEditor component is open source and I'm happy when it can be of help in any application, but I'm not really happy with copycats competing directly with my website by simply cloning it.

  5. theconor commented on Jan 3, 2021

    @theconor

    Error message for invalid JMESPath expression would be great. Also an error message if the pasted JSON expression is invalid. I like to use the query editor on the front page of the site for testing out my expressions against example JSON, and it gets quite confusing if either one of them becomes invalid and you don't know what's wrong. Just need a flag/colour to highlight when the error exists, and then go away as soon as the text becomes valid. A larger textarea to type the expression would be good too, but perhaps that is a separate utility. Thanks for the great language!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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