@plurnk/plurnk-mimetypes-application-json
v1.0.9
Published
application/json and application/jsonc mimetype handler for plurnk-service.
Readme
@plurnk/plurnk-mimetypes-application-json
application/json mimetype handler for the plurnk ecosystem.
install
npm install @plurnk/plurnk-mimetypes-application-jsonplurnk-service discovers this handler automatically via its plurnk.kind: "mimetype" declaration.
what it does
validate(content)throws on malformed JSON via jsonc-parser — strict forapplication/json, permissive (comments + trailing commas) forapplication/jsonc. Per framework error policy, this error propagates to the caller as a contract violation.extractRaw(content)returns every key occurrence at every depth as afieldsymbol, with line numbers from jsonc-parser's positional tree.- Array and scalar JSON roots have no named keys → empty
MimeSymbol[].
development
npm install
npm run build
npm testlicense
MIT.
