josdejong / svelte-jsoneditor

A web-based tool to view, edit, format, repair, query, transform, and validate JSON
https://jsoneditoronline.org
Other
818 stars 108 forks source link

Option to disable message popup #328

Closed alpreu closed 8 months ago

alpreu commented 8 months ago

Hi I'm wondering if there is a way to disable the message popup? I can see setting askToFormat to false disables the popup for formatting. However, I also want to hide/disable the error popup that says e.g. Unexpected token 'a', "abc" is not valid JSON. Is that possible?

josdejong commented 8 months ago

If you don't want to see parse error messages at the bottom, you can hide this section using CSS.

alpreu commented 8 months ago

If you don't want to see parse error messages at the bottom, you can hide this section using CSS.

Yeah that's an option, I was just wondering if there is a way to switch the whole verification logic itself off (including the icons next to the line number etc)

josdejong commented 8 months ago

If there is a good use case for it and more people that need it we can consider that. What is your use case?

alpreu commented 8 months ago

If there is a good use case for it and more people that need it we can consider that. What is your use case?

I'm not sure if it's a really a common usecase. They way I'd like to use it is basically as more of a json highlighter than a json parser in the sense that I don't care if the user input is valid json or not.

I'll go with the CSS workaround for now :)

josdejong commented 8 months ago

👍

Maybe you don't need svelte-jsoneditor and you can just use CodeMirror without extra ceremony.