Skip to content

Latest commit

 

History

History
92 lines (63 loc) · 2.8 KB

JSON.md

File metadata and controls

92 lines (63 loc) · 2.8 KB

Stores

Data

See json-to-json-schema for transforming JSON to JSON schema.

Use json-to-mobx-state-tree to transform a JSON data structure to MobX State Tree model (first transforms JSON to JSON Schema)

Fake Data

json-schema-faker

var schema = {
    type: "object",
    properties: {
      name: {
        type: "string",
        faker: "name.findName"
      },
      email: {
        type: "string",
        format: "email",
        faker: "internet.email"
      }
    },
    required: ["name", "email"]
  }
};

jsf.resolve(schema).then(function(sample) {
  console.log(sample);
  // "[object Object]"

  console.log(sample.name);
  // "John Doe"
});

JSON data to Schemas

Convert JSON Objects to MySQL Table Schema, JSON Schema, Mongoose Schema, ClickHouse Schema, Google BigQuery, or a Generic template for documentation, code generation, and more.

generate-schema

Schema to Yup Validation

Schema to TypeScript

JSON to JavaScript serializer

Elastic search

Mongoose

TypeORM

entitySchemas: [
  Object.assign({ target: Post }, require(__dirname + "/Schemas/Post.json"))
];

Schema to GraphQL types

Forms

Build React forms based on GraphQL API