
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
jsonforms-inferno
Advanced tools
This package demonstrates the feasibility of implementing JSONForms with inferno. Since this is mostly a prototype and is no longer maintained, we would like to recommend using JSONForms 2+ to you.
Please check out jsonforms.io for more information. Users of JSONForms 1 may want to also take a look at the migration guide.
JSONForms uses HTML custom elements and eliminates the need to write HTML templates in order to create forms by leveraging the capabilities of JSON and JSON schema.
JSONForms is based on Custom elements,
which are not yet supported by all browsers, hence you'll need to include additional files in order to enable Custom Elements support:
These files are webcomponents-lite.js
and native-shim.js
as well as JSONForms itself via jsonforms.js
.
Pay attention to the order when including these files.
Once you add a json-forms
element to the DOM with at least a data
attribute set,
a form will be rendered for you.
Data and UI schemas can be configured by the dataSchema
and uiSchema
attributes.
Use CSS to style the form however you want.
npm install jsonforms@next
webcomponents-lite.js
, native-shim.js
, jsonforms.js
and jsonforms-example.css
to your HTML <head>
<script src="/node_modules/@webcomponents/webcomponentsjs/webcomponents-lite.js"></script>
<script src="node_modules/jsonforms/lib/native-shim.js"></script>
<script src="node_modules/jsonforms/dist/jsonforms.js"></script>
<link rel="stylesheet" type="text/css" href="node_modules/jsonforms/dist/jsonforms-example.css">
</head>
json-forms
element:<script>
var jsonForms = document.createElement('json-forms');
jsonForms.data = {name:'John Doe'};
document.body.appendChild(jsonForms);
</script>
The whole document may for example now look like this:
<!DOCTYPE html>
<html>
<head>
<script src="node_modules/jsonforms/lib/native-shim.js"></script>
<script src="node_modules/jsonforms/dist/jsonforms.js"></script>
<link rel="stylesheet" type="text/css" href="node_modules/jsonforms/dist/jsonforms-example.css">
</head>
<body></body>
<script>
var jsonForms = document.createElement('json-forms');
jsonForms.data = {name:'John Doe'};
document.body.appendChild(jsonForms);
</script>
</html>
<script>
var jsonForms = document.createElement('json-forms');
jsonForms.data = {name:'John Doe'};
jsonForms.dataSchema = {type: "object", properties: {name : { type: "string"}}};
jsonForms.uiSchema = {type: "Control", scope: { $ref: "#/properties/name" } };
document.body.appendChild(jsonForms);
</script>
npm install
npm install -g typescript
npm run build
npm run test
npm run dev
, point your browser to http://localhost:8080/
The JSONForms project is build and tested via Travis. Coverage is documented by Coveralls.
The JSONForms project is licensed under the MIT License. See the LICENSE file for more information.
Our current roadmap is available here.
FAQs
Generating forms for JSON schema
The npm package jsonforms-inferno receives a total of 25 weekly downloads. As such, jsonforms-inferno popularity was classified as not popular.
We found that jsonforms-inferno demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.