@pardnchiu/nanojson
Version:
NanoJSON is a lightweight JSON editing library built on pure JavaScript and native APIs. Can be easily embedded into websites.
70 lines (50 loc) • 2.36 kB
Markdown
# NanoJSON: Lightweight JSON Editor

<br>
[](https://www.npmjs.com/package/@pardnchiu/nanojson)
[](https://www.npmjs.com/package/@pardnchiu/nanojson)
[](https://www.jsdelivr.com/package/npm/@pardnchiu/nanojson)
## Installation
### Install via npm
```bash
npm i @pardnchiu/nanojson
```
### Include via CDN
#### UMD version
```html
<script src="https://cdn.jsdelivr.net/npm/@pardnchiu/nanojson@[VERSION]/dist/NanoJSON.js"></script>
```
#### ES Module version
```javascript
import { JSONEditor } from "https://cdn.jsdelivr.net/npm/@pardnchiu/nanojson@[VERSION]/dist/NanoJSON.esm.js";
```
## How to use
### Initialize `JSONEditor`
```Javascript
let dom = new JSONEditor({
id: "JSON-editor", // Element to replace
// title: "", // Editor Title
// description: "", // Editor Description
// button: {
// import: false,
// export: false
// } // Default { import: true, export: true }
// fill: 1 // Adjust size to parent element, default: 1 | true
});
```
## License
Similar to MIT License but provides obfuscated code only:
- Same as MIT: Free to use, modify and redistribute, including commercial use
- Main difference: Provides obfuscated code by default, source code available for purchase
- License terms: Must retain original copyright notice (same as MIT)
For detailed terms and conditions, please see the [Software Usage Agreement](https://github.com/pardnchiu/NanoJSON/blob/main/LICENSE).
## Creator
<img src="https://avatars.githubusercontent.com/u/25631760" align="left" width="96" height="96" style="margin-right: 0.5rem;">
<h4 style="padding-top: 0">邱敬幃 Pardn Chiu</h4>
<a href="mailto:dev@pardn.io" target="_blank">
<img src="https://pardn.io/image/email.svg" width="48" height="48">
</a> <a href="https://linkedin.com/in/pardnchiu" target="_blank">
<img src="https://pardn.io/image/linkedin.svg" width="48" height="48">
</a>
***
©️ 2025 [邱敬幃 Pardn Chiu](https://pardn.io)