<< Click to Display Table of Contents >> RayPack > 8.0 > User Guide > PackDesigner > MSI / MST / RPP Based Projects > Visual Designer Mode > System Interaction > JSON & XML files Add new JSON/XML File |
Within the Visual Designer mode, adding JSON/XML files to a packaging project may be done either by manually creating new files or by importing existing files from external sources such as local volumes, network shares, or flash drives.
When creating a new JSON/XML file within RayPack, users are presented with multiple options to suit different needs and scenarios. The options for creating a new JSON/XML file are structured similarly for both formats, making it straightforward to manage either file type.
This option allows users to create a brand new, empty JSON/XML file. It is particularly useful when starting a fresh configuration without any predefined data.
Steps to Create a Blank JSON/XML Entry:
1.Open 'Create new...' dropdown:
oClick the "Create new..." button in the toolbar to initiate a new file.
2.Select 'Blank JSON/XML Entry':
oIn the file creation menu, choose either the Blank JSON Entry for JSON or the Blank XML Entry for XML.
3.File Creation and Naming:
oA new file will be created with a default name:
▪For JSON: NewConfig.json
▪For XML: NewConfig.xml
oIf a file with the same name already exists in the target directory, a new file will be named with an incrementing suffix:
▪Example: NewConfig_2.json or NewConfig_2.xml.
This option allows for the creation of a new JSON/XML file based on an existing file within the current project package. This is ideal for duplicating or using existing files as templates for new configurations.
1.Open 'Create new...' dropdown:
oAs before, click the "Create new..." dropdown.
2.Select 'From This Package':
oChoose the From This Package option from the JSON/XML file creation menu.
3.Select the Source File:
oUse the file browser to navigate through the package directory to find and select the existing JSON/XML file you wish to duplicate.
4.File Creation Based on Selection:
oThe system will create a new JSON/XML file based on the selected file, maintaining the original file’s structure and content. The new file will be automatically assigned a suffix to differentiate it from the original.
•After selecting 'From This Package', a file browser will display the project structure:
oNavigate to the appropriate JSON/XML file within the package.
oSelect the file to use as the basis for the new entry.
RayPack also provides the ability to import JSON/XML files directly from your file system. This is especially useful for incorporating pre-existing files and configurations into your current project.
1.Locate the 'Import...' Dropdown:
oNavigate to the toolbar and find the "Import..." dropdown, which is located right next to the "Create new..." dropdown.
2.Select the 'Import JSON/XML File...' Option:
oIn the "Import..." dropdown, select the appropriate option:
▪Import JSON File... for JSON.
▪Import XML File... for XML.
3.Browse and Select the File:
oA system file browser opens, allowing you to navigate to your file system.
oSelect the desired .json or .xml file you wish to import.
4.Importing the File:
oOnce a valid JSON/XML file is selected, it will be imported into RayPack.
oBased on your selection, the imported data will either:
▪Override or create new entries in an existing configuration, or:
▪Add new entries, ensuring that only non-empty values inside the file are preserved.
•After import, the JSON/XML file will be displayed in the editor, allowing you to review, modify, or expand upon the file’s imported content within your project environment.