Json.NET - Quick Starts & API Documentation
IsValid Method (source, schema)
Namespaces ► Newtonsoft.Json.Schema ► Extensions ► IsValid(JToken, JsonSchema)
Determines whether the JToken is valid.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public static bool IsValid( this JToken source, JsonSchema schema )
<ExtensionAttribute> _ Public Shared Function IsValid ( _ source As JToken, _ schema As JsonSchema _ ) As Boolean
[ExtensionAttribute] public: static bool IsValid( JToken^ source, JsonSchema^ schema )
Parameters
- schema (JsonSchema)
- The schema to test with.
Return Value
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.