GithubHelp home page GithubHelp logo

doytsujin / json-to-plantuml Goto Github PK

View Code? Open in Web Editor NEW

This project forked from meteorbites/json-to-plantuml

0.0 1.0 1.0 109 KB

Transforms JSON to Plant UML to help visualize your JSON data.

JavaScript 100.00%

json-to-plantuml's Introduction

json-to-plantuml

Transforms JSON to Plant UML to help visualize your JSON data.

Example JSON data

{
    "name": "Product",
    "properties": {
        "id": {
            "type": "number",
            "description": "Product identifier",
            "required": true
        },
        "name": {
            "description": "Name of the product",
            "type": "string",
            "required": true
        },
        "price": {
            "type": "number",
            "minimum": 0,
            "required": true
        },
        "tags": {
            "type": "array",
            "items": {
                "type": "string"
            }
        }
    }
}

Example Plant UML output

alt text

As CMD line tool

Install

$ npm install -g json-to-plantuml

Run

$ echo '{"foo": "bar"}' | json-to-plantuml
$ json-to-plantuml -f .\data\albumdata.json

Piping to PlantUML to generate image

$ echo '{"foo": "bar"}' | json-to-plantuml | java -jar plantuml.jar -pipe > topo.png
$ json-to-plantuml -f .\data\albumdata.json | java -jar plantuml.jar -pipe > topo.png

gif

Install Dependencies to generate image

Java, Plant UML, GraphViz

Known to work with PlantUML following versions

plantuml-jar-lgpl-8048

plantuml-jar-lgpl-8049

As project dependency

Install

$ npm install --save json-to-plantuml

Code

var jsonToPlantUml = require('json-to-plantuml');

jsonToPlantUml('{"foo":"bar"}')
	.then(console.log)
	.catch(console.log);

Output

@startuml
class "root" as root {
    .. Properties ..
    foo: bar
}
@enduml

json-to-plantuml's People

Contributors

meteorbites avatar boshka avatar

Watchers

 avatar

Forkers

kgoodridge

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.