diff --git a/src/tools/json-viewer/json-viewer.vue b/src/tools/json-viewer/json-viewer.vue index 3307cba3..55352821 100644 --- a/src/tools/json-viewer/json-viewer.vue +++ b/src/tools/json-viewer/json-viewer.vue @@ -5,8 +5,21 @@ :feedback="rawJsonValidation.message" :validation-status="rawJsonValidation.status" > - + + + + Clear + @@ -39,7 +52,7 @@ const rawJsonValidation = useValidation({ source: rawJson, rules: [ { - validator: (v) => JSON.parse(v), + validator: (v) => v === '' || JSON.parse(v), message: 'Invalid json string', }, ],