SimpleObject

Newton. SimpleObject

new SimpleObject()

SimpleObject
Source:

Methods

(static) fromJSONObject(obj) → {SimpleObject}

Create a SimpleObject instance from a plain object
Source:
Parameters:
Name Type Description
obj Object The object you would convert
Throws:
Will throw if the conversion is not possible
Returns:
Type:
SimpleObject

(static) fromJSONString(str) → {SimpleObject}

Create a SimpleObject instance from a string
Source:
Parameters:
Name Type Description
str String The object you would convert
Throws:
Will throw if the conversion is not possible
Returns:
Type:
SimpleObject

(private) _set(key, value)

Never use directly. Use the alias instead
Source:
Parameters:
Name Type Description
key String The key
value String | null | Number | Boolean The value

setBool(key, value)

Set a boolan value
Source:
Parameters:
Name Type Description
key String The key
value Integer The value

setFloat(key, value)

Set a float value
Source:
Parameters:
Name Type Description
key String The key
value Integer The value

setInt(key, value)

Set an integer value
Source:
Parameters:
Name Type Description
key String The key
value Integer The value

setNull(key, value)

Set the value to null
Source:
Parameters:
Name Type Description
key String The key
value Integer The value

setString(key, value)

Set a string value
Source:
Parameters:
Name Type Description
key String The key
value String The value

toJSONObject() → {Object}

Return an object with all set values
Source:
Returns:
Type:
Object
The object stored in this SimpleObject

toJSONString() → {String}

Return an json representation
Source:
Returns:
Type:
String