Add to_json and from_json to document & queryset objects