Class: JsonType

Defined in: lib/Types/JsonTypes.coffee
Inherits: types.MapManager

Overview

Manages Object-like values.

Variables Summary

mutable_default =
true

Instance Method Summary

Constructor Details

# (void) constructor(uid, initial_value, mutable)

Parameters:

  • uid ( Object ) A unique identifier. If uid is undefined, a new uid will be created.
  • initial_value ( Object ) Create this operation with an initial value.
  • Whether ( String|Boolean ) the initial_value should be created as mutable. (Optional - see setMutableDefault)

Instance Method Details

# (void) setMutableDefault(mutable)

~ (Json) val()
~ (JsonType|Word|String|Object) val(name)
~ (JsonType) val(name, content)

Overloads:

~ (Json) val()

Get this as a Json object.

Returns:

  • Json

~ (JsonType|Word|String|Object) val(name)

Get value of a property.

Parameters:

  • name ( String ) Name of the object property.

Returns:

  • ( JsonType|Word|String|Object ) — Depending on the value of the property. If mutable it will return a Operation-type object, if immutable it will return String/Object.

~ (JsonType) val(name, content)

Set a new property.

Parameters:

  • name ( String ) Name of the object property.
  • content ( Object|String ) Content of the object property.

Returns:

  • ( JsonType ) — This object. (supports chaining)

# (void) _encode() Private

    Quickly fuzzy find classes, mixins, methods, file:

    Control the navigation frame:

    You can focus and blur the search input: