cscjson2xsd (Transforming JSON format data to XSD files)
- Organization of this page
Format
cscjson2xsd -in {JSON-file-path
|path-of-directory-containing-JSON-file}
-out XSD-file-path
[-f path-of-JSON-XML-transformation-definition-file]
Function
Generates XSD files from JSON format data.
This command is saved in the following location:
service-platform-installation-directory\CSCTE\bin
When executing the command, move to this location or specify the path.
Arguments
-in {JSON-file-path|path-of-directory-containing-JSON-file}Specifies the storage location of JSON files (extension: .json) as an absolute or relative path. For a relative path, the current directory is the starting point of the path. Specify one of the following:
-
Path of the JSON file
Specify the path of the JSON file to be input.
-
Path of the directory containing JSON files
Specify the path of the directory that contains JSON files to be input.
All JSON files directly under the specified directory will be input. If there is no JSON file directly under the specified directory, an error occurs.
-out XSD-file-path
Specifies the path of the XSD file to be output (extension: .xsd) as an absolute or relative path. For a relative path, the current directory is the starting point of the path.
If the specified directory does not exist, a directory is generated and files are output. If a file having the specified name already exists, the existing file is overwritten.
-f path-of-JSON-XML-transformation-definition-file ~ <<service-platform-installation-directory\CSCTE\config\tools\json\csc_json_converter.properties>>
Specifies, as an absolute or relative path, the path of the JSON-XML transformation definition file in which the transformation operation between JSON format data and XML format data is specified. For a relative path, the current directory is the starting point of the path.
To apply the JSON-XML transformation definition file, the following two methods are available:
-
Use the -f argument to specify a JSON-XML transformation definition file
You can specify the file name of the desired JSON-XML transformation definition file.
-
Omit the -f argument so that the specified file is automatically read
If you omit the -f argument, the following file is read. You must store the JSON-XML transformation definition file with the following file name in advance. You can also edit the file contents.
service-platform-installation-directory\CSCTE\config\tools\json\csc_json_converter.properties
If this file does not exist, operation is performed with the default values of the JSON-XML transformation library. For details about the JSON-XML transformation library, see the manual Service Platform Basic Development Guide.
- JSON-XML transformation definition file
-
In this file, the transformation operation between JSON format data and XML format data is specified in the Java property file format. The available character code is UTF-8 only. You can specify this file in both the cscjson2xsd command and cscjsonxmlconv command.
The following shows the template file. To specify the -f argument after editing the template file, save the file with the desired file name.
service-platform-installation-directory\CSC\config\msg\templates\csc_json_converter.properties
For details about how to define the JSON-XML transformation definition file, see 3.13.1 JSON-XML transformation definition file.
Return value
|
Return value |
Meaning |
|---|---|
|
0 |
Normally terminated. |
|
1 |
Abnormally terminated. |
|
9 |
An error occurred when checking the execution permission. |
Notes
-
This command must be executed by a user with administrator's permission.
-
The system environment variable COSMINEXUS_HOME must be set correctly.