Class: types.Object
Defined in: | lib/Types/JsonTypes.coffee |
Inherits: | types.MapManager |
Overview
Manages Object-like values.
Direct Known Subclasses
Variables Summary
- type =
-
"Object"
Identifies this class. Use it to check whether this is a json-type or something else.
Examples:
var x = yatta.val('unknown') if (x.type === "Object") { console.log JSON.stringify(x.toJson()) }
Instance Method Summary
- # (void) applyDelete()
- # (void) cleanup()
- # (Json) toJson(transform_to_value = false) Transform this to a Json.
- ~ (Json) val()
- # (void) _encode() Private
Instance Method Details
#
(void)
applyDelete()
#
(void)
cleanup()
#
(Json)
toJson(transform_to_value = false)
Transform this to a Json. If your browser supports Object.observe it will be transformed automatically when a change arrives. Otherwise you will loose all the sharing-abilities (the new object will be a deep clone)!
TODO: at the moment you don't consider changing of properties. E.g.: let x = {a:[]}. Then x.a.push 1 wouldn't change anything
~
(Json)
val()
~
(Object Type||String|Object)
val(name)
~
(Object Type)
val(name, content)
#
(void)
_encode()
Private