This chapter shows some exemplary JSON templates for various attribute types that can used in the process of importing complex attributes in the form of JSON strings.
Date
A JSON template for a date attribute, looks like the following:
| Exemplary attribute |
JSON template |
- Attribute ID: ExCompDefDate
- Attribute type: Date
- Wert: 14.04.2025 (dd.mm.yyyy)
|
[
{
"identifier": "ExCompDefDate",
"attributeDataType": "DATE",
"values": [
{
"value":"14.04.2025"
}
],
"position": "/column number/row number",
"type": "attribute"
}
]
|
Composition, listed
A JSON template for a “Composition, listed” attribute, looks like the following:
| Exemplary attribute |
JSON template |
- Attribute ID: ExCompDefComp
- Attributtyp: Composition, listed
- Values: 250g flour, 50g sugar
- Value IDs: flr, sgr
|
[
{
"identifier": "ExCompDefComp",
"attributeDataType": "COMPOSITION",
"values": [
{
"amount":"250",
"value":"flr",
"uom":{
"value":"g"
}
},
{
"amount":"50",
"value":"sgr",
"uom":{
"value":"g"
}
},
],
"position": "/Zeilennummer/Spaltennummer",
"type": "attribute"
}
] |
The quantity is specified under the “amount” key, while the value key contains the ID of the respective value (e.g. “sgr” for “sugar”).
List of values, multiple
A JSON template for a list of multiple values attribute, looks like the following:
| Exemplary attribute |
JSON template |
- Attribute ID: ExLovAttMllt
- Attribute type: List of values, multiple
- Values: Test value 1, Test value 2
- Value IDs: tv1, tv2
|
[ {
"identifier": "ExLovAttMllt",
"attributeDataType": "MULTI_LOOKUP",
"values": [
{ "value":"tv1" }, { "value":"tv2" }
],
"position": "/column number/row number",
"type": "attribute"
}
] |
At this point the IDs of the respective values is used instead of the values themselves.
List of values, single
A JSON template for a list of single values attribute, looks like the following:
| Exemplary attribute |
JSON template |
- Attribute ID: ExLovAtt
- Attribut type: List of values, single
- Value: Test value 1
- Value ID: tv1
|
[
{
"identifier": "ExLovAtt",
"attributeDataType": "LOOKUP",
"values": [
{
"value":"tv1"
}
],
"position": "/row number/column number",
"type": "attribute"
}
]
|
At this point the ID of the respective value is used instead of the value itself.
Logical value
A JSON template for a logical value attribute, looks like the following:
| Exemplary attribute |
JSON template |
- Attribut-ID: ExCompDefBool
- Attributtyp: Logical value
- Wert: Yes
|
[
{
"identifier": "ExCompDefBool",
"attributeDataType": "BOOLEAN",
"values": [
{
"value":"YES"
}
],
"position": "/row number/column number",
"type": "attribute"
}
]
|
Number, integer
A JSON template for an integer number attribute looks like the following:
| Exemplary attribute |
JSON template |
- Attribute ID: ExInAtt
- Attribute type: Number, integer
- Attribute value: 12345
|
[
{
"identifier": "ExIntAtt",
"attributeDataType": "NUMBER",
"values": [
{
"value":"12345"
}
],
"position": "/row number/column number",
"type": "attribute"
}
]
|
Number, decimal
A JSON template for an decimal number attribute looks like the following:
| JSON template |
- Attribute ID: ExCompDefDec
- Attribute type: Zahl, dezimal
- Attribute value: 1.2
|
[
{
"identifier": "ExCompDefDec",
"attributeDataType": "Zahl, dezimal",
"values": [
{
"value":"1.2"
}
],
"position": "/row number/column number",
"type": "attribute"
}
]
|
Number range, integer (with UOM)
A JSON template for an integer number attribute with a unit of measurement looks like the following:
| Exemplary attribute |
JSON template |
- Attribute ID: ExNriAtt
- Attribute type: Number range, integer
- Attribut value: 12–34
- Unit of measurement: cm
|
[
{
"identifier": "ExNriAtt",
"attributeDataType": "NUMBER_RANGE",
"values": [
{
"valueFrom":"12",
"valueTo":"34",
"uom": {
"value": "cm"
}
}
],
"position": "/row number/column number",
"type": "attribute"
}
]
|
String, localized
A JSON template for a localized string attribute with values on two locale levels looks like the following:
| Exemplary attribute |
JSON template |
- Attribute ID: ExStrLocAtt
- Attribute type: String, localized
- Locale levels: German (deDE), English (enGB)
- Values: TestDE, TestEN
|
[ { "identifier": "ExStrLocAtt", "attributeDataType": "STRING", "values": [ { "value": "TestDE", "descriptions": [ { "text": "TestDE", "lang": "deDE" } ] } ], "position": "/Zeilennummer/Spaltennummer", "type": "attribute" }, { "identifier": "ExStrLocAtt", "attributeDataType": "STRING", "values": [ { "value": "TestEN", "descriptions": [ { "text": "TestEN", "lang": "enGB" } ] } ], "position": "/column number/row number", "type": "attribute" }
] |
String, not localized
A JSON template for a non-localized string attribute looks like the following:
| Exemplary attribute |
JSON template |
- Attribute ID: ExStrAtt
- Attribute type: String, not localized
- Value: Test value
|
[
{
"identifier": "ExStrAtt",
"attributeDataType": "PLAIN_STRING",
"values": [
{
"value":"Test value"
}
],
"position": "/row number/column number",
"type": "attribute"
}
]
|