I recommend you to split parsing phases at least two.
package.json is a mix of various concerns in the ecosystem and has no canonical schema. Some tools (e.g. Node.js) adds there very complex specs with untagged unions and recursive structures.
Parsing it directly into a single model might be dangerous and a fragile.