Parses an in-memory package recipe.
The file format (JSON/SDLang) will be determined from the file extension.
The contents of the recipe file
Name associated with the package recipe - this is only used to determine the file format from the file extension
Optional name of the parent package (if this is a sub package)
Optional default package name (if no package name is found in the recipe this value will be used)
Returns the package recipe contents
Throws an exception if an I/O or syntax error occurs