parsePackageRecipe

Parses an in-memory package recipe.

The file format (JSON/SDLang) will be determined from the file extension.

parsePackageRecipe
(
string contents
,
string filename
,
string parent_name = null
,
string default_package_name = null
)

Parameters

contents
Type: string

The contents of the recipe file

filename
Type: string

Name associated with the package recipe - this is only used to determine the file format from the file extension

parent_name
Type: string

Optional name of the parent package (if this is a sub package)

default_package_name
Type: string

Optional default package name (if no package name is found in the recipe this value will be used)

Return Value

Returns the package recipe contents

Throws

Throws an exception if an I/O or syntax error occurs

Meta