Comments (8)
I'd love to see this but even if you could highlight parts that are invalid it would help greatly with figuring out why a file doesn't view. Maybe a "relaxed" mode could be selected that shows files somewhat pretty even with invalid JSON. I have some files that should be JSON but aren't correct and they're quite large (250K) so when I open them and they don't work I'm stuck with a real headache trying to sift thru and find out what's wrong. Bold or Red marked areas would make this so much easier to fix. Thanks.
edit: Oh, I see now that it's not supporting unicode strings. I guess that's at least part of the problem. Any possibility to add support?
from jsonview.
Having explored this a bit further I see now that my file is not truly a JSON file. It only looks similar. It's actually a Python AST format which has a few small differences designed just to make us go syntax crazy.
Well, a Python object view extension or mode seems to be warranted then.
Differences I noticed are:
- single quotes strings
- Capitalized booleans (True not true, False not false)
- Possible None values which would be "None" in JS
- Unicode strings eg. u"text"
from jsonview.
JSONView does support unicode, but just in regular strings, not Python crazy-format. You could fork JSONView and build your own Python-format-viewer extension though.
from jsonview.
Not a bad idea. I'd probably implement it as a preference as I wouldn't want to have two separate viewers and I can see still wanting JSON.
from jsonview.
I'd make a completely new extension that you can distribute. Anyway, it's not JSON, so you'll need to look for a different MIME type.
from jsonview.
could JSONView indicate that there is an error? i've hit a bug in MOXy and it's taken me a week to realize that JSONView is throwing away duplicated object members. Thanks
from jsonview.
If there is an actual error that Firefox's JSON parser can detect, we show it. We get no visibility into things like repeated object keys.
from jsonview.
ok, thanks
from jsonview.
Related Issues (20)
- Add toggle/option to have a dark background (dark theme) HOT 2
- not working for iframes HOT 1
- Firefox Save Page As... saves rendered HTML instead of original JSON HOT 2
- add font size to options menu HOT 9
- Add a configuration to avoid word-wrap
- Add support for Content-Type: application/vnd.spring-boot.actuator.v3+json HOT 1
- With kerberos auth json view doesn't render json HOT 1
- Copy json loses indention HOT 6
- The extension doesn't work HOT 2
- AWS Console usage triggers JsonView trying to parse an HTML page in error HOT 1
- Migrate to Manifest V3
- Wrong character instead of triangle pointing down HOT 20
- Error handling response: TypeError: Cannot read properties of undefined (reading 'textContent') HOT 4
- version 2.5.0 - jsonview not displaying HOT 6
- Extension causes JSON parse error when loading SharePoint page HOT 18
- AMO page's description outdated HOT 3
- Support .jsonc files? HOT 3
- Unexpected non-whitespace character after JSON at position 256 (line 1 column 257) HOT 4
- inserts double quotes HOT 1
- JSON number is being truncated as if it was an integer HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jsonview.