Directory

json-merge - Vaadin Add-on Directory

Vanilla web components designed to merge JSON objects into other objects json-merge - Vaadin Add-on Directory
[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/bahrus/json-merge) # \ [Demo](https://xtal-json-editor-demo.glitch.me/) xtal-json-merge and xtal-insert-json are dependency free web components, that merge predefined json with some dynamic json. xtal-json-merge extends xtal-insert-json. They provide binding support compatible with Polymer, but they can be used in non Polymer settings as well. It may seem more natural to use in [disciplined, declarative data-centric](https://blog.153.io/2017/03/08/you-dont-get-amp/) environments -- server-driven architectures or HTML template-oriented components / web apps like VueJS, Polymer (as we mentioned already), Aurelia, Svelte, Angular. It is likely to cause an allergic reaction if found inside a JavaScript, code-centric render function, like those found in (P)React / LitHTML / HyperHTML / SkateJS / StencilJS, etc. These two components can also be useful for demo pages that use html markup as the primary way of demonstrating the functionality of specific types of components, which we categorize below. ## Mission Many complex components, like grids, require a large amount of declarative configuration, beyond what is optimally configured via attributes. I would venture that 50% of UI Screens in the world consist of the following workflow: 1) Get data 2) Merge with configuration (and/or other manipulation of the data, not discussed here) 3) Render using some specialized renderer (like a grid or chart component). We assume here that step 3 is: 1) done with another third party web component. For simplicity we'll assume it's called my-grid 2) defined via some form of template markup i.e. \ Some components, like the Vaadin grid, choose to be configured via light DOM elements (a perfectly fine approach). This component is of no help in those circumstances. Other components tend to view themselves primarily as a JavaScript api, and then just quickly put a web component wrapper around it. Often that api consists of a single function or two, with a single parameter, where declarative JSON is expected to be passed. These components are designed to facilitate working with such components. These components, xtal-insert-json and xtal-json-merge, enforce the declarative, side-effect free, XSS safe principles by insisting that the content is strictly compliant JSON. See [other examples of embedding JSON as part of the markup](https://www.ampproject.org/docs/reference/components/amp-bind). The JSON needs to be wrapped inside a script tag with type application/json, as shown below. ```html ``` ## Example ```html ``` ## Install the Polymer-CLI First, make sure you have the [Polymer CLI](https://www.npmjs.com/package/polymer-cli) and npm (packaged with [Node.js](https://nodejs.org)) installed. Run `npm install` to install your element's dependencies, then run `polymer serve` to serve your element locally. ## Viewing Your Element ``` $ polymer serve ``` ## Running Tests ``` $ polymer test ``` Your application is already set up to be tested via [web-component-tester](https://github.com/Polymer/web-component-tester). Run `polymer test` to run your application's test suite locally.
GitHub Homepage
Issue tracker
License
View on GitHub
View on NPM
Online Demo

json-merge version 0.0.0
### Dependencies Polymer/polymer#^2.0.0

json-merge version 0.0.1
### Dependencies Polymer/polymer#^2.0.0 * bahrus/poly-prep#^0.0.5

json-merge version 0.0.2
### Dependencies Polymer/polymer#^2.0.0 * bahrus/poly-prep#^0.0.5

json-merge version 0.0.3
### Dependencies Polymer/polymer#^2.0.0 * bahrus/poly-prep#^0.0.5

json-merge version 0.0.4
### Dependencies Polymer/polymer#^2.0.0

json-merge version 0.0.5
### Dependencies Polymer/polymer#^2.0.0

json-merge version 0.0.6
### Dependencies Polymer/polymer#^2.0.0

json-merge version 0.0.7
### Dependencies Polymer/polymer#^2.0.0 * bahrus/xtal-json-editor#^0.0.6

json-merge version 0.0.8
### Dependencies Polymer/polymer#^2.0.0 * bahrus/xtal-json-editor#^0.0.6

