showing results for - "json schema generator"
Lane
09 Jul 2016
1String json = "{\"sectors\": [{\"times\":[{\"intensity\":30," +
2                "\"start\":{\"hour\":8,\"minute\":30},\"end\":{\"hour\":17,\"minute\":0}}," +
3                "{\"intensity\":10,\"start\":{\"hour\":17,\"minute\":5},\"end\":{\"hour\":23,\"minute\":55}}]," +
4                "\"id\":\"dbea21eb-57b5-44c9-a953-f61816fd5876\"}]}";
5        String result = JsonSchemaGenerator.outputAsString("Schedule", "this is a test", json);
6            /* sample output
7            {
8              "title": "Schedule",
9              "description": "this is a test",
10              "type": "object",
11              "properties": {
12                "sectors": {
13                  "type": "array",
14                  "items": {
15                    "properties": {
16                      "times": {
17                        "type": "array",
18                        "items": {
19                          "properties": {
20                            "intensity": {
21                              "type": "number"
22                            },
23                            "start": {
24                              "type": "object",
25                              "properties": {
26                                "hour": {
27                                  "type": "number"
28                                },
29                                "minute": {
30                                  "type": "number"
31                                }
32                              }
33                            },
34                            "end": {
35                              "type": "object",
36                              "properties": {
37                                "hour": {
38                                  "type": "number"
39                                },
40                                "minute": {
41                                  "type": "number"
42                                }
43                              }
44                            }
45                          }
46                        }
47                      },
48                      "id": {
49                        "type": "string"
50                      }
51                    }
52                  }
53                }
54              } 
55            }
56             */
57
58        // To generate JSON schema into a file
59        JsonSchemaGenerator.outputAsFile("Schedule", "this is a test", json, "output-schema.json");
60
61        // To generate POJO(s)
62        JsonSchemaGenerator.outputAsPOJO("Schedule", "this is a test", json, "com.example", "generated-sources");
63    }
64
queries leading to this page
generate json schemagenerate json schema from jsonjson schema to jninja2 onlineonline json schema tooljson schema generatorcustom json schema generator c 23define json schema onlinejson schema generator jqueryhow to create schema for jsongenerate json with schema onlinecreate json schemajsonschema editorc 23 json schema generator modelschema generator from json onlinegenerate schema jsonjson creator schemagenerate json schemafschema org online generatorjson forms schema generatorinfyom json schema generatorjson generate schemaepjson schemajson schema generatojson ld schema generatorjson schema faker examplesjson schema to generate json schemajson schema generator model classesjson get schemajson based schema generator onlinedraft json structure toolonline json schema creatorjson schema generator javagenerate online json schemaonline jsonschemaonline schema generatorgenerate json schemashson schema generatorjson generator from schemajson schema table generatorjson api schema generatoronline generate json schemajson schema generationjson data generator from schemagenerate json from schema onlinejson schema genertaebuild json schema onlinejson to json schema onlineauto create json schema from databaseschema generator jsonjson schema generator in c 23json schema from jsonjson to schema builderbasic json schema creatorgenerate sample data from json schema onlinejson schema example generatorjson to diagram onlinecreate json schema onlinegenerate json schemadesign schema in json onlinejson schema builder onlinejson to schema converterjson schema creatorjson schema conversionjson to schema generatorgenerate json for the schema onlinejson schema tool onlinejson schema creation onlinejson schema generator output as string onlinejson schemacreate schema from json onlineonline json schema generatoronline json to json schema converterjson generatorjson ld schema generatorgenerate schema from jsongenerate json document from a json schemacreate json schema from json onlinejson schema markup generatorjson generate schema onlinejson to schema onlinejson schema form generatorvisual studio json schema generatorgenerate json schema onlinejson schema builderjson schema ui generatorschema json generatorjson schema generator draft 6json schema builderjson schema generator draft 4json from jsonschemajson schemat toolcreate a json schema onlinecreate js schema from json onlineconvert schema to jsonjson schema generator onlinegenerate json schema from json dataschema graph generatorjson schema generatprmake json schema onlinejson from schema generatorjson schema generator from c 23 onlinejson schema create onlinejson schema online generator json schema builderjson schema generator based on classjson schema generator c 23json schema makeronline json schema makerschema generate from jsongenerate schema for json objectjson schema generatejson object to schemajson to json schemaconvert json to schemajson schema generator with defaultonlinejson schema generatorjson schema form generatorjson schema documentation generatorjson schema designerjson schema generator