IsValid Method (source, schema, errorMessages)

Json.NET

Json.NET - Quick Starts & API Documentation IsValid Method (source, schema, errorMessages)
NamespacesNewtonsoft.Json.SchemaExtensionsIsValid(JToken, JsonSchema, IList<(Of <<'(String>)>>)%)
Determines whether the JToken is valid.
Declaration Syntax
C# Visual Basic Visual C++
public static bool IsValid(
	this JToken source,
	JsonSchema schema,
	out IList<string> errorMessages
)
<ExtensionAttribute> _
Public Shared Function IsValid ( _
	source As JToken, _
	schema As JsonSchema, _
	<OutAttribute> ByRef errorMessages As IList(Of String) _
) As Boolean
[ExtensionAttribute]
public:
static bool IsValid(
	JToken^ source, 
	JsonSchema^ schema, 
	[OutAttribute] IList<String^>^% errorMessages
)
Parameters
source (JToken)
The source JToken to test.
schema (JsonSchema)
The schema to test with.
errorMessages (IList<(Of <(<'String>)>)>%)
When this method returns, contains any error messages generated while validating.
Return Value
true if the specified JToken is valid; otherwise, false.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type JToken. When you use instance method syntax to call this method, omit the first parameter.

Assembly: Newtonsoft.Json (Module: Newtonsoft.Json) Version: 4.5.0.0 (4.5.6.14930)