Skip to content

Instantly share code, notes, and snippets.

@tauren
Created February 22, 2011 00:57
Show Gist options
  • Save tauren/838033 to your computer and use it in GitHub Desktop.
Save tauren/838033 to your computer and use it in GitHub Desktop.
var child = new Backbone.Model({name: "child"});
var parent = new Backbone.Model({name: "parent", child: child});
var json = parent.toJson()
This should return:
{
name: "parent",
child: {
name: "child"
}
}
But it returns:
{
name: "parent",
child: Backbone.Model
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment