  # None is null after serialization to json
  # Primary key is None in case of not saved model
  >>> mv2 = Movie(title="Movie 2", actor=ac)
  >>> print serializers.serialize("json", [mv2])
  [{"pk": null, "model": "serializers.movie", "fields": {"actor": "Za\u017c\u00f3\u0142\u0107", "title": "Movie 2"}}]
  
  # Deserialization of null returns None for pk
  >>> print list(serializers.deserialize('json', serializers.serialize('json', [mv2])))[0].object.id
  None
  
 
</s> remove [{"pk": 1, "model": "serializers.movie", "fields": {"actor": "Za\u017c\u00f3\u0142\u0107", "title": "G\u0119\u015bl\u0105 ja\u017a\u0144"}}]
 </s> add [{"pk": 1, "model": "serializers.movie", "fields": {"price": "0.00", "actor": "Za\u017c\u00f3\u0142\u0107", "title": "G\u0119\u015bl\u0105 ja\u017a\u0144"}}] </s> remove     if strings_only and isinstance(s, (types.NoneType, int, long, datetime.datetime, datetime.date, datetime.time, float)):
 </s> add     if strings_only and isinstance(s, (types.NoneType, int, long, datetime.datetime, datetime.date, datetime.time, float, Decimal)):
[{"pk": null, "model": "serializers.movie", "fields": {"price": "0.00", "actor": "Za\u017c\u00f3\u0142\u0107", "title": "Movie 2"}}]
  # None is null after serialization to json
  # Primary key is None in case of not saved model
  >>> mv2 = Movie(title="Movie 2", actor=ac)
  >>> print serializers.serialize("json", [mv2])
[{"pk": null, "model": "serializers.movie", "fields": {"price": "0.00", "actor": "Za\u017c\u00f3\u0142\u0107", "title": "Movie 2"}}]
  
  # Deserialization of null returns None for pk
  >>> print list(serializers.deserialize('json', serializers.serialize('json', [mv2])))[0].object.id
  None
  
keep keep keep keep replace keep keep keep keep keep
 Fixed #5903 -- DecimalField.get_default() now correctly returns a Decimal object when the model instance was not retrieved from the database. Thanks Justin Driscoll and pigletto.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9823 bcc190cf-cafb-0310-a4f2-bffc1f526a37 
tests/modeltests/serializers/models.py