Returns a JSON representation of the dependency specification.
Simple specifications will be represented as a single specification
string (versionSpec), while more complex specifications will be
represented as a JSON object with optional "version", "path", "optional"
and "default" fields.
Returns a JSON representation of the dependency specification.
Simple specifications will be represented as a single specification string (versionSpec), while more complex specifications will be represented as a JSON object with optional "version", "path", "optional" and "default" fields.