def dump(deposition, from_date, with_json=True, latest_only=False, **kwargs):
    """Dump the deposition object as dictionary."""
    # Serialize the __getstate__ and fall back to default serializer
    dep_json = json.dumps(deposition.__getstate__(),
                          default=default_serializer)
    dep_dict = json.loads(dep_json)
    dep_dict['_p'] = {}
    dep_dict['_p']['id'] = deposition.id
    dep_dict['_p']['created'] = dt2utc_timestamp(deposition.created)
    dep_dict['_p']['modified'] = dt2utc_timestamp(deposition.modified)
    dep_dict['_p']['user_id'] = deposition.user_id
    dep_dict['_p']['state'] = deposition.state
    dep_dict['_p']['has_sip'] = deposition.has_sip()
    dep_dict['_p']['submitted'] = deposition.submitted
    return dep_dict