gildas-lormeau / JSONVue

Fork of JSONView for Chromium-based browsers
https://chrome.google.com/webstore/detail/chklaanhfefbnpoihckbnefhakgolnmc
Other
1.59k stars 615 forks source link

JSONView tries to parse Haskell source files. #79

Closed phadej closed 2 years ago

phadej commented 7 years ago

Obviously fails miserably: e.g. http://hackage.haskell.org/package/base-4.9.1.0/docs/src/GHC.Base.html#

image

sidvishnoi commented 6 years ago

Needs a better JSON detection than this: https://github.com/gildas-lormeau/JSONView-for-Chrome/blob/f0f7425c61ed102451fba42dba35cdfc58ae90e3/WebContent/content.js#L96

image

aspiers commented 5 years ago

I see it trying to parse text/plain log files too.

aspiers commented 5 years ago

OK, it wasn't hard to find out what's going wrong:

https://github.com/gildas-lormeau/JSONView-for-Chrome/blob/f0f7425c61ed102451fba42dba35cdfc58ae90e3/WebContent/content.js#L95-L97

You can see that it will assume any file wrapped in [...] or {...} parentheses is JSON, which is pretty naive.

zhbaba commented 5 years ago

什么鬼🤔

张恒

邮箱:z7h777777@163.com |

签名由 网易邮箱大师 定制

On 08/08/2019 02:55, Adam Spiers wrote:

OK, it wasn't hard to find out what's going wrong:

https://github.com/gildas-lormeau/JSONView-for-Chrome/blob/f0f7425c61ed102451fba42dba35cdfc58ae90e3/WebContent/content.js#L95-L97

You can see that it will assume any file wrapped in [...] or {...} parentheses is JSON, which is pretty naive.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.