Home Manual Reference Source Repository
import BackboneParseObject from 'backbone/src/BackboneParseObject.js'
public class | source

BackboneParseObject

Extends:

parse~Parse.Object → BackboneParseObject

Provides overrides necessary to integrate Parse serialization / deserialization with Backbone.

Constructor Summary

Public Constructor
public

constructor(className: string | object, attributes: object, options: object)

Provides a constructor for clone.

Method Summary

Public Methods
public

Creates a new BackboneParseObject with identical attributes to this one.

public

toJSON(seen: *): Object

Returns a JSON version of the object suitable for saving to Parse.

Public Constructors

public constructor(className: string | object, attributes: object, options: object) source

Provides a constructor for clone.

Params:

NameTypeAttributeDescription
className string | object

class name of object that has className field.

attributes object

attributes hash.

options object

Optional parameters

Public Methods

public clone(): BackboneParseObject source

Creates a new BackboneParseObject with identical attributes to this one.

public toJSON(seen: *): Object source

Returns a JSON version of the object suitable for saving to Parse.

There is a subtle difference in this version which is if attrs[attr].parseObject === 'object' then the associated parseObject is encoded directly.

Params:

NameTypeAttributeDescription
seen *

Provides an array of previously seen entries.

Return:

Object