Skip to main content

PackageJson

Type Alias PackageJson 

Source
pub type PackageJson = PackageJsonGeneric<PackageJsonCell>;
Expand description

package.json parsed with simd-json (the parsed BorrowedValue borrows the file bytes).

Aliased Type§

pub struct PackageJson {
    pub path: PathBuf,
    pub realpath: PathBuf,
    /* private fields */
}

Fields§

§path: PathBuf

Path to package.json. Contains the package.json filename.

§realpath: PathBuf

Realpath to package.json. Contains the package.json filename.

Implementations§

Source§

impl PackageJson

Source

pub fn parse( fs: &dyn FileSystem, path: PathBuf, realpath: PathBuf, json: Vec<u8>, ) -> Result<Self, JSONError>

Parse a package.json file from JSON bytes

§Panics
§Errors