json-merge version 0.0.9
### Dependencies Polymer/polymer#^2.0.0 * bahrus/xtal-json-editor#^0.0.6

json-merge version 0.0.10
### Dependencies Polymer/polymer#^2.0.0 * bahrus/xtal-json-editor#^0.0.6

json-merge version 0.1.0
### Dependencies * @bower_components/accessibility-developer-tools#GoogleChrome/accessibility-developer-tools#^2.10.0 * @bower_components/async#caolan/async#^1.5.0 * @bower_components/chai#chaijs/chai#^3.2.0 * @bower_components/font-roboto#PolymerElements/font-roboto#^1 * @bower_components/iron-demo-helpers#PolymerElements/iron-demo-helpers#^2.0.0 * @bower_components/iron-flex-layout#polymerelements/iron-flex-layout#1 - 2 * @bower_components/iron-location#PolymerElements/iron-location#1 - 2 * @bower_components/lodash#lodash/lodash#^3.7.0 * @bower_components/marked#chjj/marked#~0.3.6 * @bower_components/marked-element#polymerelements/marked-element#1 - 2 * @bower_components/mocha#mochajs/mocha#^3.1.2 * @bower_components/polymer#Polymer/polymer#^2.0.0 * @bower_components/prism#LeaVerou/prism#* * @bower_components/prism-element#PolymerElements/prism-element#1 - 2 * @bower_components/shadycss#webcomponents/shadycss#^v1.0.0 * @bower_components/sinon-chai#domenic/sinon-chai#^2.7.0 * @bower_components/sinonjs#blittle/sinon.js#^1.14.1 * @bower_components/stacky#PolymerLabs/stacky#^1.3.0 * @bower_components/test-fixture#PolymerElements/test-fixture#^3.0.0 * @bower_components/web-component-tester#Polymer/web-component-tester#^6.0.0 * @bower_components/webcomponentsjs#webcomponents/webcomponentsjs#^1.0.0 * @bower_components/xtal-json-editor#bahrus/xtal-json-editor#^0.0.6

json-merge version 0.1.1
### Dependencies * @bower_components/accessibility-developer-tools#GoogleChrome/accessibility-developer-tools#^2.10.0 * @bower_components/async#caolan/async#^1.5.0 * @bower_components/chai#chaijs/chai#^3.2.0 * @bower_components/font-roboto#PolymerElements/font-roboto#^1 * @bower_components/iron-demo-helpers#PolymerElements/iron-demo-helpers#^2.0.0 * @bower_components/iron-flex-layout#polymerelements/iron-flex-layout#1 - 2 * @bower_components/iron-location#PolymerElements/iron-location#1 - 2 * @bower_components/lodash#lodash/lodash#^3.7.0 * @bower_components/marked#chjj/marked#~0.3.6 * @bower_components/marked-element#polymerelements/marked-element#1 - 2 * @bower_components/mocha#mochajs/mocha#^3.1.2 * @bower_components/polymer#Polymer/polymer#^2.0.0 * @bower_components/prism#LeaVerou/prism#* * @bower_components/prism-element#PolymerElements/prism-element#1 - 2 * @bower_components/shadycss#webcomponents/shadycss#^v1.0.0 * @bower_components/sinon-chai#domenic/sinon-chai#^2.7.0 * @bower_components/sinonjs#blittle/sinon.js#^1.14.1 * @bower_components/stacky#PolymerLabs/stacky#^1.3.0 * @bower_components/test-fixture#PolymerElements/test-fixture#^3.0.0 * @bower_components/web-component-tester#Polymer/web-component-tester#^6.0.0 * @bower_components/webcomponentsjs#webcomponents/webcomponentsjs#^1.0.0 * @bower_components/xtal-json-editor#bahrus/xtal-json-editor#^0.0.6

json-merge version 0.1.2
### Dependencies Polymer/polymer#^2.0.0

json-merge version 0.1.3
### Dependencies Polymer/polymer#^2.0.0

