def to_hash
      {
        repository: repository,
        resource_hash: resource_hash,     # location of cookbook manifest in S3
        metadata: ::JSON.dump(metadata),  # pass as opaque JSON blob
        pos: pos
      }
    end
def to_hash
      {
        repository: repository,
        resource_hash: resource_hash,     # location of cookbook manifest in S3
        metadata: ::JSON.dump(metadata),  # pass as opaque JSON blob
        pos: pos
      }
    end
marshal cookbook to hash