jsonhero-web icon indicating copy to clipboard operation
jsonhero-web copied to clipboard

No message if JSON is malformed

Open w0rmr1d3r opened this issue 2 years ago • 4 comments

I used https://jsonhero.io to take a look at a dirty JSON, and it seems that the JSON contained a malformed field. Until I cleaned that field I wasn't able to put it in the input to get it read. However, no matter how many times I tried, it didn't said anything related to an error in the page, as if it wasn't working.

It happened to me in both Safari and Chrome.

A similar behaviour happens in https://github.com/jsonhero-io/jsonhero-web/issues/42 that no answer is given.

Reviewed the issues in the repo and found nothing (besides the other issue referenced) related to this.

Thank you :)

w0rmr1d3r avatar May 12 '22 12:05 w0rmr1d3r

Do you mind sharing the JSON that was causing this issue?

ericallam avatar May 12 '22 12:05 ericallam

Hello @ericallam 👋 Sorry, but I cannot share the JSON, since it includes private data. However, the malformation (detected by de IDE) was that instead of double quoting keys and values, it was single quoted. Such as:

{
  'key': 'value'
}

Instead of:

{
  "key": "value"
}

At the same time, it included some Python values without quotes. In this case, the key already had double quotes since it received the fix from above:

{
  "key": True
}

Since this is more related to Python than to jsonhero, we can ignore it for the moment.

Hope this information helps :)

w0rmr1d3r avatar May 12 '22 13:05 w0rmr1d3r

Hi @ericallam , I see the issue has been closed, but the linked PR is closed, not merged. Has this been solved then? Which PR fixed it?

Thank you

w0rmr1d3r avatar Oct 05 '22 09:10 w0rmr1d3r

Good catch, this shouldn't have been closed because this PR that is addressing the issue is still open:

https://github.com/apihero-run/jsonhero-web/pull/102

ericallam avatar Oct 05 '22 09:10 ericallam