You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a few places today in the system where we view and/or edit JSON documents (device reports, the 'specification' field of hardware products), and there will be more to come with the move to using JSON Schemas for validations. Pretty-printing the document in the UI (whitespace formatting) helps readability, but it's still quite cumbersome to view large documents. Also, editing a snippet of a JSON document is awkward (e.g. no syntax checking or automatic indenting) without copying the entire thing out to a JSON-aware editor and then copying it back.
Firefox has a nice JSON viewer built right in -- see screenshot:
..it allows expanding/collapsing nodes at each level for easy navigation to a position deep in the document, as well as a "raw" mode for showing the document as-in. I wonder if there is a drop-in component available to do this that we can make use of, as well as something to enhance the editing of documents in-place?
It would also be really nice if there was a way to tie into JSON Schema validation, as all of our JSON structures in conch have schemas to validate them, and there are APIs for fetching these schemas. (see https://json-schema.org/implementations.html for options - there are several in javascript. We will be moving to the draft 2019-09 specification very soon which limits things a bit, but I know there are still multiple options available across several languages.)
There are a few places today in the system where we view and/or edit JSON documents (device reports, the 'specification' field of hardware products), and there will be more to come with the move to using JSON Schemas for validations. Pretty-printing the document in the UI (whitespace formatting) helps readability, but it's still quite cumbersome to view large documents. Also, editing a snippet of a JSON document is awkward (e.g. no syntax checking or automatic indenting) without copying the entire thing out to a JSON-aware editor and then copying it back.
Firefox has a nice JSON viewer built right in -- see screenshot:
..it allows expanding/collapsing nodes at each level for easy navigation to a position deep in the document, as well as a "raw" mode for showing the document as-in. I wonder if there is a drop-in component available to do this that we can make use of, as well as something to enhance the editing of documents in-place?
It would also be really nice if there was a way to tie into JSON Schema validation, as all of our JSON structures in conch have schemas to validate them, and there are APIs for fetching these schemas. (see https://json-schema.org/implementations.html for options - there are several in javascript. We will be moving to the draft 2019-09 specification very soon which limits things a bit, but I know there are still multiple options available across several languages.)