genson-js (v0.0.8) is a TypeScript/JavaScript library for generating JSON Schemas from JSON objects and merging multiple schemas. It ports the Python GenSON library, providing functions like createSchema, mergeSchemas, createCompoundSchema, extendSchema, areSchemasEqual, and isSubset. It ships TypeScript types and is designed for lightweight schema inference and composition. Released occasionally with basic functionality; no recent updates. Differentiated by its focus on schema merging and TypeScript support.
npm install genson-jsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates creating a JSON Schema from a sample object using createSchema.
For complex schemas, consider using libraries like ajv or json-schema-generator.
Always use ValueType enum or the corresponding string literal for type values.
Manually merge results if optimization is needed.
Ensure npm install genson-js is run, and tsconfig.json has 'moduleResolution': 'node' or 'node16'.
Use import { createSchema } from 'genson-js'.Use const { createSchema } = require('genson-js') if in CommonJS environment.No dependency data recorded yet.