Json.NET - Quick Starts & API Documentation
Generate Method (type, resolver, rootSchemaNullable)
Namespaces ► Newtonsoft.Json.Schema ► JsonSchemaGenerator ► Generate(Type, JsonSchemaResolver, Boolean)
Generate a JsonSchema from the specified type.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public JsonSchema Generate( Type type, JsonSchemaResolver resolver, bool rootSchemaNullable )
Public Function Generate ( _ type As Type, _ resolver As JsonSchemaResolver, _ rootSchemaNullable As Boolean _ ) As JsonSchema
public: JsonSchema^ Generate( Type^ type, JsonSchemaResolver^ resolver, bool rootSchemaNullable )
Parameters
- type (Type)
- The type to generate a JsonSchema from.
- resolver (JsonSchemaResolver)
- The JsonSchemaResolver used to resolve schema references.
- rootSchemaNullable (Boolean)
- Specify whether the generated root JsonSchema will be nullable.
Return Value
A JsonSchema generated from the specified type.