DEX DATA FILE (DATA.JSON)


data.json contains the source code for each webpage. data.json stores a list of objects in JSON format. Each webpage object contains a title string and a body list of strings. For example,

data.json = 
[{
	'title': 'title string 1',
	'body': [paragraph_str1, < a href='titlestring2.html'>Title String 2< /a>]},

	{'title': 'title string 2',
	'body': [paragraph_str3, < a href='titlestring1.html'>Title String 1< /a>]}
]

Alphanumberic title for each page without spaces and in lowercase forms the title of the HTML file. Add links by adding the < a> tag in strings in the body object for each webpage object. See example of both pages linked to each other above.

Strings in body form paragraphs of the webpage. data.json and dummy.json are lists of JSON objects. Each object in the list represents a webpage. The title of each page is unique. In case the same title is detected for 2 objects inside the data.json file or between data.json and dummy.json files, the objects are combined into 1 webpage with the same title and body strings combined. This functionality can be used to edit dummy.json.

To add to an existing page in data.json, use the same title in dummy.json for the webpage object as existing webpage object in data.json. This adds data to a specific webpage instead of creating a new one.

This file is edited in an editor like Visual Studio Code to display text in the dex. Paragraph strings are edited to determine content in the dex.

dummy.json follows the same schema as data.json








BACK TO DEXWEB DOCS