Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
class Newtonsoft.​Json.​Schema.​JsonSchemaGenerator
Assembly: Newtonsoft.Json
Inheritance: object → JsonSchemaGenerator
<para> Generates a <see cref="T:Newtonsoft.Json.Schema.JsonSchema" /> from a specified <see cref="T:System.Type" />. </para> <note type="caution"> JSON Schema validation has been moved to its own package. See <see href="http://www.newtonsoft.com/jsonschema">http://www.newtonsoft.com/jsonschema</see> for more details. </note>
Properties
public
UndefinedSchemaIdHandling
UndefinedSchemaIdHandling
Gets or sets how undefined schemas are handled by the serializer.
ContractResolver
Gets or sets the contract resolver.
Methods
public
JsonSchema
Generate​(System.​Type type)
Generate a <see cref="T:Newtonsoft.Json.Schema.JsonSchema" /> from the specified type.
Returns A <see cref="T:Newtonsoft.Json.Schema.JsonSchema" /> generated from the specified type.
type
The type to generate a <see cref="T:Newtonsoft.Json.Schema.JsonSchema" /> from.
public
JsonSchema
Generate​(System.​Type type,
JsonSchemaResolver resolver)
Generate a <see cref="T:Newtonsoft.Json.Schema.JsonSchema" /> from the specified type.
Returns A <see cref="T:Newtonsoft.Json.Schema.JsonSchema" /> generated from the specified type.
type
The type to generate a <see cref="T:Newtonsoft.Json.Schema.JsonSchema" /> from.
resolver
The <see cref="T:Newtonsoft.Json.Schema.JsonSchemaResolver" /> used to resolve schema references.
public
JsonSchema
Generate​(System.​Type type,
bool rootSchemaNullable)
Generate a <see cref="T:Newtonsoft.Json.Schema.JsonSchema" /> from the specified type.
Returns A <see cref="T:Newtonsoft.Json.Schema.JsonSchema" /> generated from the specified type.
type
The type to generate a <see cref="T:Newtonsoft.Json.Schema.JsonSchema" /> from.
rootSchemaNullable
Specify whether the generated root <see cref="T:Newtonsoft.Json.Schema.JsonSchema" /> will be nullable.
public
JsonSchema
Generate​(System.​Type type,
JsonSchemaResolver resolver,
bool rootSchemaNullable)
Generate a <see cref="T:Newtonsoft.Json.Schema.JsonSchema" /> from the specified type.
Returns A <see cref="T:Newtonsoft.Json.Schema.JsonSchema" /> generated from the specified type.
type
The type to generate a <see cref="T:Newtonsoft.Json.Schema.JsonSchema" /> from.
resolver
The <see cref="T:Newtonsoft.Json.Schema.JsonSchemaResolver" /> used to resolve schema references.
rootSchemaNullable
Specify whether the generated root <see cref="T:Newtonsoft.Json.Schema.JsonSchema" /> will be nullable.
public
bool
Equals​(object obj)
Inherited from object
protected
void
Finalize​()
Inherited from object
public
int
GetHashCode​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object
public
string
ToString​()
Inherited from object