Comments (14)
This is an ill-defined problem and needs to be translated into a set of well-posed problems.
from hdf5-json.
The first problem is a checker that can determine if JSON contains the correct keywords according to grammar rule.
http://hdf5-json.readthedocs.org/en/latest/bnf/index.html
from hdf5-json.
This is a well-posed problem.
from hdf5-json.
Here is a json schema validator: https://github.com/json-schema/json-schema.
Can we utilize this?
Joe, what is the use case for the json validator?
from hdf5-json.
As a client developer, I've created and sent so many invalid JSON payloads to HPD server / h5serv. I'd like to validate it first before I send. HPD server may benefit too to prevent garbage-in and garbage-out problem.
Users can use such tool before they import h5json files that user edited manually in bulk (e.g., replace all attribute values from " to ') into HPD Server.
from hdf5-json.
FYI, I am working on this functionality in the PD server code. Not as general as it could be but should be sufficient for the PD server. I can push this to Heroku but in that branch the OPeNDAP/THREDDS links are already moved to port 80.
from hdf5-json.
Great, Aleksandar! I hope you guys can pull codes together to create a general validation tool that code generator can benefit from it as well.
from hdf5-json.
The second problem is checking values against its type. Throw an error if a user specified
"type": {
"base": "H5T_STD_I8LE",
"class": "H5T_INTEGER"
},
"value": [34234343449,...
from hdf5-json.
Did you try that with the PD server?
from hdf5-json.
Of course, I did and I'm very happy that server rejects it.
from hdf5-json.
Aleksandar,
Can you point me at the code in PD server? I'll see if I can extract into a stand-alone script (or maybe as an command line option for jsontoh5.py - don't create an HDF5 file, just validate the json).
from hdf5-json.
@jreadey This is the entry point. All the other helper functions are in the same file.
I think the quickest way to use this code is with a front-end "loader" that would call it for each group/dataset/attribute.
from hdf5-json.
An HD5/JSON validator based on the JSON Schema is now part of the h5json package. It does only HDF5/JSON grammar validation, not any semantic or logical relationships like dimension scales.
I think this issue should be closed but will leave it open for a month to gather comments from others. So, I'll close this issue if no further discussion by end of March 2022. (It's been open for so long, what's one more month. 😄)
from hdf5-json.
Closing due to no further comments.
from hdf5-json.
Related Issues (20)
- Support Python 3 HOT 9
- h5tojson fails to convert file that has loop among groups. HOT 1
- hdf5tojson fails for comp_complex.h5 HOT 1
- Use templates for code generation utilities HOT 3
- jsontoh5 fails for enum types HOT 1
- h5tojson fails with SNDR data file HOT 2
- Can h5tojson suppress fill value?
- Tests don't run under windows HOT 2
- Support Opaque Types
- Source for h5json-1.1.0 is unavailable HOT 2
- jsontoh5.py fails on converting json file HOT 1
- security bug in pip version? HOT 3
- Add a command line option to jsontoh5 to specify the library version when creating a file
- Installation problem with h5serv HOT 2
- h5tojson_test raises "no attribute 'get_create_plist'" exception while converting several test files HOT 1
- Error after switching to Apple M1 HOT 2
- "jsontoh5 data/json/comp_complex.json" error
- h5tojson fails with Type Error HOT 7
- RFC: Dataset storage information in HDF5/JSON HOT 6
- h5jvalidate does not run due to missing h5json.schema HOT 2
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 hdf5-json.