I am hoping this is me not holding it right, but I am trying to generate a JSON schema from a JSON string that I have in memory.
I am using the NJsonSchema off of GitHub. https://github.com/NJsonSchema/NJsonSchema/
string json = @"{
""a"": 1,
""name"": ""Bill Smith"",
""isTall"": true
}";
var schemaItem = JsonSchema4.FromJson(json);
string jsonSchema = schemaItem.ToJson();
When I execute the code above I get the following value in jsonSchema which is not correct.
{
"$schema": "http://json-schema.org/draft-04/schema#",
"a": 1,
"name": "Bill Smith",
"isTall": true
}
I have created a GitHub bug for it for the time being just in case. https://github.com/NJsonSchema/NJsonSchema/issues/180