Coder Social home page Coder Social logo

Comments (8)

 avatar commented on August 16, 2024

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.

 avatar commented on August 16, 2024

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.

bhollis avatar bhollis commented on August 16, 2024

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.

 avatar commented on August 16, 2024

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.

bhollis avatar bhollis commented on August 16, 2024

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.

jayenashar avatar jayenashar commented on August 16, 2024

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.

bhollis avatar bhollis commented on August 16, 2024

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.

jayenashar avatar jayenashar commented on August 16, 2024

ok, thanks

from jsonview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.