Converts JSON Schema v3 schemas to v4 compatibility, solving the problem of migrating legacy schemas to the newer draft. Version 1.1.0 is the latest stable release; the project appears to be in maintenance mode with no recent updates. Unlike alternatives that require manual rewriting, this tool works in-place on schema objects and supports merged syntaxes like mixed boolean/array 'required'. Released under public domain and MIT licenses.
npm install json-schema-compatibilityNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows converting a v3 schema to v4 using Node.js require and the v4 function.
Clone the schema first if you need the original: var copy = JSON.parse(JSON.stringify(original)); api.v4(copy);
Use a more modern library (e.g., ajv with addSchema for multiple drafts) or manually update to latest draft.
Include an ES5 shim (e.g., es5-shim) before this library in older browsers.
Use CommonJS require or bundler's CommonJS interop (e.g., webpack with commonjs option).
Ensure package is installed: npm install json-schema-compatibility; then use var api = require('json-schema-compatibility');Include the library script before using: <script src='path/to/json-schema-compatibility.js'></script>
Pass the schema through api.v4() to convert 'divisibleBy' to 'multipleOf'.
No dependency data recorded yet.