Attribute Value
Description
A JSON object that represents the value of a NoSQL item attribute:
Syntax
{"<attribute data type>": "<attribute data value>"}
- <attribute data type>
The name of the
Attribute Value object, which signifies the type of the attribute's data value.- Type: String
The following attribute-value names (attribute data-type strings) are supported. See the Attribute Data Types Reference for documentation of the related attribute data types.
-
"S" — a string attribute.
-
"N" — a number attribute, represented as a string.
-
"BOOL" — a Boolean attribute.
-
"B" — a binary large object (blob) attribute, represented as a Base64-encoded string.
- <attribute data value>
The attribute's data value ("attribute value"). This value must match the data type signified by the
Attribute Value object name (<attribute data type> ).- Type: String
Examples
Define a string attribute value.
The name of the attribute-value object is "S"
, which signifies that the type of the attribute data is a string, and the value of the object (the attribute's data value) is "johnd"
:
{"S": "johnd"}
Define a numeric attribute value.
The name of the attribute-value object is "N"
, which signifies that the type of the attribute data is a number, and the value of the object (the attribute's data value) is "34"
; note the numeric data value is represented as a string:
{"N": "34"}
Define a Boolean attribute value.
The name of the attribute-value object is "BOOL"
, which signifies that the type of the attribute data is Boolean, and the value of the object (the attribute's data value) is false
:
{"BOOL": false}
Define a blob attribute value.
The name of the attribute-value object is "B"
, which signifies that the type of the attribute data is a blob, and the value of the object (the attribute's data value) is "iguazio:$apr1$YgrCYAYo$6v6iumigwirH4Jsdt4MWr0"
; note the blob data value is represented as a string:
{"B": "iguazio:$apr1$YgrCYAYo$6v6iumigwirH4Jsdt4MWr0"}