flask-restful/flask-restful — pull request #350 by Ch00k (2014-11-26 19:13:47+00:00)
Title: Allow specifying a default serialization value if marshaled object is None

I'm not 100% sure this feature is at all needed but I came across a situation when I needed to return an empty object instead of the dictionary with all null keys for a marshaled object.
My example is the following:
```
@marshal_with(IMDB_DATA, default={}, envelope='imdb_data')
def get(self, movie_id):
movie = Movie.query.get(movie_id)
return movie.imdb_data
```
`Movie.imdb_data` is an SQLAlchemy one-to-one relationship. When I query `/movies/1083/imdb-data` and the movie does not have IMDB data associated I'd rather return an empty JSON object than the object with all null keys.

Basically the behavior is the same as `default` kwarg for `flask_restful.fileds` classes.