Language selection

Search


Special test case for Data JSON

This page is a test page to validate some special edge case and to ensure the plugin work as expected.

Test case for PR 9651

Test demo

Expectation of the preceding demo

This paragraph content are not replaced because it is a null value

Source code

JSON content

{
	"alpha": {
		"beta": null
	}
}

Data JSON configuration

{
	"url": "demo/test-case.json#/alpha",
	"mapping": [
		{
			"selector": "p"
		}
	]
}

Test case for PR 9649

Test demo

Expectation of the preceding demo

Itm1: Value 1; Value: Not defined

Itm1: Value 2; Value: Not defined

Source code

JSON content

{
	"beta": [
	{
		"itm1": "Value 1",
		"itm2": null
	},
	{
		"itm1": "Value 2",
		"itm2": null
	}
	]
}

Data JSON configuration

{
	"url": "demo/test-case.json#/beta",
	"mapping": [
		{ "selector": "[data-itm1]", "value": "/itm1" },
		{ "selector": "[data-itm2]", "value": "/itm2" }
	]
}

Page details

Date modified: