# jsons2xsd

> Convert JSON Schemas to XSD

Latest version **1.0.3** (published 2020-04-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install jsons2xsd
pnpm add jsons2xsd
yarn add jsons2xsd
bun add jsons2xsd
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2020-04-01 |
| First published | 2019-11-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 14.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | christoph.melzer@allportal.de |
| Maintainers | melzerc |

## Links

- npm: https://www.npmjs.com/package/jsons2xsd
- npm.io page: https://npm.io/package/jsons2xsd

## Dependencies (1)

- [xmlbuilder](https://npm.io/package/xmlbuilder.md) ^13.0.2

## Recent versions

- 1.0.3 (latest) — 2020-04-01
- 1.0.2 — 2020-03-30
- 1.0.1 — 2019-11-15
- 1.0.0 — 2019-11-12

## README

# jsons2xsd

JSON-Schema to XML schema converter written in JavaScript

## Usage

After installation require / import the module and use it like this:
```js
// import module
const XsdGenerator = require('jsons2xsd');

// do whatever needed to get your schema as either a string or a JSON object
const jsonSchema = getJsonSchema();

// create Generator instance 
const Generator = new XsdGenerator(jsonSchema);

// get a pretty formatted XSD based on the schema
const xsdString = Generator.convert().xmlString;
```

## Not yet implemented

There is a bunch of features which are currently not implemented. Here is a list:
- References (`$ref` property in JSON-Schema)
- Arrays on root level
- Different JSON-Schema Draft versions
- Custom XSD Namespacing (namespace is set to http://www.w3.org/2001/XMLSchema)

---
_Source: https://npm.io/package/jsons2xsd · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
