atom-json-editor icon indicating copy to clipboard operation
atom-json-editor copied to clipboard

Package not creating UI

Open Opligitory opened this issue 9 years ago • 15 comments

i just install the add-on and restarted atom just in case and when i opened my json file nothing at all happend i dont know why its not showing up? Can you please help me

screen shot 2016-03-26 at 9 38 01 pm

Opligitory avatar Mar 27 '16 01:03 Opligitory

I just installed the package and it doesn't create a UI for me neither.

nonameolsson avatar Apr 28 '16 08:04 nonameolsson

Could you please post your schema?

LukasHechenberger avatar Apr 28 '16 09:04 LukasHechenberger

It does not create the UI for any json file. Example JSON: { "restApiRoot": "/api", "host": "0.0.0.0", "port": 3000, "remoting": { "context": false, "rest": { "normalizeHttpPath": false, "xml": false }, "json": { "strict": false, "limit": "100kb" }, "urlencoded": { "extended": true, "limit": "100kb" }, "cors": false, "handleErrors": false }, "legacyExplorer": false }

moibelgal avatar Dec 23 '16 20:12 moibelgal

+1, It does not create the UI, don't know why. Any command extra is needed?

lifuzu avatar Mar 21 '17 19:03 lifuzu

I had the same problem. My issue was that my filename included an underscore character; I removed that, and everything is working properly again.

richarddb avatar Apr 13 '17 08:04 richarddb

no UI show up too

sangshuduo avatar Jun 28 '17 08:06 sangshuduo

doesn't work for me either, Atom 1.22.1 tested with various json files, clean names, no error notifications or anything anywhere, tried restarting.

audiocommander avatar Nov 29 '17 16:11 audiocommander

does not work for me either 1.23.3 x64

vishalvpv avatar Jan 30 '18 15:01 vishalvpv

Yep doesn't work for me either no error nothing. 1.24.0 x64

kalpesh27 avatar Feb 15 '18 15:02 kalpesh27

+1 - no errors displayed even in Console window. I've created a new .json file and for me either nothing happened. Atom v. 1.24.0 x64

This package is useless at this moment.

ghost avatar Feb 19 '18 11:02 ghost

+1. No UI with clean filename in Atom v1.25.0 x64.

vejuhust avatar Mar 21 '18 07:03 vejuhust

Is there a json sample file with with I can test that the UI is functioning well? Because for the files that I have, no GUI is showing up

denisq avatar Apr 25 '18 10:04 denisq

It should work with a package.json-File as this schema is included in the package.

LukasHechenberger avatar Apr 25 '18 10:04 LukasHechenberger

I added myself (+1) to the OP and comments, but I think I figured out the problem here:

Everyone is expecting this to be a general .json GUI editor, similar to online JSON editors like https://jsoneditoronline.org/ This is what I was looking for -- given the .json file, just display it in a nested form and allow me to show/hide and edit the fields.

However this is NOT such a general .json GUI editor; instead it expects a template, called a "schema file" and compares your JSON file with the schema. Only if your JSON file matches, then you can edit the fields.

Thus, in order for the GUI to show up for my-json-file.json you need a file my-json-file.schema.json, which states the field names. Try it out -- rename your .json file to package.json, and it will be compared with package.schema.json. The GUI will complain that the fields in your .json file do not match those expected by the schema.

For me (and I guess for others here), this was not clear from the package description or README (although I think the package creators did try to explain this, it didn't come across). If I'm correct, this does unfortunately make the package more or less unusable for me. I want a way to edit JSON files easily; I'm not looking to write a custom .schema.json files every time I have a .json file.

Concretely:

  1. Am I correct in my assessment that this package can NOT be used to edit arbitrary JSON files easily, in a similar way to online JSON editors like the one above?

  2. If so, I think it would be very helpful to make this more clear in the README and package description. As a reader, I don't know what "created along their schemes" means, or what a scheme file is. I would specifically avoid referring to it as a JSON editor (unqualified), but qualify this by stating that a template JSON with the same form is required before editing is possible.

  3. If no matching .scheme file is found for the JSON file, can you generate a warning? I thought something was just not working and restarted the tab, restarted atom, googled, etc., before finally landing here, reading the README more carefully, and realizing my mistake. It looks like others did the same thing. The warning would alert the user earlier that the package doesn't fit their use case.

TL;DR This isn't the general JSON editor that many users may be looking for. Hopefully others find this and realize they made the same mistake. :)

To the package creators, thanks for your efforts despite that it didn't match the use case I had in mind.

cdstanford avatar Jun 17 '19 20:06 cdstanford

+1 it did not work for me too... i used JSON Schema Example as below:

{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Product", "description": "A product from Acme's catalog", "type": "object",

"properties": {

  "id": {
     "description": "The unique identifier for a product",
     "type": "integer"
  },
	
  "name": {
     "description": "Name of the product",
     "type": "string"
  },
	
  "price": {
     "type": "number",
     "minimum": 0,
     "exclusiveMinimum": true
  }

},

"required": ["id", "name", "price"] }

Tobe2d avatar Jul 20 '19 11:07 Tobe2d