--- title: "Virtual Package Format" order: 5 ---

There's not much to the virtual package; it's just a JSON-based text file with a `.vpack` file extension.

The file is formatted just like a universal package manifest file (e.g. `upack.json`), and follows the same specification, except that there are two additional properties:

Property | Format
--- | ---
`contentsR` | An array of at least one item, containing any of the following: string - a package identification string string - an absolute URL to an HTTP or HTTPS file resource object - virtual content object
`metaContents` | same as contents property

## Specifications

### Virtual Content Object

This object describes a remote file or folder within either the root of the content (`package/`) or package root (`/`) folder, depending on whether it's within the `contents` or `metaContents` property.

Property | Format
--- | ---
`type` | A string of either `virtualDirectory` or `virtualFile` that describes the content to be added. The default value is `virtualDirectory`, and is used only in the case of missing property. All other values (including null or empty) are invalid.
`virtualPath` | A string of a path to a file or folder within either the root of the content (`package/`) or package root (`/`) folder, depending on whether the object is within the `contents` or `metaContents` property. A missing property, or null, empty, or "/" string means the root within that path. When used in metaContent, a value of `upack.json` is invalid, as the manifest can never be virtualized. A value that begins with `package/` is also invalid for metaContent.
`source` | One of the following values: package identification string package source object file source object

### Package Source Object

This object describes where either a virtualFile or virtualFolder (as specified by the parent object) can be found.

Property | Format
--- | ---
`group` | A string of the referenced package group. When not specified, the empty group is used.
`name`R | A string of the referenced package name.
`version`R | A string of the referenced package version.
`hash` | A package hash string used to verify the package file
`packagePath` | A string containing the path within the package file (i.e. under the `/` directory of the archive file) the content can be found. A missing property or null value will default to `package/`.

### File Source Object

This object describes where a virtualFile can be found.

Property | Format
--- | ---
`urlR` | A string of an absolute HTTP/HTTPS resource where file contents can be found
`hash` | A hash string with the same format as a package hash string is used to verify the file

## Examples

The `contents` property is required.

### Minimal

    {
     "name": "HDARS.Combined",
     "version": "1.3.9",
     "contents": [ "HDARS.Web:1.3.9", "HDARS.API:1.3.9"  ]
    }

### Path References

    {
     "group": "initrode/vendors/abl",
     "name": "ABLast.AstDist",
     "version": "2.2.1",
     "contents": [
       {
        "type": "virtualDirectory",
        "virtualPath": "vendors/common/ast",
        "source": "initrode/vendors/abl/ABlast:2.2.1:ab60bf74fc8147ca41bd53bdb1defc3aae35bc91"
       },
       {
        "type": "virtualFile",
        "virtualPath": "common/logo/logo.png",
        "source": "http://proget/endpoints/customer-assets/content/ast-logo.png"
       }
      ]