
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
json-schema-empty
Advanced tools
[][travis] [][coveralls] [);
// logs:
// {
// foo: 15,
// bar: [ 0, 0, 0 ],
// baz: ''
// }
string: because it impossible to guess what the string
content should be, even when patterns and length limits are given,
a string schema always results in the empty string: ''
.
integer: json-schema-empty
tries to satisfy the minimum
, maximum
and multipleOf
constraints whenever possible wth the additional property
that, when it is possible, 0
is returned.
number: just follows the integer
schema.
object: tries to create a minimal object with as few keys as possible.
Only keys that are in the required
array are generated.
Object size is ignored completely, for the same reason that the strings are empty: we cannot guess the keys.
array: when the item
type is given, and minItems
is given,
the shortest array that matches this is generated. It also works
when items
is a tuple. maxItems
is ignored. Whenever possible,
the empty array is returned.
boolean: always results in false
.
null: always results in null
.
oneOf, anyOf: selects one of the accepted types and goes from there.
allOf: json-schema-empty
merges all schemas and works from that schema
to generate a value.
enum: selects the first possible value.
$ref
: just works!
Whenever specified, json-schema-empty
uses the default
value (even if it
does not match the schema).
This code is licensed under the ISC license
FAQs
[][travis] [][coveralls] [![Dependencies](https://img.shields
The npm package json-schema-empty receives a total of 597 weekly downloads. As such, json-schema-empty popularity was classified as not popular.
We found that json-schema-empty demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.