Data-Liberation-Front / csvlint.io

Check that your CSV files are valid
http://csvlint.io
MIT License
73 stars 12 forks source link

Trouble referencing JSON files #249

Closed psychemedia closed 8 years ago

psychemedia commented 8 years ago

Uploading or linking JSON data package specification files appears not to work on csvlint.io and reports the following error when a validation is run?

Schema problem: Empty Schema

The schema provided is empty. This file cannot be parsed against the CSV.

(OS/X 10.9.5, Chrome 48.0, Firefox 44.0)

pezholio commented 8 years ago

Hi Tony

Do you have an example schema I can try please?

psychemedia commented 8 years ago

Hi Stuart I tried a few from https://github.com/datasets/

pezholio commented 8 years ago

Hi Tony

At the moment, we don't support schemas from within datapackage.json files (unless part of a zipped datapackage). See the schemas section for more info. If I've got the wrong end of the stick, please let me know!

Cheers

psychemedia commented 8 years ago

I was separately loading them.. (i.e. I either unzipped locally and then tried to upload separate parts, or linked to the raw file on github (I tried both approaches).

One thing I noticed was that the CSV upload overtly uploaded on the page (showed a progress bar etc, then a completed confirmation) but the JSON upload didn't... it just sits there:

image

The console log shows nothing.

pezholio commented 8 years ago

Yeah, the background uploading doesn't happen with json files, but I see why that could be confusing. I'll open a separate issue for this.

psychemedia commented 8 years ago

Stuart

I'm still a little confused...

I expected the linter to allow me to upload a CSV file and a JSON file and then check the CSV against the JSON spec. But it seems whatever I try to do, I can't get this to work.

So have I misunderstood, or am I doing something wrong?!

pezholio commented 8 years ago

We do support schema validation, but not from within a datapackage.json. An example schema looks like this:

https://gist.githubusercontent.com/ldodds/9070198/raw/44076fa619d9c89188197130ca596cc99a25d693/senior-staff-organagram.json