Permalink
Browse files

add json DS.attr

  • Loading branch information...
1 parent 9e047ab commit 4c61cda99d7d4ae26e50c199dfe7c79f98d83aaa @joewest committed Jul 29, 2012
Showing with 10 additions and 0 deletions.
  1. +10 −0 packages/ember-data/lib/system/model/attributes.js
View
10 packages/ember-data/lib/system/model/attributes.js
@@ -112,6 +112,16 @@ DS.attr.transforms = {
}
},
+ json: {
+ from: function(serialized) {
+ return Ember.none(serialized) ? null : serialized;
+ },
+
+ to: function(deserialized) {
+ return Ember.none(deserialized) ? null : deserialized;
+ }
+ },
+
date: {
from: function(serialized) {
var type = typeof serialized;

0 comments on commit 4c61cda

Please sign in to comment.