Class Formats
Defines various formats used for FormatKeyword validation.
Inheritance
Inherited Members
Namespace: Manatee.Json.Schema
Assembly: Manatee.Json.dll
Syntax
public static class Formats
Remarks
Any of these may be overridden by creating a new instance with the same key.
Properties
| Improve this Doc View SourceDate
Gets the date
format.
Declaration
public static IFormatValidator? Date { get; }
Property Value
Type | Description |
---|---|
System.Nullable<IFormatValidator> |
DateTime
Gets the date-time
format.
Declaration
public static IFormatValidator? DateTime { get; }
Property Value
Type | Description |
---|---|
System.Nullable<IFormatValidator> |
Duration
Gets the duration
format.
Declaration
public static IFormatValidator? Duration { get; }
Property Value
Type | Description |
---|---|
System.Nullable<IFormatValidator> |
Gets the email
format.
Declaration
public static IFormatValidator? Email { get; }
Property Value
Type | Description |
---|---|
System.Nullable<IFormatValidator> |
HostName
Gets the hostname
format.
Declaration
public static IFormatValidator? HostName { get; }
Property Value
Type | Description |
---|---|
System.Nullable<IFormatValidator> |
Ipv4
Gets the ipv4
format.
Declaration
public static IFormatValidator? Ipv4 { get; }
Property Value
Type | Description |
---|---|
System.Nullable<IFormatValidator> |
Ipv6
Gets the ipv6
format.
Declaration
public static IFormatValidator? Ipv6 { get; }
Property Value
Type | Description |
---|---|
System.Nullable<IFormatValidator> |
Iri
Gets the iri
format.
Declaration
public static IFormatValidator? Iri { get; }
Property Value
Type | Description |
---|---|
System.Nullable<IFormatValidator> |
IriReference
Gets the iri-reference
format.
Declaration
public static IFormatValidator? IriReference { get; }
Property Value
Type | Description |
---|---|
System.Nullable<IFormatValidator> |
JsonPointer
Gets the json-pointer
format.
Declaration
public static IFormatValidator? JsonPointer { get; }
Property Value
Type | Description |
---|---|
System.Nullable<IFormatValidator> |
Regex
Gets the regex
format.
Declaration
public static IFormatValidator? Regex { get; }
Property Value
Type | Description |
---|---|
System.Nullable<IFormatValidator> |
RelativeJsonPointer
Gets the relative-json-pointer
format.
Declaration
public static IFormatValidator? RelativeJsonPointer { get; }
Property Value
Type | Description |
---|---|
System.Nullable<IFormatValidator> |
Uri
Gets the uri
format.
Declaration
public static IFormatValidator? Uri { get; }
Property Value
Type | Description |
---|---|
System.Nullable<IFormatValidator> |
UriReference
Gets the uri-reference
format.
Declaration
public static IFormatValidator? UriReference { get; }
Property Value
Type | Description |
---|---|
System.Nullable<IFormatValidator> |
UriTemplate
Gets the uri-template
format.
Declaration
public static IFormatValidator? UriTemplate { get; }
Property Value
Type | Description |
---|---|
System.Nullable<IFormatValidator> |
Uuid
Gets the uuid
format.
Declaration
public static IFormatValidator? Uuid { get; }
Property Value
Type | Description |
---|---|
System.Nullable<IFormatValidator> |
Methods
| Improve this Doc View SourceGetFormat(String)
Gets a IFormatValidator object based on a format key.
Declaration
public static IFormatValidator? GetFormat(string formatKey)
Parameters
Type | Name | Description |
---|---|---|
System.String | formatKey | The predefined key for the format. |
Returns
Type | Description |
---|---|
System.Nullable<IFormatValidator> | A IFormatValidator object, or null if none exists for the key. |
RegisterFormat(IFormatValidator)
Adds a validator to the library. This will override any existing validators for the same key.
Declaration
public static void RegisterFormat(IFormatValidator validator)
Parameters
Type | Name | Description |
---|---|---|
IFormatValidator | validator | The validator to add. |
UnregisterFormat(String)
Removes support for the given format.
Declaration
public static void UnregisterFormat(string formatKey)
Parameters
Type | Name | Description |
---|---|---|
System.String | formatKey | The format key. |