There are a number of tools available to generate JSON Schema from JSON but I can't find any to generate sample JSON from JSON Schema.
Any suggestions? Preferably something online that doesn't involve installing stuff.
To generate sample JSON files from a JSON Schema, select Generate Sample JSON Files from the XML Tools > JSON Tools menu. The action opens a dialog box where you can configure a variety of options for generating the files.
The simplest way to check if JSON is valid is to load the JSON into a JObject or JArray and then use the IsValid(JToken, JsonSchema) method with the JSON Schema. To get validation error messages, use the IsValid(JToken, JsonSchema, IList<String> ) or Validate(JToken, JsonSchema, ValidationEventHandler) overloads.
Declaring a unique identifier It is also best practice to include an $id property as a unique identifier for each schema. For now, just set it to a URL at a domain you control, for example: { "$id": "http://yourdomain.com/schemas/myschema.json" }
JSON (JavaScript Object Notation) is a simple and lightweight text-based data format. JSON Schema is an IETF standard providing a format for what JSON data is required for a given application and how to interact with it.
I created an online tool called Mock Turtle. Using this tool you can:
Hope this helps anyone facing a similar problem :)
There is a web based tool for generating JSON documents from JSON Schema documents at http://schematic-ipsum.herokuapp.com/ but I can't vouch for how well it works. It is included on the list of tools on the JSON Schema website.
The down vote is most likely because asking for tool recomendations is considered off-topic. If you phrased your question like "How can I do X? My requirements are Y", then you avoid such downvotes (hopefully).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With