Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

Interface IJsObjectBuilder

interface IJsObjectBuilder
Extends com.amazon.apmf.IStandard JavaScript Object Builder.

Methods

setNull()

IJsObjectBuilder* setNull(string key)
Set null as the value for this key. The key is automatically converted from UTF-8 to the appropriate JavaScript String. Setting a different value for the same key, simply resets it to that new value.

Parameters

key
string — Required

Returns

IJsObjectBuilder* IJsObjectBuilder

setUndefined()

IJsObjectBuilder* setUndefined(string key)
Set undefined as the value for this key. The key is automatically converted from UTF-8 to the appropriate JavaScript String. Setting a different value for the same key, simply resets it to that new value.

Parameters

key
string — Required

Returns

IJsObjectBuilder* IJsObjectBuilder

setString()

IJsObjectBuilder* setString(string key, string value)
Set a string value for this key. The key and value are automatically converted from UTF-8 to the appropriate JavaScript String. Setting a different value for the same key, simply resets it to that new value.

Parameters

key
string — Required
value
string — Required

Returns

IJsObjectBuilder* IJsObjectBuilder

setBool()

IJsObjectBuilder* setBool(string key, bool value)
Set a boolean value for this key. The key is automatically converted from UTF-8 to the appropriate JavaScript String. Setting a different value for the same key, simply resets it to that new value.

Parameters

key
string — Required
value
bool — Required

Returns

IJsObjectBuilder* IJsObjectBuilder

setDouble()

IJsObjectBuilder* setDouble(string key, double value)
Set a IEEE 754 double value for this key, except that all IEEE 754 NaN values are mapped to the single JavaScript NaN value. +/- infinities are mapped to +/- infinities in JavaScript. The key is automatically converted from UTF-8 to the appropriate JavaScript String. Setting a different value for the same key, simply resets it to that new value.

Parameters

key
string — Required
value
double — Required

Returns

IJsObjectBuilder* IJsObjectBuilder

setInt()

IJsObjectBuilder* setInt(string key, i64 value)
Set a signed 64-bit for this key, except that values outside the range of Number.MIN_SAFE_INTEGER -(2**53 - 1) and Number.MAX_SAFE_INTEGER (2**53 - 1) will lose precision. The key is automatically converted from UTF-8 to the appropriate JavaScript String. Setting a different value for the same key, simply resets it to that new value.

Parameters

key
string — Required
value
i64 — Required

Returns

IJsObjectBuilder* IJsObjectBuilder

setArray()

IJsObjectBuilder* setArray(string key, IJsArray* value)
Set a IJsArray for this key. The key is automatically converted from UTF-8 to the appropriate JavaScript String. Setting a different value for the same key, simply resets it to that new value.

Parameters

key
string — Required
value
IJsArray* — Required

Returns

IJsObjectBuilder* IJsObjectBuilder

setObject()

IJsObjectBuilder* setObject(string key, IJsObject* value)
Set a IJsObject for this key. The key is automatically converted from UTF-8 to the appropriate JavaScript String. Setting a different value for the same key, simply resets it to that new value.

Parameters

key
string — Required
value
IJsObject* — Required

Returns

IJsObjectBuilder* IJsObjectBuilder

build()

IJsObject* build()
Build the immutable IJsObject containing all the key-value pairs.

Returns

IJsObject* IJsObject
Last modified on October 29, 2026