json-merge version 0.1.4
### Dependencies Polymer/polymer#^2.0.0

json-merge version 0.2.1
### Dependencies * @polymer/polymer#^3.0.0

json-merge version 0.2.2
### Dependencies * @polymer/polymer#^3.0.0

json-merge version 0.2.4
### Dependencies * @polymer/polymer#^3.0.0 * jiife#^0.0.0

json-merge version 0.2.5
### Dependencies * @polymer/polymer#^3.0.0 * jiife#^0.0.0

json-merge version 0.2.6
### Dependencies * @polymer/polymer#^3.0.0 * jiife#^0.0.0

json-merge version 0.2.7
### Dependencies * @polymer/polymer#^3.0.0 * jiife#^0.0.0

json-merge version 0.2.8
### Dependencies * @polymer/polymer#^3.0.0 * jiife#^0.0.0

json-merge version 0.2.9
### Dependencies * @polymer/polymer#^3.0.0 * jiife#^0.0.0

json-merge version 0.2.10
### Dependencies * @polymer/polymer#^3.0.0 * jiife#^0.0.0

json-merge version 0.2.11
### Dependencies * @polymer/polymer#^3.0.0 * jiife#^0.0.0

json-merge version 0.2.12
### Dependencies * @polymer/polymer#^3.0.0 * jiife#^0.0.0

json-merge version 0.2.13
### Dependencies * @polymer/polymer#^3.0.0 * jiife#^0.0.0

json-merge version 0.2.14
### Dependencies * @polymer/polymer#^3.0.0 * jiife#^0.0.0 * xtal-latx#^0.0.2

json-merge version 0.2.15
### Dependencies * @polymer/polymer#^3.0.0 * jiife#^0.0.0 * xtal-latx#^0.0.5

json-merge version 0.2.16
### Dependencies * @polymer/polymer#^3.0.0 * jiife#^0.0.0 * xtal-latx#^0.0.10

json-merge version 0.2.17
### Dependencies * @polymer/polymer#^3.0.0 * jiife#^0.0.0 * xtal-latx#^0.0.11

json-merge version 0.2.18
### Dependencies * @polymer/polymer#^3.0.0 * jiife#^0.0.0 * xtal-latx#^0.0.11

json-merge version 0.2.19
### Dependencies * @polymer/polymer#^3.0.0 * jiife#^0.0.0 * xtal-latx#^0.0.11

json-merge version 0.2.20
### Dependencies * @polymer/polymer#^3.0.0 * xtal-latx#^0.0.11

json-merge version 0.2.21
### Dependencies * @polymer/polymer#^3.0.0 * xtal-latx#^0.0.11

json-merge version 0.2.22
### Dependencies * @polymer/polymer#^3.0.0 * xtal-latx#^0.0.11

json-merge version 0.2.23
### Dependencies * @polymer/polymer#^3.0.0 * xtal-latx#^0.0.11

json-merge version 0.2.24
### Dependencies * xtal-latx#^0.0.17

json-merge version 0.2.25
### Dependencies * xtal-latx#0.0.17

json-merge version 0.2.26
### Dependencies * xtal-latx#0.0.17

json-merge version 0.2.27
### Dependencies * xtal-latx#0.0.18

json-merge version 0.2.28
### Dependencies * xtal-latx#0.0.19

json-merge version 0.2.29
### Dependencies * xtal-latx#0.0.42

json-merge version 0.2.30
### Dependencies * xtal-latx#0.0.42

json-merge version 0.2.31
### Dependencies * xtal-latx#0.0.42

json-merge version 0.2.32
### Dependencies * xtal-latx#0.0.42

json-merge version 0.2.33
### Dependencies * xtal-element#0.0.43

json-merge version 0.2.34
### Dependencies * xtal-element#0.0.43

json-merge version 0.2.35
### Dependencies * xtal-element#0.0.58 * trans-render#0.0.110