4.16.1 Format of property files in JSON format
The format of a property file in JSON format is described below.
Enter properties in a JSON-format file as follows:
{ "properties": [ { "keyName": "key-of-property-1", "displayName": "property-display-name" "description": "property-description" "type": "property-data-type" "value": "property-value" }, { "keyName": "key-of-property-2", "displayName": "property-display-name" "description": "property-description" "type": "property-data-type" "value": "property-value" }, ] }
The file contents must comply with the RFC 4627 standard.
UTF-8 must be used as the character encoding.
A property file in JSON format must begin with the properties associative array.
You must specify a keyname and value field.
To specify a property without a property value, use the format "value": "".
The values of Password properties can be specified in plaintext or cyphertext. However, the value field of Password properties will be omitted when exporting the property file.
In a property file, only specify the properties for which you want to set property values. Properties that are not present in an imported property file will retain their existing values.
Make sure that the number of properties defined in a property file does not exceed the limit specified in the user-specified properties file (config_user.properties).
Exported property files are saved with the file name service_properties.json. You can change the file name. The file name can contain multi-byte characters. However, you must use .json as the file extension.
The table below shows how the import process is affected when invalid items are defined in a property file in JSON format. Potential outcomes when you import a property file that contains invalid definitions include errors, and property values not being applied correctly.
Item with invalid definition |
Imported from Service Definition window or Submit Service dialog box |
Imported from Service Builder Debug window |
Imported using submittask command |
---|---|---|---|
The number of properties defined in the property file exceeds the limit specified in the user-specified properties file (config_user.properties) |
A |
A |
E |
A property defined in the file does not exist in the service |
S |
S |
E#1 |
The same property key is defined more than once |
A#2 |
A#2 |
E |
The length of a keyName parameter exceeds the limit |
S |
S |
E |
A value is specified that is not appropriate for a property (the value has the wrong data type or violates restrictions for the property) |
A#3 |
A |
E |
- Legend:
A: The property value is applied. S: Processing is skipped without applying the property value. E: An error occurs.
- #1
An error occurs when you attempt to import a property whose visibility setting is Edit Window Only.
- #2
When the same property key is defined multiple times, the definition that appears last in the file takes effect.
- #3
If a value that cannot be set from the user interface is defined for a property whose data type is list or boolean, an empty value is applied to the property.