From d4439516e32f6894f87e2094d826d0812487332d Mon Sep 17 00:00:00 2001 From: Zahid Hossain <60911932+zhossain-info@users.noreply.github.com> Date: Tue, 14 Nov 2023 09:48:51 +0600 Subject: [PATCH 1/4] Add new pragmas for date and time --- ...DateTimeValidator.cs => DateTimeParser.cs} | 49 ++++++------------- ...FunctionManager.cs => FunctionRegistry.cs} | 14 ++++-- .../JsonSchema/Tree/PragmaDescriptor.cs | 7 +++ .../{PragmaManager.cs => PragmaRegistry.cs} | 33 +++++++++++-- .../JsonSchema/Tree/SchemaTreeVisitor.cs | 6 +-- .../RelogicLabs/JsonSchema/Types/JFunction.cs | 2 +- .../RelogicLabs/JsonSchema/Types/JLeaf.cs | 1 + .../RelogicLabs/JsonSchema/Types/JNode.cs | 9 ++++ .../RelogicLabs/JsonSchema/Types/JObject.cs | 6 +-- .../JsonSchema/Types/JPrimitive.cs | 1 + .../RelogicLabs/JsonSchema/Types/JString.cs | 5 +- .../RelogicLabs/JsonSchema/Types/JsonType.cs | 34 ++++++++----- 12 files changed, 107 insertions(+), 60 deletions(-) rename JsonSchema/RelogicLabs/JsonSchema/Time/{DateTimeValidator.cs => DateTimeParser.cs} (74%) rename JsonSchema/RelogicLabs/JsonSchema/Tree/{FunctionManager.cs => FunctionRegistry.cs} (95%) rename JsonSchema/RelogicLabs/JsonSchema/Tree/{PragmaManager.cs => PragmaRegistry.cs} (57%) diff --git a/JsonSchema/RelogicLabs/JsonSchema/Time/DateTimeValidator.cs b/JsonSchema/RelogicLabs/JsonSchema/Time/DateTimeParser.cs similarity index 74% rename from JsonSchema/RelogicLabs/JsonSchema/Time/DateTimeValidator.cs rename to JsonSchema/RelogicLabs/JsonSchema/Time/DateTimeParser.cs index 1c23a7e..b30d6e9 100644 --- a/JsonSchema/RelogicLabs/JsonSchema/Time/DateTimeValidator.cs +++ b/JsonSchema/RelogicLabs/JsonSchema/Time/DateTimeParser.cs @@ -8,16 +8,16 @@ namespace RelogicLabs.JsonSchema.Time; -internal sealed class DateTimeValidator +internal sealed class DateTimeParser { - public const string ISO_8601_DATE = "YYYY-MM-DD"; - public const string ISO_8601_TIME = "YYYY-MM-DD'T'hh:mm:ss.FZZ"; - private static readonly Dictionary _Processors = new(); private readonly DateTimeLexer _dateTimeLexer; private readonly IList _lexerTokens; - static DateTimeValidator() + public string Pattern { get; } + public DateTimeType Type { get; } + + static DateTimeParser() { AddProcessor(TEXT, Text); AddProcessor(SYMBOL, Symbol); @@ -55,15 +55,17 @@ static DateTimeValidator() private static void AddProcessor(int index, SegmentProcessor processor) => _Processors.Add(ruleNames[index - 1], processor); - public DateTimeValidator(string pattern) + public DateTimeParser(string pattern, DateTimeType type) { + Pattern = pattern; + Type = type; _dateTimeLexer = new DateTimeLexer(CharStreams.fromString(pattern)); _dateTimeLexer.RemoveErrorListeners(); _dateTimeLexer.AddErrorListener(LexerErrorListener.DateTime); _lexerTokens = _dateTimeLexer.GetAllTokens(); } - private void Validate(string input, DateTimeContext context) + private JsonDateTime Parse(string input, DateTimeContext context) { foreach(var token in _lexerTokens) { @@ -73,45 +75,26 @@ private void Validate(string input, DateTimeContext context) if(input.Length != 0) throw new InvalidDateTimeException(ErrorCode.DINV02, $"Invalid {context.Type} input format"); - context.Validate(); + var dateTime = context.Validate(); DebugUtilities.Print(context); + return dateTime; } - public void ValidateDate(string input) - => Validate(input, new DateTimeContext(DateTimeType.DATE_TYPE)); - - public void ValidateTime(string input) - => Validate(input, new DateTimeContext(DateTimeType.TIME_TYPE)); - - public bool IsValidDate(string input, out string error) - { - error = string.Empty; - try - { - ValidateDate(input); - return true; - } - catch(InvalidDateTimeException ex) - { - DebugUtilities.Print(ex); - error = ex.Message; - return false; - } - } + public JsonDateTime Parse(string input) + => Parse(input, new DateTimeContext(Type)); - public bool IsValidTime(string input, out string error) + public JsonDateTime? TryParse(string input, out string error) { error = string.Empty; try { - ValidateTime(input); - return true; + return Parse(input); } catch(InvalidDateTimeException ex) { DebugUtilities.Print(ex); error = ex.Message; - return false; + return null; } } } \ No newline at end of file diff --git a/JsonSchema/RelogicLabs/JsonSchema/Tree/FunctionManager.cs b/JsonSchema/RelogicLabs/JsonSchema/Tree/FunctionRegistry.cs similarity index 95% rename from JsonSchema/RelogicLabs/JsonSchema/Tree/FunctionManager.cs rename to JsonSchema/RelogicLabs/JsonSchema/Tree/FunctionRegistry.cs index 6326a2e..e4081b4 100644 --- a/JsonSchema/RelogicLabs/JsonSchema/Tree/FunctionManager.cs +++ b/JsonSchema/RelogicLabs/JsonSchema/Tree/FunctionRegistry.cs @@ -9,13 +9,19 @@ namespace RelogicLabs.JsonSchema.Tree; -internal sealed class FunctionManager +public sealed class FunctionRegistry { private readonly HashSet _includes = new(); private readonly Dictionary> _functions = new(); private readonly RuntimeContext _runtime; - public FunctionManager(RuntimeContext runtime) => _runtime = runtime; + public FunctionRegistry(RuntimeContext runtime) => _runtime = runtime; + + public JInclude AddClass(JInclude include) + { + AddClass(include.ClassName, include.Context); + return include; + } public void AddClass(string className, Context? context = null) { @@ -103,7 +109,7 @@ private static int GetParameterCount(ICollection parameters) } private static bool IsMatch(ParameterInfo parameter, JNode argument) - => parameter.ParameterType.IsInstanceOfType(argument); + => parameter.ParameterType.IsInstanceOfType(argument.Derived); private static bool IsParams(ParameterInfo parameter) => parameter.IsDefined(typeof(ParamArrayAttribute), false); @@ -120,7 +126,7 @@ public bool InvokeFunction(JFunction function, JNode target) var schemaArgs = ProcessArguments(_parameters, _arguments); if(schemaArgs == null) continue; if(IsMatch(_parameters[0], target)) return method.Invoke(function, - AddTarget(schemaArgs, target)); + AddTarget(schemaArgs, target.Derived)); mismatchParameter = _parameters[0]; } if(mismatchParameter != null) diff --git a/JsonSchema/RelogicLabs/JsonSchema/Tree/PragmaDescriptor.cs b/JsonSchema/RelogicLabs/JsonSchema/Tree/PragmaDescriptor.cs index 36c6751..aecb3fe 100644 --- a/JsonSchema/RelogicLabs/JsonSchema/Tree/PragmaDescriptor.cs +++ b/JsonSchema/RelogicLabs/JsonSchema/Tree/PragmaDescriptor.cs @@ -6,12 +6,19 @@ internal abstract class PragmaDescriptor { private static readonly Dictionary _Pragmas = new(); + public const string ISO_8601_DATE = "YYYY-MM-DD"; + public const string ISO_8601_TIME = "YYYY-MM-DD'T'hh:mm:ss.FZZ"; + public static readonly PragmaProfile IgnoreUndefinedProperties = new(nameof(IgnoreUndefinedProperties), typeof(JBoolean), false); public static readonly PragmaProfile FloatingPointTolerance = new(nameof(FloatingPointTolerance), typeof(JNumber), 1E-10); public static readonly PragmaProfile IgnoreObjectPropertyOrder = new(nameof(IgnoreObjectPropertyOrder), typeof(JBoolean), true); + public static readonly PragmaProfile DateDataTypeFormat + = new(nameof(DateDataTypeFormat), typeof(JString), ISO_8601_DATE); + public static readonly PragmaProfile TimeDataTypeFormat + = new(nameof(TimeDataTypeFormat), typeof(JString), ISO_8601_TIME); public string Name { get; } public Type Type { get; } diff --git a/JsonSchema/RelogicLabs/JsonSchema/Tree/PragmaManager.cs b/JsonSchema/RelogicLabs/JsonSchema/Tree/PragmaRegistry.cs similarity index 57% rename from JsonSchema/RelogicLabs/JsonSchema/Tree/PragmaManager.cs rename to JsonSchema/RelogicLabs/JsonSchema/Tree/PragmaRegistry.cs index 8dfb89a..5d256da 100644 --- a/JsonSchema/RelogicLabs/JsonSchema/Tree/PragmaManager.cs +++ b/JsonSchema/RelogicLabs/JsonSchema/Tree/PragmaRegistry.cs @@ -1,15 +1,19 @@ using RelogicLabs.JsonSchema.Exceptions; using RelogicLabs.JsonSchema.Message; +using RelogicLabs.JsonSchema.Time; using RelogicLabs.JsonSchema.Types; using static RelogicLabs.JsonSchema.Message.ErrorCode; +using static RelogicLabs.JsonSchema.Time.DateTimeType; namespace RelogicLabs.JsonSchema.Tree; -internal sealed class PragmaManager +public sealed class PragmaRegistry { - public const string IGNORE_UNDEFINED_PROPERTIES = "IgnoreUndefinedProperties"; - public const string FLOATING_POINT_TOLERANCE = "FloatingPointTolerance"; - public const string IGNORE_OBJECT_PROPERTY_ORDER = "IgnoreObjectPropertyOrder"; + private const string IGNORE_UNDEFINED_PROPERTIES = "IgnoreUndefinedProperties"; + private const string FLOATING_POINT_TOLERANCE = "FloatingPointTolerance"; + private const string IGNORE_OBJECT_PROPERTY_ORDER = "IgnoreObjectPropertyOrder"; + private const string DATE_DATA_TYPE_FORMAT = "DateDataTypeFormat"; + private const string TIME_DATA_TYPE_FORMAT = "TimeDataTypeFormat"; private readonly Dictionary _pragmas = new(); @@ -19,6 +23,19 @@ internal sealed class PragmaManager = PragmaDescriptor.FloatingPointTolerance.DefaultValue; public bool IgnoreObjectPropertyOrder { get; private set; } = PragmaDescriptor.IgnoreObjectPropertyOrder.DefaultValue; + public string DateDataTypeFormat { get; private set; } + = PragmaDescriptor.DateDataTypeFormat.DefaultValue; + public string TimeDataTypeFormat { get; private set; } + = PragmaDescriptor.TimeDataTypeFormat.DefaultValue; + + internal DateTimeParser DateTypeParser { get; private set; } + internal DateTimeParser TimeTypeParser { get; private set; } + + public PragmaRegistry() + { + DateTypeParser = new DateTimeParser(DateDataTypeFormat, DATE_TYPE); + TimeTypeParser = new DateTimeParser(TimeDataTypeFormat, TIME_TYPE); + } public JPragma AddPragma(JPragma pragma) { if(_pragmas.ContainsKey(pragma.Name)) @@ -40,6 +57,14 @@ private void SetPragmaValue(string name, JPrimitive value) { case IGNORE_OBJECT_PROPERTY_ORDER: IgnoreObjectPropertyOrder = ((IPragmaValue) value).Value; break; + case DATE_DATA_TYPE_FORMAT: + DateDataTypeFormat = ((IPragmaValue) value).Value; + DateTypeParser = new DateTimeParser(DateDataTypeFormat, DATE_TYPE); + break; + case TIME_DATA_TYPE_FORMAT: + TimeDataTypeFormat = ((IPragmaValue) value).Value; + TimeTypeParser = new DateTimeParser(TimeDataTypeFormat, TIME_TYPE); + break; } } diff --git a/JsonSchema/RelogicLabs/JsonSchema/Tree/SchemaTreeVisitor.cs b/JsonSchema/RelogicLabs/JsonSchema/Tree/SchemaTreeVisitor.cs index 57f65fa..79e414e 100644 --- a/JsonSchema/RelogicLabs/JsonSchema/Tree/SchemaTreeVisitor.cs +++ b/JsonSchema/RelogicLabs/JsonSchema/Tree/SchemaTreeVisitor.cs @@ -40,7 +40,7 @@ public override JNode VisitCoreSchema(SchemaParser.CoreSchemaContext context) private List ProcessIncludes(SchemaParser.IncludeContext[] contexts) { - _runtime.AddClass(typeof(CoreFunctions).FullName!); + _runtime.Functions.AddClass(typeof(CoreFunctions).FullName!); return contexts.Select(i => (JInclude) Visit(i)).ToList(); } @@ -71,7 +71,7 @@ public override JNode VisitInclude(SchemaParser.IncludeContext context) Context = new Context(context, _runtime), ClassName = context.IDENTIFIER().Select(n => n.GetText()).Join(",") }.Build(); - return _runtime.AddClass(include); + return _runtime.Functions.AddClass(include); } public override JNode VisitPragma(SchemaParser.PragmaContext context) @@ -83,7 +83,7 @@ public override JNode VisitPragma(SchemaParser.PragmaContext context) Name = context.IDENTIFIER().GetText(), Value = (JPrimitive) Visit(context.primitive()) }.Build(); - return _runtime.AddPragma(pragma); + return _runtime.Pragmas.AddPragma(pragma); } public override JNode VisitValidator(SchemaParser.ValidatorContext context) diff --git a/JsonSchema/RelogicLabs/JsonSchema/Types/JFunction.cs b/JsonSchema/RelogicLabs/JsonSchema/Types/JFunction.cs index 83bacab..3b80211 100644 --- a/JsonSchema/RelogicLabs/JsonSchema/Types/JFunction.cs +++ b/JsonSchema/RelogicLabs/JsonSchema/Types/JFunction.cs @@ -40,7 +40,7 @@ private bool InvokeFunction(JNode node) { try { - return Runtime.InvokeFunction(this, node); + return Runtime.Functions.InvokeFunction(this, node); } catch(Exception ex) { diff --git a/JsonSchema/RelogicLabs/JsonSchema/Types/JLeaf.cs b/JsonSchema/RelogicLabs/JsonSchema/Types/JLeaf.cs index 47e1e47..2bc4a05 100644 --- a/JsonSchema/RelogicLabs/JsonSchema/Types/JLeaf.cs +++ b/JsonSchema/RelogicLabs/JsonSchema/Types/JLeaf.cs @@ -3,4 +3,5 @@ namespace RelogicLabs.JsonSchema.Types; public abstract class JLeaf : JNode { private protected JLeaf(Builder builder) : base(builder) { } + private protected JLeaf(JLeaf node) : base(node) { } } \ No newline at end of file diff --git a/JsonSchema/RelogicLabs/JsonSchema/Types/JNode.cs b/JsonSchema/RelogicLabs/JsonSchema/Types/JNode.cs index 0c88bc0..c54640d 100644 --- a/JsonSchema/RelogicLabs/JsonSchema/Types/JNode.cs +++ b/JsonSchema/RelogicLabs/JsonSchema/Types/JNode.cs @@ -14,6 +14,7 @@ public abstract class JNode // To make complete tree read only and immutable private readonly IDictionary _relations; public Context Context { get; } + internal JNode Derived { get; set; } public virtual JNode? Parent => _relations.GetValue(this); public virtual IEnumerable Children { get; private protected init; } = Enumerable.Empty(); @@ -24,6 +25,14 @@ private protected JNode(Builder builder) { _relations = NonNull(builder.Relations); Context = NonNull(builder.Context); + Derived = this; + } + + private protected JNode(JNode node) + { + _relations = NonNull(node._relations); + Context = NonNull(node.Context); + Derived = this; } private T Initialize() where T : JNode diff --git a/JsonSchema/RelogicLabs/JsonSchema/Types/JObject.cs b/JsonSchema/RelogicLabs/JsonSchema/Types/JObject.cs index e37255d..a1d2e95 100644 --- a/JsonSchema/RelogicLabs/JsonSchema/Types/JObject.cs +++ b/JsonSchema/RelogicLabs/JsonSchema/Types/JObject.cs @@ -42,7 +42,7 @@ public override bool Match(JNode node) ExpectedDetail.AsPropertyNotFound(thisProp), ActualDetail.AsPropertyNotFound(node, thisProp))); } - if(unresolved.IsEmpty() || Runtime.IgnoreUndefinedProperties) return result; + if(unresolved.IsEmpty() || Runtime.Pragmas.IgnoreUndefinedProperties) return result; foreach(var key in unresolved) { var property = other.Properties[key]; @@ -58,7 +58,7 @@ public override bool Match(JNode node) { var thisProp = Properties[index]; JProperty? otherProp = null; - if(!Runtime.IgnoreObjectPropertyOrder) + if(!Runtime.Pragmas.IgnoreObjectPropertyOrder) { var atProp = GetPropAt(other.Properties, index); if(AreKeysEqual(atProp, thisProp)) otherProp = atProp; @@ -91,7 +91,7 @@ public override bool Equals(object? obj) if(obj.GetType() != this.GetType()) return false; var other = (JObject) obj; if(Properties.Count != other.Properties.Count) return false; - return Runtime.IgnoreObjectPropertyOrder? UnorderedEquals(other.Properties) + return Runtime.Pragmas.IgnoreObjectPropertyOrder? UnorderedEquals(other.Properties) : OrderedEquals(other.Properties); } diff --git a/JsonSchema/RelogicLabs/JsonSchema/Types/JPrimitive.cs b/JsonSchema/RelogicLabs/JsonSchema/Types/JPrimitive.cs index d886705..c66b6fb 100644 --- a/JsonSchema/RelogicLabs/JsonSchema/Types/JPrimitive.cs +++ b/JsonSchema/RelogicLabs/JsonSchema/Types/JPrimitive.cs @@ -3,6 +3,7 @@ namespace RelogicLabs.JsonSchema.Types; public abstract class JPrimitive : JLeaf, IJsonType { private protected JPrimitive(Builder builder) : base(builder) { } + private protected JPrimitive(JPrimitive node) : base(node) { } public virtual JsonType Type => JsonType.PRIMITIVE; public JNode Node => this; diff --git a/JsonSchema/RelogicLabs/JsonSchema/Types/JString.cs b/JsonSchema/RelogicLabs/JsonSchema/Types/JString.cs index a9fc5de..67ee344 100644 --- a/JsonSchema/RelogicLabs/JsonSchema/Types/JString.cs +++ b/JsonSchema/RelogicLabs/JsonSchema/Types/JString.cs @@ -7,13 +7,16 @@ namespace RelogicLabs.JsonSchema.Types; -public sealed class JString : JPrimitive, IPragmaValue +public class JString : JPrimitive, IPragmaValue { public string Value { get; } private JString(Builder builder) : base(builder) => Value = NonNull(builder.Value); + private protected JString(JString node) : base(node) + => Value = NonNull(node.Value); + public override bool Match(JNode node) { var other = CastType(node); diff --git a/JsonSchema/RelogicLabs/JsonSchema/Types/JsonType.cs b/JsonSchema/RelogicLabs/JsonSchema/Types/JsonType.cs index aa1f382..41d72d4 100644 --- a/JsonSchema/RelogicLabs/JsonSchema/Types/JsonType.cs +++ b/JsonSchema/RelogicLabs/JsonSchema/Types/JsonType.cs @@ -1,7 +1,6 @@ using Antlr4.Runtime.Tree; using RelogicLabs.JsonSchema.Exceptions; using RelogicLabs.JsonSchema.Message; -using RelogicLabs.JsonSchema.Time; using RelogicLabs.JsonSchema.Tree; using RelogicLabs.JsonSchema.Utilities; using static RelogicLabs.JsonSchema.Message.ErrorCode; @@ -10,10 +9,8 @@ namespace RelogicLabs.JsonSchema.Types; public class JsonType { - private static readonly Dictionary _StringMapTypes = new(); - private static readonly Dictionary _ClassMapTypes = new(); - private static readonly DateTimeValidator _Iso8601Date = new(DateTimeValidator.ISO_8601_DATE); - private static readonly DateTimeValidator _Iso8601Time = new(DateTimeValidator.ISO_8601_TIME); + private static readonly Dictionary _StringTypeMap = new(); + private static readonly Dictionary _ClassTypeMap = new(); public static readonly JsonType BOOLEAN = new("#boolean", typeof(JBoolean)); public static readonly JsonType STRING = new("#string", typeof(JString)); @@ -24,6 +21,7 @@ public class JsonType public static readonly JsonType ARRAY = new("#array", typeof(JArray)); public static readonly JsonType NULL = new("#null", typeof(JNull)); public static readonly JsonType NUMBER = new("#number", typeof(JNumber)); + public static readonly JsonType DATETIME = new("#datetime", typeof(JDateTime)); public static readonly JsonType DATE = new("#date", typeof(JString)); public static readonly JsonType TIME = new("#time", typeof(JString)); public static readonly JsonType PRIMITIVE = new("#primitive", typeof(JPrimitive)); @@ -34,13 +32,13 @@ public class JsonType public Type Type { get; } - internal static JsonType? From(Type type) => _ClassMapTypes.GetValue(type); + internal static JsonType? From(Type type) => _ClassTypeMap.GetValue(type); internal static JsonType From(ITerminalNode node) => From(node.GetText(), Location.From(node.Symbol)); internal static JsonType From(string name, Location location) { - var result = _StringMapTypes.TryGetValue(name, out var type); + var result = _StringTypeMap.TryGetValue(name, out var type); if(!result) throw new InvalidDataTypeException(MessageFormatter.FormatForSchema( DTYP01, $"Invalid data type {name}", location)); return type!; @@ -50,8 +48,8 @@ private JsonType(string name, Type type) { Name = name; Type = type; - _StringMapTypes[name] = this; - _ClassMapTypes.TryAdd(type, this); + _StringTypeMap[name] = this; + _ClassTypeMap.TryAdd(type, this); } public override string ToString() => Name; @@ -59,8 +57,22 @@ public bool Match(JNode node, out string error) { error = string.Empty; if(!Type.IsInstanceOfType(node)) return false; - if(this == DATE) return _Iso8601Date.IsValidDate((JString) node, out error); - if(this == TIME) return _Iso8601Time.IsValidTime((JString) node, out error); + + if(this == DATE) + { + var _node = (JString) node; + var dateTime = node.Runtime.Pragmas.DateTypeParser + .TryParse(_node, out error); + if(ReferenceEquals(dateTime, null)) return false; + node.Derived = new JDate(_node, dateTime); + } + else if(this == TIME) { + var _node = (JString) node; + var dateTime = node.Runtime.Pragmas.TimeTypeParser + .TryParse((JString) node, out error); + if(ReferenceEquals(dateTime, null)) return false; + node.Derived = new JTime(_node, dateTime); + } return true; } } \ No newline at end of file From 8a8f3f23d3b339acd83bd99d3f20b4ed85efea12 Mon Sep 17 00:00:00 2001 From: Zahid Hossain <60911932+zhossain-info@users.noreply.github.com> Date: Tue, 14 Nov 2023 10:00:12 +0600 Subject: [PATCH 2/4] Add new validation functions for date and time --- JsonSchema/JsonSchema.csproj | 8 +- .../JsonSchema/Functions/CoreFunctions1.cs | 18 +- .../JsonSchema/Functions/CoreFunctions3.cs | 35 ---- .../JsonSchema/Functions/CoreFunctions4.cs | 155 ++++++++++++++++++ .../JsonSchema/Functions/DateTimeFunction.cs | 53 ++++++ .../JsonSchema/Functions/FunctionBase.cs | 2 +- .../JsonSchema/Message/ErrorCode.cs | 16 ++ .../JsonSchema/Message/ErrorDetail.cs | 4 +- .../JsonSchema/Time/DateTimeContext.cs | 81 +++++---- .../JsonSchema/Time/DateTimeType.cs | 19 ++- .../JsonSchema/Time/JsonDateTime.cs | 111 +++++++++++++ .../JsonSchema/Tree/RuntimeContext.cs | 46 ++---- .../RelogicLabs/JsonSchema/Types/JDate.cs | 9 + .../RelogicLabs/JsonSchema/Types/JDateTime.cs | 19 +++ .../RelogicLabs/JsonSchema/Types/JTime.cs | 9 + 15 files changed, 458 insertions(+), 127 deletions(-) create mode 100644 JsonSchema/RelogicLabs/JsonSchema/Functions/CoreFunctions4.cs create mode 100644 JsonSchema/RelogicLabs/JsonSchema/Functions/DateTimeFunction.cs create mode 100644 JsonSchema/RelogicLabs/JsonSchema/Time/JsonDateTime.cs create mode 100644 JsonSchema/RelogicLabs/JsonSchema/Types/JDate.cs create mode 100644 JsonSchema/RelogicLabs/JsonSchema/Types/JDateTime.cs create mode 100644 JsonSchema/RelogicLabs/JsonSchema/Types/JTime.cs diff --git a/JsonSchema/JsonSchema.csproj b/JsonSchema/JsonSchema.csproj index d7f58ea..cb0090d 100644 --- a/JsonSchema/JsonSchema.csproj +++ b/JsonSchema/JsonSchema.csproj @@ -8,9 +8,9 @@ RelogicLabs.JsonSchema Relogic Labs Relogic Labs - 1.7.0 - 1.7.0 - 1.7.0 + 1.8.0 + 1.8.0 + 1.8.0 JsonSchema;Schema;Json;Validation;Assert;Test Copyright © Relogic Labs. All rights reserved. en @@ -43,4 +43,4 @@ - + \ No newline at end of file diff --git a/JsonSchema/RelogicLabs/JsonSchema/Functions/CoreFunctions1.cs b/JsonSchema/RelogicLabs/JsonSchema/Functions/CoreFunctions1.cs index a437623..3f670be 100644 --- a/JsonSchema/RelogicLabs/JsonSchema/Functions/CoreFunctions1.cs +++ b/JsonSchema/RelogicLabs/JsonSchema/Functions/CoreFunctions1.cs @@ -14,9 +14,9 @@ public bool Length(JString target, JInteger length) { var _length = target.Value.Length; if(_length != length) return FailWith(new JsonSchemaException( - new ErrorDetail(SLEN01, "Invalid string length"), - new ExpectedDetail(Function, $"length {length}"), - new ActualDetail(target, $"found {_length} for {target}"))); + new ErrorDetail(SLEN01, $"Invalid length of string {target}"), + new ExpectedDetail(Function, $"a string of length {length}"), + new ActualDetail(target, $"found {_length} which does not match"))); return true; } @@ -24,9 +24,9 @@ public bool Length(JArray target, JInteger length) { var _length = target.Elements.Count; if(_length != length) return FailWith(new JsonSchemaException( - new ErrorDetail(ALEN01, "Invalid array length"), - new ExpectedDetail(Function, $"length {length}"), - new ActualDetail(target, $"found {_length} for {target.GetOutline()}"))); + new ErrorDetail(ALEN01, $"Invalid length of array {target.GetOutline()}"), + new ExpectedDetail(Function, $"an array of length {length}"), + new ActualDetail(target, $"found {_length} which does not match"))); return true; } @@ -34,9 +34,9 @@ public bool Length(JObject target, JInteger length) { var _length = target.Properties.Count; if(_length != length) return FailWith(new JsonSchemaException( - new ErrorDetail(OLEN01, "Invalid object size or length"), - new ExpectedDetail(Function, $"length {length}"), - new ActualDetail(target, $"found {_length} for {target.GetOutline()}"))); + new ErrorDetail(OLEN01, $"Invalid size or length of object {target.GetOutline()}"), + new ExpectedDetail(Function, $"an object of length {length}"), + new ActualDetail(target, $"found {_length} which does not match"))); return true; } diff --git a/JsonSchema/RelogicLabs/JsonSchema/Functions/CoreFunctions3.cs b/JsonSchema/RelogicLabs/JsonSchema/Functions/CoreFunctions3.cs index e7eee82..8523541 100644 --- a/JsonSchema/RelogicLabs/JsonSchema/Functions/CoreFunctions3.cs +++ b/JsonSchema/RelogicLabs/JsonSchema/Functions/CoreFunctions3.cs @@ -1,5 +1,4 @@ using System.Text.RegularExpressions; -using RelogicLabs.JsonSchema.Time; using RelogicLabs.JsonSchema.Exceptions; using RelogicLabs.JsonSchema.Message; using RelogicLabs.JsonSchema.Types; @@ -122,38 +121,4 @@ public bool Phone(JString target) new ActualDetail(target, $"found {target} that is invalid"))); return true; } - - public bool Date(JString target, JString pattern) - => DateTime(target, pattern, DateTimeType.DATE_TYPE); - - public bool Time(JString target, JString pattern) - => DateTime(target, pattern, DateTimeType.TIME_TYPE); - - private bool DateTime(JString target, JString pattern, DateTimeType type) - { - try - { - var validator = new DateTimeValidator(pattern); - if(type == DateTimeType.DATE_TYPE) validator.ValidateDate(target); - else if(type == DateTimeType.TIME_TYPE) validator.ValidateTime(target); - else throw new ArgumentException($"Invalid {nameof(DateTimeType)} value"); - return true; - } - catch(DateTimeLexerException ex) - { - return FailWith(new JsonSchemaException( - new ErrorDetail(ex.Code, ex.Message), - new ExpectedDetail(Function, $"a valid {type} pattern"), - new ActualDetail(target, $"found {pattern} that is invalid"), - ex)); - } - catch(InvalidDateTimeException ex) - { - return FailWith(new JsonSchemaException( - new ErrorDetail(ex.Code, ex.Message), - new ExpectedDetail(Function, $"a valid {type} formatted as {pattern}"), - new ActualDetail(target, $"found {target} that is invalid or malformatted"), - ex)); - } - } } \ No newline at end of file diff --git a/JsonSchema/RelogicLabs/JsonSchema/Functions/CoreFunctions4.cs b/JsonSchema/RelogicLabs/JsonSchema/Functions/CoreFunctions4.cs new file mode 100644 index 0000000..ca14328 --- /dev/null +++ b/JsonSchema/RelogicLabs/JsonSchema/Functions/CoreFunctions4.cs @@ -0,0 +1,155 @@ +using RelogicLabs.JsonSchema.Exceptions; +using RelogicLabs.JsonSchema.Message; +using RelogicLabs.JsonSchema.Time; +using RelogicLabs.JsonSchema.Types; +using static RelogicLabs.JsonSchema.Message.ErrorCode; +using static RelogicLabs.JsonSchema.Time.DateTimeType; + +namespace RelogicLabs.JsonSchema.Functions; + +public sealed partial class CoreFunctions +{ + public bool Date(JString target, JString pattern) + => DateTime(target, pattern, DATE_TYPE); + + public bool Time(JString target, JString pattern) + => DateTime(target, pattern, TIME_TYPE); + + private bool DateTime(JString target, JString pattern, DateTimeType type) + => !ReferenceEquals(new DateTimeFunction(pattern, type).Parse(Function, target), null); + + public bool Before(JDateTime target, JString reference) + { + var dateTime = GetDateTime(target.GetParser(), reference); + if(ReferenceEquals(dateTime, null)) return false; + if(target.DateTime.Compare(dateTime.DateTime) < 0) return true; + var type = target.DateTime.Type; + var code = type == DATE_TYPE ? BFOR01 : BFOR02; + return FailWith(new JsonSchemaException( + new ErrorDetail(code, $"{type} is not earlier than specified"), + new ExpectedDetail(reference, $"a {type} before {reference}"), + new ActualDetail(target, $"found {target} which is not inside limit") + )); + } + + public bool After(JDateTime target, JString reference) + { + var dateTime = GetDateTime(target.GetParser(), reference); + if(ReferenceEquals(dateTime, null)) return false; + if(target.DateTime.Compare(dateTime.DateTime) > 0) return true; + var type = target.DateTime.Type; + var code = type == DATE_TYPE ? AFTR01 : AFTR02; + return FailWith(new JsonSchemaException( + new ErrorDetail(code, $"{type} is not later than specified"), + new ExpectedDetail(reference, $"a {type} after {reference}"), + new ActualDetail(target, $"found {target} which is not inside limit") + )); + } + + public bool Range(JDateTime target, JString start, JString end) + { + var _start = GetDateTime(target.GetParser(), start); + if(ReferenceEquals(_start, null)) return false; + var _end = GetDateTime(target.GetParser(), end); + if(ReferenceEquals(_end, null)) return false; + if(target.DateTime.Compare(_start.DateTime) < 0) + { + var type = target.DateTime.Type; + var code = type == DATE_TYPE ? DRNG01 : DRNG02; + return FailWith(new JsonSchemaException( + new ErrorDetail(code, $"{type} is earlier than start {type}"), + new ExpectedDetail(_start, $"a {type} from or after {_start}"), + new ActualDetail(target, $"found {target} which is before start {type}") + )); + } + if(target.DateTime.Compare(_end.DateTime) > 0) + { + var type = target.DateTime.Type; + var code = type == DATE_TYPE ? DRNG03 : DRNG04; + return FailWith(new JsonSchemaException( + new ErrorDetail(code, $"{type} is later than end {type}"), + new ExpectedDetail(_end, $"a {type} until or before {_end}"), + new ActualDetail(target, $"found {target} which is after end {type}") + )); + } + return true; + } + + public bool Range(JDateTime target, JUndefined start, JString end) + { + var _end = GetDateTime(target.GetParser(), end); + if(ReferenceEquals(_end, null)) return false; + if(target.DateTime.Compare(_end.DateTime) > 0) + { + var type = target.DateTime.Type; + var code = type == DATE_TYPE ? DRNG05 : DRNG06; + return FailWith(new JsonSchemaException( + new ErrorDetail(code, $"{type} is later than end {type}"), + new ExpectedDetail(_end, $"a {type} until or before {_end}"), + new ActualDetail(target, $"found {target} which is after end {type}") + )); + } + return true; + } + + public bool Range(JDateTime target, JString start, JUndefined end) + { + var _start = GetDateTime(target.GetParser(), start); + if(ReferenceEquals(_start, null)) return false; + if(target.DateTime.Compare(_start.DateTime) < 0) + { + var type = target.DateTime.Type; + var code = type == DATE_TYPE ? DRNG07 : DRNG08; + return FailWith(new JsonSchemaException( + new ErrorDetail(code, $"{type} is earlier than start {type}"), + new ExpectedDetail(_start, $"a {type} from or after {_start}"), + new ActualDetail(target, $"found {target} which is before start {type}") + )); + } + return true; + } + + public bool Start(JDateTime target, JString reference) + { + var dateTime = GetDateTime(target.GetParser(), reference); + if(ReferenceEquals(dateTime, null)) return false; + if(target.DateTime.Compare(dateTime.DateTime) < 0) + { + var type = target.DateTime.Type; + var code = type == DATE_TYPE ? STRT01 : STRT02; + return FailWith(new JsonSchemaException( + new ErrorDetail(code, $"{type} is earlier than specified"), + new ExpectedDetail(dateTime, $"a {type} from or after {dateTime}"), + new ActualDetail(target, $"found {target} which is before limit") + )); + } + return true; + } + + public bool End(JDateTime target, JString reference) + { + var dateTime = GetDateTime(target.GetParser(), reference); + if(ReferenceEquals(dateTime, null)) return false; + if(target.DateTime.Compare(dateTime.DateTime) > 0) + { + var type = target.DateTime.Type; + var code = type == DATE_TYPE ? ENDE01 : ENDE02; + return FailWith(new JsonSchemaException( + new ErrorDetail(code, $"{type} is later than specified"), + new ExpectedDetail(dateTime, $"a {type} until or before {dateTime}"), + new ActualDetail(target, $"found {target} which is after limit") + )); + } + return true; + } + + private JDateTime? GetDateTime(DateTimeParser parser, JString dateTime) + { + if(dateTime.Derived is JDateTime _result + && _result.DateTime.Type == parser.Type) return _result; + var _dateTime = new DateTimeFunction(parser).Parse(Function, dateTime); + if(ReferenceEquals(_dateTime, null)) return null; + dateTime.Derived = _dateTime.Create(dateTime); + return (JDateTime) dateTime.Derived; + } +} \ No newline at end of file diff --git a/JsonSchema/RelogicLabs/JsonSchema/Functions/DateTimeFunction.cs b/JsonSchema/RelogicLabs/JsonSchema/Functions/DateTimeFunction.cs new file mode 100644 index 0000000..392fc0d --- /dev/null +++ b/JsonSchema/RelogicLabs/JsonSchema/Functions/DateTimeFunction.cs @@ -0,0 +1,53 @@ +using RelogicLabs.JsonSchema.Exceptions; +using RelogicLabs.JsonSchema.Message; +using RelogicLabs.JsonSchema.Time; +using RelogicLabs.JsonSchema.Types; + +namespace RelogicLabs.JsonSchema.Functions; + +internal class DateTimeFunction +{ + private DateTimeParser? _parser; + + public string Pattern { get; } + public DateTimeType Type { get; } + + public DateTimeFunction(string pattern, DateTimeType type) + { + Pattern = pattern; + Type = type; + } + + public DateTimeFunction(DateTimeParser parser) + { + Pattern = parser.Pattern; + Type = parser.Type; + _parser = parser; + } + + public JsonDateTime? Parse(JFunction function, JString dateTime) + { + try + { + _parser ??= new DateTimeParser(Pattern, Type); + return _parser.Parse(dateTime); + } + catch(DateTimeLexerException ex) + { + function.FailWith(new JsonSchemaException( + new ErrorDetail(ex.Code, ex.Message), + new ExpectedDetail(function, $"a valid {Type} pattern"), + new ActualDetail(dateTime, $"found {Pattern} that is invalid"), + ex)); + } + catch(InvalidDateTimeException ex) + { + function.FailWith(new JsonSchemaException( + new ErrorDetail(ex.Code, ex.Message), + new ExpectedDetail(function, $"a valid {Type} formatted as {Pattern}"), + new ActualDetail(dateTime, $"found {dateTime} that is invalid or malformatted"), + ex)); + } + return null; + } +} \ No newline at end of file diff --git a/JsonSchema/RelogicLabs/JsonSchema/Functions/FunctionBase.cs b/JsonSchema/RelogicLabs/JsonSchema/Functions/FunctionBase.cs index 3478e25..7c9b664 100644 --- a/JsonSchema/RelogicLabs/JsonSchema/Functions/FunctionBase.cs +++ b/JsonSchema/RelogicLabs/JsonSchema/Functions/FunctionBase.cs @@ -11,6 +11,6 @@ public abstract class FunctionBase protected FunctionBase(RuntimeContext runtime) => Runtime = runtime; - protected bool FailWith(JsonSchemaException exception) + public bool FailWith(JsonSchemaException exception) => Runtime.FailWith(exception); } \ No newline at end of file diff --git a/JsonSchema/RelogicLabs/JsonSchema/Message/ErrorCode.cs b/JsonSchema/RelogicLabs/JsonSchema/Message/ErrorCode.cs index d77c139..50e14f2 100644 --- a/JsonSchema/RelogicLabs/JsonSchema/Message/ErrorCode.cs +++ b/JsonSchema/RelogicLabs/JsonSchema/Message/ErrorCode.cs @@ -2,12 +2,16 @@ namespace RelogicLabs.JsonSchema.Message; internal static class ErrorCode { + public const string AFTR01 = "AFTR01"; + public const string AFTR02 = "AFTR02"; public const string ALEN01 = "ALEN01"; public const string ALEN02 = "ALEN02"; public const string ALEN03 = "ALEN03"; public const string ALEN04 = "ALEN04"; public const string ALEN05 = "ALEN05"; public const string ARRY01 = "ARRY01"; + public const string BFOR01 = "BFOR01"; + public const string BFOR02 = "BFOR02"; public const string BOOL01 = "BOOL01"; public const string CLAS01 = "CLAS01"; public const string CLAS02 = "CLAS02"; @@ -58,6 +62,14 @@ internal static class ErrorCode public const string DMON03 = "DMON03"; public const string DMON04 = "DMON04"; public const string DMON05 = "DMON05"; + public const string DRNG01 = "DRNG01"; + public const string DRNG02 = "DRNG02"; + public const string DRNG03 = "DRNG03"; + public const string DRNG04 = "DRNG04"; + public const string DRNG05 = "DRNG05"; + public const string DRNG06 = "DRNG06"; + public const string DRNG07 = "DRNG07"; + public const string DRNG08 = "DRNG08"; public const string DSEC01 = "DSEC01"; public const string DSEC02 = "DSEC02"; public const string DSEC03 = "DSEC03"; @@ -87,6 +99,8 @@ internal static class ErrorCode public const string DYAR03 = "DYAR03"; public const string ELEM01 = "ELEM01"; public const string EMAL01 = "EMAL01"; + public const string ENDE01 = "ENDE01"; + public const string ENDE02 = "ENDE02"; public const string ENUM01 = "ENUM01"; public const string ENUM02 = "ENUM02"; public const string FLOT01 = "FLOT01"; @@ -140,6 +154,8 @@ internal static class ErrorCode public const string SLEX01 = "SLEX01"; public const string SPRS01 = "SPRS01"; public const string STRN01 = "STRN01"; + public const string STRT01 = "STRT01"; + public const string STRT02 = "STRT02"; public const string URLA01 = "URLA01"; public const string URLA02 = "URLA02"; public const string URLA03 = "URLA03"; diff --git a/JsonSchema/RelogicLabs/JsonSchema/Message/ErrorDetail.cs b/JsonSchema/RelogicLabs/JsonSchema/Message/ErrorDetail.cs index f0d29b1..2725845 100644 --- a/JsonSchema/RelogicLabs/JsonSchema/Message/ErrorDetail.cs +++ b/JsonSchema/RelogicLabs/JsonSchema/Message/ErrorDetail.cs @@ -1,3 +1,5 @@ +using RelogicLabs.JsonSchema.Utilities; + namespace RelogicLabs.JsonSchema.Message; public sealed class ErrorDetail @@ -21,6 +23,6 @@ public sealed class ErrorDetail public ErrorDetail(string code, string message) { Code = code; - Message = message; + Message = message.Capitalize(); } } \ No newline at end of file diff --git a/JsonSchema/RelogicLabs/JsonSchema/Time/DateTimeContext.cs b/JsonSchema/RelogicLabs/JsonSchema/Time/DateTimeContext.cs index 1d928c1..d5597de 100644 --- a/JsonSchema/RelogicLabs/JsonSchema/Time/DateTimeContext.cs +++ b/JsonSchema/RelogicLabs/JsonSchema/Time/DateTimeContext.cs @@ -2,6 +2,7 @@ using RelogicLabs.JsonSchema.Exceptions; using static RelogicLabs.JsonSchema.Message.ErrorCode; using static System.DayOfWeek; +using static RelogicLabs.JsonSchema.Time.JsonDateTime; namespace RelogicLabs.JsonSchema.Time; @@ -48,20 +49,18 @@ private static void AddWeekday(string key1, string key2, int value) _Weekdays[key2] = value; } - private const int _UNSET = -100; - - private int _era = _UNSET; - private int _year = _UNSET; - private int _month = _UNSET; - private int _weekday = _UNSET; - private int _day = _UNSET; - private int _amPm = _UNSET; - private int _hour = _UNSET; - private int _minute = _UNSET; - private int _second = _UNSET; - private int _fraction = _UNSET; - private int _utcOffsetHour = _UNSET; - private int _utcOffsetMinute = _UNSET; + private int _era = UNSET; + private int _year = UNSET; + private int _month = UNSET; + private int _weekday = UNSET; + private int _day = UNSET; + private int _amPm = UNSET; + private int _hour = UNSET; + private int _minute = UNSET; + private int _second = UNSET; + private int _fraction = UNSET; + private int _utcHour = UNSET; + private int _utcMinute = UNSET; public DateTimeType Type { get; } @@ -122,7 +121,7 @@ public void SetAmPm(string amPm) _ => throw new InvalidDateTimeException(DTAP02, $"Invalid {Type} hour AM/PM input") }; - if(_hour != _UNSET && _hour is < 1 or > 12) + if(_hour != UNSET && _hour is < 1 or > 12) throw new InvalidDateTimeException(DHUR03, $"Invalid {Type} hour AM/PM out of range"); SetField(ref _amPm, amPmNum); @@ -130,7 +129,7 @@ public void SetAmPm(string amPm) public void SetHour(int hour) { - if(_amPm != _UNSET && _hour is < 1 or > 12) + if(_amPm != UNSET && _hour is < 1 or > 12) throw new InvalidDateTimeException(DHUR04, $"Invalid {Type} hour AM/PM out of range"); if(hour is < 0 or > 23) @@ -161,39 +160,41 @@ public void SetUtcOffset(int hour, int minute) $"Invalid {Type} UTC offset hour out of range"); if(minute is < 0 or > 59) throw new InvalidDateTimeException(DUTC05, $"Invalid {Type} UTC offset minute out of range"); - SetField(ref _utcOffsetHour, hour); - SetField(ref _utcOffsetMinute, minute); + SetField(ref _utcHour, hour); + SetField(ref _utcMinute, minute); } private void SetField(ref int field, int value) { - if(field != _UNSET && field != value) + if(field != UNSET && field != value) throw new InvalidDateTimeException(DCNF01, $"Conflicting {Type} segments input"); field = value; } private static bool IsAllSet(params int[] values) - => values.All(value => value != _UNSET); + => values.All(value => value != UNSET); - public void Validate() + public JsonDateTime Validate() { try { - DateTime dateTime; if(IsAllSet(_year, _month, _day)) { _DaysInMonth[2] = IsLeapYear(_year)? 29 : 28; if(_day < 1 || _day > _DaysInMonth[_month]) throw new InvalidDateTimeException(DDAY03, $"Invalid {Type} day out of range"); - dateTime = new DateTime(_year, _month, _day); - if(_weekday != _UNSET && (int) dateTime.DayOfWeek != _weekday) + JsonDateTime dateTime = new(Type, _year, _month, _day); + if(_weekday != UNSET && (int?) dateTime.GetDayOfWeek() != _weekday) throw new InvalidDateTimeException(DWKD03, $"Invalid {Type} weekday input"); } + if(IsAllSet(_hour, _amPm)) ConvertTo24Hour(); + if(_hour != UNSET && _hour is < 0 or > 23) + throw new InvalidDateTimeException(DHUR05, $"Invalid {Type} hour out of range"); - if(IsAllSet(_year, _month)) dateTime = new DateTime(_year, _month, 1); - if(IsAllSet(_year)) dateTime = new DateTime(_year, 1, 1); + return new JsonDateTime(Type, _year, _month, _day, _hour, _minute, _second, + _fraction, _utcHour, _utcMinute); } catch(InvalidDateTimeException) { throw; } catch(Exception ex) @@ -201,10 +202,6 @@ public void Validate() throw new InvalidDateTimeException(DINV01, $"Invalid {Type} year, month or day out of range", ex); } - - if(IsAllSet(_hour, _amPm)) ConvertTo24Hour(); - if(_hour != _UNSET && _hour is < 0 or > 23) - throw new InvalidDateTimeException(DHUR05, $"Invalid {Type} hour out of range"); } private void ConvertTo24Hour() @@ -216,18 +213,18 @@ private void ConvertTo24Hour() public override string ToString() { StringBuilder builder = new("{"); - if(_era != _UNSET) builder.Append($"Era: {_era}, "); - if(_year != _UNSET) builder.Append($"Year: {_year}, "); - if(_month != _UNSET) builder.Append($"Month: {_month}, "); - if(_weekday != _UNSET) builder.Append($"Weekday: {_weekday}, "); - if(_day != _UNSET) builder.Append($"Day: {_day}, "); - if(_amPm != _UNSET) builder.Append($"AM/PM: {_amPm}, "); - if(_hour != _UNSET) builder.Append($"Hour: {_hour}, "); - if(_minute != _UNSET) builder.Append($"Minute: {_minute}, "); - if(_second != _UNSET) builder.Append($"Second: {_second}, "); - if(_fraction != _UNSET) builder.Append($"Fraction: {_fraction}, "); - if(_utcOffsetHour != _UNSET) builder.Append($"UTC Offset Hour: {_utcOffsetHour}, "); - if(_utcOffsetMinute != _UNSET) builder.Append($"UTC Offset Minute: {_utcOffsetMinute}, "); + if(_era != UNSET) builder.Append($"Era: {_era}, "); + if(_year != UNSET) builder.Append($"Year: {_year}, "); + if(_month != UNSET) builder.Append($"Month: {_month}, "); + if(_weekday != UNSET) builder.Append($"Weekday: {_weekday}, "); + if(_day != UNSET) builder.Append($"Day: {_day}, "); + if(_amPm != UNSET) builder.Append($"AM/PM: {_amPm}, "); + if(_hour != UNSET) builder.Append($"Hour: {_hour}, "); + if(_minute != UNSET) builder.Append($"Minute: {_minute}, "); + if(_second != UNSET) builder.Append($"Second: {_second}, "); + if(_fraction != UNSET) builder.Append($"Fraction: {_fraction}, "); + if(_utcHour != UNSET) builder.Append($"UTC Offset Hour: {_utcHour}, "); + if(_utcMinute != UNSET) builder.Append($"UTC Offset Minute: {_utcMinute}, "); var result = builder.ToString(); if(result.EndsWith(", ")) result = result[..^2]; return result + "}"; diff --git a/JsonSchema/RelogicLabs/JsonSchema/Time/DateTimeType.cs b/JsonSchema/RelogicLabs/JsonSchema/Time/DateTimeType.cs index 8acbecf..9e3a3cc 100644 --- a/JsonSchema/RelogicLabs/JsonSchema/Time/DateTimeType.cs +++ b/JsonSchema/RelogicLabs/JsonSchema/Time/DateTimeType.cs @@ -1,12 +1,21 @@ +using RelogicLabs.JsonSchema.Types; +using static RelogicLabs.JsonSchema.Types.JsonType; + namespace RelogicLabs.JsonSchema.Time; -internal sealed class DateTimeType +public sealed class DateTimeType { - public static readonly DateTimeType DATE_TYPE = new("date"); - public static readonly DateTimeType TIME_TYPE = new("time"); + public static readonly DateTimeType DATE_TYPE = new("date", DATE); + public static readonly DateTimeType TIME_TYPE = new("time", TIME); + + public string Name { get; } + public JsonType Type { get; } - private string Name { get; } + private DateTimeType(string name, JsonType type) + { + Name = name; + Type = type; + } - private DateTimeType(string name) => Name = name; public override string ToString() => Name; } \ No newline at end of file diff --git a/JsonSchema/RelogicLabs/JsonSchema/Time/JsonDateTime.cs b/JsonSchema/RelogicLabs/JsonSchema/Time/JsonDateTime.cs new file mode 100644 index 0000000..82ffff8 --- /dev/null +++ b/JsonSchema/RelogicLabs/JsonSchema/Time/JsonDateTime.cs @@ -0,0 +1,111 @@ +using System.Text; +using RelogicLabs.JsonSchema.Types; +using static RelogicLabs.JsonSchema.Time.DateTimeType; + +namespace RelogicLabs.JsonSchema.Time; + +public class JsonDateTime +{ + private const int DEFAULT_YEAR = 2000; + private const int DEFAULT_MONTH = 1; + private const int DEFAULT_DAY = 1; + private const int DEFAULT_HOUR = 0; + private const int DEFAULT_MINUTE = 0; + private const int DEFAULT_SECOND = 0; + private const int DEFAULT_FRACTION = 0; + private const int DEFAULT_UTC_HOUR = 0; + private const int DEFAULT_UTC_MINUTE = 0; + + public const int UNSET = -1000; + + public DateTimeType Type { get; } + public int Year { get; } + public int Month { get; } + public int Day { get; } + public int Hour { get; } + public int Minute { get; } + public int Second { get; } + public int Fraction { get; } + public int UtcHour { get; } + public int UtcMinute { get; } + + private DateTimeOffset _dateTimeOffset; + private TimeSpan _utcOffset; + + public JsonDateTime(DateTimeType type, int year = DEFAULT_YEAR, int month = DEFAULT_MONTH, + int day = DEFAULT_DAY, int hour = DEFAULT_HOUR, int minute = DEFAULT_MINUTE, int second = DEFAULT_SECOND, + int fraction = DEFAULT_FRACTION, int utcHour = DEFAULT_UTC_HOUR, int utcMinute = DEFAULT_UTC_MINUTE) + { + Type = type; + Year = year; + Month = month; + Day = day; + Hour = hour; + Minute = minute; + Second = second; + Fraction = fraction; + UtcHour = utcHour; + UtcMinute = utcMinute; + + _utcOffset = new TimeSpan( + DefaultIfUnset(utcHour, DEFAULT_UTC_HOUR), + DefaultIfUnset(utcMinute, DEFAULT_UTC_MINUTE), 0); + + _dateTimeOffset = new DateTimeOffset( + DefaultIfUnset(year, DEFAULT_YEAR), + DefaultIfUnset(month, DEFAULT_MONTH), + DefaultIfUnset(day, DEFAULT_DAY), + DefaultIfUnset(hour, DEFAULT_HOUR), + DefaultIfUnset(minute, DEFAULT_MINUTE), + DefaultIfUnset(second, DEFAULT_SECOND), + _utcOffset); + } + + private static int DefaultIfUnset(int value, int defaultValue) + => value == UNSET ? defaultValue : value; + + + private static bool IsAllSet(params int[] values) + => values.All(value => value != UNSET); + + public DayOfWeek? GetDayOfWeek() + { + if(IsAllSet(Year, Month, Day)) return _dateTimeOffset.DayOfWeek; + return null; + } + + public int Compare(JsonDateTime other) + { + int result = DateTimeOffset.Compare(_dateTimeOffset, other._dateTimeOffset); + if(result == 0) + { + if(Fraction < other.Fraction) return -1; + if(Fraction > other.Fraction) return +1; + } + return result; + } + + public override string ToString() + { + StringBuilder builder = new("{"); + if(Year != UNSET) builder.Append($"Year: {Year}, "); + if(Month != UNSET) builder.Append($"Month: {Month}, "); + if(Day != UNSET) builder.Append($"Day: {Day}, "); + if(Hour != UNSET) builder.Append($"Hour: {Hour}, "); + if(Minute != UNSET) builder.Append($"Minute: {Minute}, "); + if(Second != UNSET) builder.Append($"Second: {Second}, "); + if(Fraction != UNSET) builder.Append($"Fraction: {Fraction}, "); + if(UtcHour != UNSET) builder.Append($"UTC Offset Hour: {UtcHour}, "); + if(UtcMinute != UNSET) builder.Append($"UTC Offset Minute: {UtcMinute}, "); + var result = builder.ToString(); + if(result.EndsWith(", ")) result = result[..^2]; + return result + "}"; + } + + internal JDateTime Create(JString dateTime) + { + if(Type == DATE_TYPE) return new JDate(dateTime, this); + if(Type == TIME_TYPE) return new JTime(dateTime, this); + throw new InvalidOperationException("Invalid date time type"); + } +} \ No newline at end of file diff --git a/JsonSchema/RelogicLabs/JsonSchema/Tree/RuntimeContext.cs b/JsonSchema/RelogicLabs/JsonSchema/Tree/RuntimeContext.cs index 341a881..7a84514 100644 --- a/JsonSchema/RelogicLabs/JsonSchema/Tree/RuntimeContext.cs +++ b/JsonSchema/RelogicLabs/JsonSchema/Tree/RuntimeContext.cs @@ -1,51 +1,34 @@ using RelogicLabs.JsonSchema.Exceptions; using RelogicLabs.JsonSchema.Message; using RelogicLabs.JsonSchema.Types; +using RelogicLabs.JsonSchema.Utilities; using static RelogicLabs.JsonSchema.Message.ErrorCode; namespace RelogicLabs.JsonSchema.Tree; public sealed class RuntimeContext { - private readonly FunctionManager _functionManager; - private readonly PragmaManager _pragmaManager; - private int _disableCount; + private int _disableException; + private readonly Dictionary _memoryMap; internal MessageFormatter MessageFormatter { get; set; } public bool ThrowException { get; set; } public Dictionary Definitions { get; } + public PragmaRegistry Pragmas { get; } + public FunctionRegistry Functions { get; } public Queue Exceptions { get; } - public bool IgnoreUndefinedProperties => _pragmaManager.IgnoreUndefinedProperties; - public double FloatingPointTolerance => _pragmaManager.FloatingPointTolerance; - public bool IgnoreObjectPropertyOrder => _pragmaManager.IgnoreObjectPropertyOrder; - - internal RuntimeContext(MessageFormatter messageFormatter, bool throwException) { - _functionManager = new FunctionManager(this); - _pragmaManager = new PragmaManager(); + _memoryMap = new Dictionary(); + Functions = new FunctionRegistry(this); + Pragmas = new PragmaRegistry(); MessageFormatter = messageFormatter; ThrowException = throwException; Definitions = new Dictionary(); Exceptions = new Queue(); } - public JPragma AddPragma(JPragma pragma) => _pragmaManager.AddPragma(pragma); - public T GetPragmaValue(string name) => _pragmaManager.GetPragmaValue(name); - - public JInclude AddClass(JInclude include) - { - AddClass(include.ClassName, include.Context); - return include; - } - - public void AddClass(string className, Context? context = null) - => _functionManager.AddClass(className, context); - - public bool InvokeFunction(JFunction function, JNode target) - => _functionManager.InvokeFunction(function, target); - public JDefinition AddDefinition(JDefinition definition) { if(Definitions.TryGetValue(definition.Alias, out var previous)) @@ -58,25 +41,28 @@ public JDefinition AddDefinition(JDefinition definition) } internal bool AreEqual(double value1, double value2) - => Math.Abs(value1 - value2) < FloatingPointTolerance; + => Math.Abs(value1 - value2) < Pragmas.FloatingPointTolerance; internal T TryMatch(Func function) { try { - _disableCount += 1; + _disableException += 1; return function(); } finally { - _disableCount -= 1; + _disableException -= 1; } } internal bool FailWith(Exception exception) { - if(ThrowException && _disableCount == 0) throw exception; - if(_disableCount == 0) Exceptions.Enqueue(exception); + if(ThrowException && _disableException == 0) throw exception; + if(_disableException == 0) Exceptions.Enqueue(exception); return false; } + + public void Store(string name, object value) => _memoryMap[name] = value; + public object? Retrieve(string name) => _memoryMap.GetValue(name); } \ No newline at end of file diff --git a/JsonSchema/RelogicLabs/JsonSchema/Types/JDate.cs b/JsonSchema/RelogicLabs/JsonSchema/Types/JDate.cs new file mode 100644 index 0000000..781e48e --- /dev/null +++ b/JsonSchema/RelogicLabs/JsonSchema/Types/JDate.cs @@ -0,0 +1,9 @@ +using RelogicLabs.JsonSchema.Time; + +namespace RelogicLabs.JsonSchema.Types; + +public class JDate : JDateTime +{ + internal JDate(JString baseNode, JsonDateTime dateTime) : base(baseNode, dateTime) { } + public override JsonType Type => JsonType.DATE; +} \ No newline at end of file diff --git a/JsonSchema/RelogicLabs/JsonSchema/Types/JDateTime.cs b/JsonSchema/RelogicLabs/JsonSchema/Types/JDateTime.cs new file mode 100644 index 0000000..1d2f965 --- /dev/null +++ b/JsonSchema/RelogicLabs/JsonSchema/Types/JDateTime.cs @@ -0,0 +1,19 @@ +using RelogicLabs.JsonSchema.Time; + +namespace RelogicLabs.JsonSchema.Types; + +public class JDateTime : JString +{ + public JsonDateTime DateTime { get; } + + internal JDateTime(JString baseNode, JsonDateTime dateTime) : base(baseNode) + => DateTime = dateTime; + + internal DateTimeParser GetParser() + { + if(Type == JsonType.DATE) return Runtime.Pragmas.DateTypeParser; + if(Type == JsonType.TIME) return Runtime.Pragmas.TimeTypeParser; + throw new InvalidOperationException("Invalid date time type"); + } + public override JsonType Type => JsonType.DATETIME; +} \ No newline at end of file diff --git a/JsonSchema/RelogicLabs/JsonSchema/Types/JTime.cs b/JsonSchema/RelogicLabs/JsonSchema/Types/JTime.cs new file mode 100644 index 0000000..c68d5d1 --- /dev/null +++ b/JsonSchema/RelogicLabs/JsonSchema/Types/JTime.cs @@ -0,0 +1,9 @@ +using RelogicLabs.JsonSchema.Time; + +namespace RelogicLabs.JsonSchema.Types; + +public class JTime : JDateTime +{ + internal JTime(JString baseNode, JsonDateTime dateTime) : base(baseNode, dateTime) { } + public override JsonType Type => JsonType.TIME; +} \ No newline at end of file From 854de6885b5c7d6b869d3683102a6ca1cf3a06d5 Mon Sep 17 00:00:00 2001 From: Zahid Hossain <60911932+zhossain-info@users.noreply.github.com> Date: Tue, 14 Nov 2023 11:14:50 +0600 Subject: [PATCH 3/4] Add new test cases for date and time --- JsonSchema.Tests/JsonSchema.Tests.csproj | 6 +- .../JsonSchema/Tests/Negative/ArrayTests.cs | 105 +++++ .../Tests/Negative/DateTimeTests.cs | 214 +++++++++ .../JsonSchema/Tests/Negative/IntegerTests.cs | 21 +- .../JsonSchema/Tests/Negative/PragmaTests.cs | 410 +++++++++++++++++- .../JsonSchema/Tests/Negative/StringTests.cs | 22 + .../Tests/Positive/DataTypeTests.cs | 20 +- .../Tests/Positive/DateTimeTests.cs | 144 ++++++ .../JsonSchema/Tests/Positive/PragmaTests.cs | 204 ++++++++- .../JsonSchema/Time/JsonDateTime.cs | 6 +- 10 files changed, 1126 insertions(+), 26 deletions(-) diff --git a/JsonSchema.Tests/JsonSchema.Tests.csproj b/JsonSchema.Tests/JsonSchema.Tests.csproj index d8b54be..3a5b0cf 100644 --- a/JsonSchema.Tests/JsonSchema.Tests.csproj +++ b/JsonSchema.Tests/JsonSchema.Tests.csproj @@ -5,8 +5,8 @@ This project contains test cases for JsonSchema project. Relogic Labs Relogic Labs - 1.7.0 - 1.7.0 + 1.8.0 + 1.8.0 Copyright © Relogic Labs. All rights reserved. en net5.0;net6.0;net7.0 @@ -28,4 +28,4 @@ - + \ No newline at end of file diff --git a/JsonSchema.Tests/RelogicLabs/JsonSchema/Tests/Negative/ArrayTests.cs b/JsonSchema.Tests/RelogicLabs/JsonSchema/Tests/Negative/ArrayTests.cs index aa9b52a..7bffb7c 100644 --- a/JsonSchema.Tests/RelogicLabs/JsonSchema/Tests/Negative/ArrayTests.cs +++ b/JsonSchema.Tests/RelogicLabs/JsonSchema/Tests/Negative/ArrayTests.cs @@ -189,4 +189,109 @@ public void When_EmptyArrayInObject_ExceptionThrown() Assert.AreEqual(NEMT02, exception.Code); Console.WriteLine(exception); } + + [TestMethod] + public void When_JsonWrongLengthInObject_ExceptionThrown() + { + var schema = + """ + @length*(2) #array* #object + """; + var json = + """ + { + "key1": [10, 20], + "key2": [10] + } + """; + JsonSchema.IsValid(schema, json); + var exception = Assert.ThrowsException( + () => JsonAssert.IsValid(schema, json)); + Assert.AreEqual(ALEN01, exception.Code); + Console.WriteLine(exception); + } + + [TestMethod] + public void When_JsonWrongMinimumLengthInObject_ExceptionThrown() + { + var schema = + """ + @length*(2, 4) #array* #object + """; + var json = + """ + { + "key1": [10, 20], + "key2": [10] + } + """; + JsonSchema.IsValid(schema, json); + var exception = Assert.ThrowsException( + () => JsonAssert.IsValid(schema, json)); + Assert.AreEqual(ALEN02, exception.Code); + Console.WriteLine(exception); + } + + [TestMethod] + public void When_JsonWrongMaximumLengthInObject_ExceptionThrown() + { + var schema = + """ + @length*(2, 4) #array* #object + """; + var json = + """ + { + "key1": [10, 20], + "key2": [10, 20, 30, 40, 50] + } + """; + JsonSchema.IsValid(schema, json); + var exception = Assert.ThrowsException( + () => JsonAssert.IsValid(schema, json)); + Assert.AreEqual(ALEN03, exception.Code); + Console.WriteLine(exception); + } + + [TestMethod] + public void When_JsonWrongMinimumLengthWithUndefinedInObject_ExceptionThrown() + { + var schema = + """ + @length*(2, !) #array* #object + """; + var json = + """ + { + "key1": [10, 20], + "key2": [10] + } + """; + JsonSchema.IsValid(schema, json); + var exception = Assert.ThrowsException( + () => JsonAssert.IsValid(schema, json)); + Assert.AreEqual(ALEN04, exception.Code); + Console.WriteLine(exception); + } + + [TestMethod] + public void When_JsonWrongMaximumLengthWithUndefinedInObject_ExceptionThrown() + { + var schema = + """ + @length*(!, 4) #array* #object + """; + var json = + """ + { + "key1": [10, 20], + "key2": [10, 20, 30, 40, 50] + } + """; + JsonSchema.IsValid(schema, json); + var exception = Assert.ThrowsException( + () => JsonAssert.IsValid(schema, json)); + Assert.AreEqual(ALEN05, exception.Code); + Console.WriteLine(exception); + } } \ No newline at end of file diff --git a/JsonSchema.Tests/RelogicLabs/JsonSchema/Tests/Negative/DateTimeTests.cs b/JsonSchema.Tests/RelogicLabs/JsonSchema/Tests/Negative/DateTimeTests.cs index 48c5503..f2045e7 100644 --- a/JsonSchema.Tests/RelogicLabs/JsonSchema/Tests/Negative/DateTimeTests.cs +++ b/JsonSchema.Tests/RelogicLabs/JsonSchema/Tests/Negative/DateTimeTests.cs @@ -467,4 +467,218 @@ public void When_InvalidTimePatternCauseLexerError_ExceptionThrown() Assert.AreEqual(DLEX01, exception.Code); Console.WriteLine(exception); } + + [TestMethod] + public void When_JsonDateNotValidWithBothRange_ExceptionThrown() + { + var schema = + """ + @range*("2010-01-01", "2010-12-31") #date* #array + """; + var json = + """ + [ + "2010-01-01", + "2010-02-01", + "2010-06-30", + "2009-12-31", + "2011-01-01" + ] + """; + JsonSchema.IsValid(schema, json); + var exception = Assert.ThrowsException( + () => JsonAssert.IsValid(schema, json)); + Assert.AreEqual(DRNG01, exception.Code); + Console.WriteLine(exception); + } + + [TestMethod] + public void When_JsonTimeNotValidWithBothRange_ExceptionThrown() + { + var schema = + """ + @range*("2010-01-01T00:00:00.000Z", + "2010-12-31T23:59:59.999Z") + #time* #array + """; + var json = + """ + [ + "2010-01-01T00:00:00.000Z", + "2010-02-01T01:30:45.1Z", + "2010-06-30T12:01:07.999999Z", + "2009-12-31T22:39:50.0-04:00", + "2011-01-01T02:10:00.0+06:00", + "2009-12-31T22:59:59.000Z", + "2011-01-01T00:00:00.000Z" + ] + """; + JsonSchema.IsValid(schema, json); + var exception = Assert.ThrowsException( + () => JsonAssert.IsValid(schema, json)); + Assert.AreEqual(DRNG02, exception.Code); + Console.WriteLine(exception); + } + + [TestMethod] + public void When_JsonDateNotValidWithStart_ExceptionThrown() + { + var schema = + """ + @start*("2010-01-01") #date* #array + """; + var json = + """ + [ + "2010-01-01", + "2010-02-01", + "2011-06-30", + "2050-11-01", + "2009-12-31" + ] + """; + JsonSchema.IsValid(schema, json); + var exception = Assert.ThrowsException( + () => JsonAssert.IsValid(schema, json)); + Assert.AreEqual(STRT01, exception.Code); + Console.WriteLine(exception); + } + + [TestMethod] + public void When_JsonDateNotValidWithEnd_ExceptionThrown() + { + var schema = + """ + @end*("2010-12-31") #date* #array + """; + var json = + """ + [ + "1930-01-01", + "2000-02-01", + "2005-06-30", + "2010-12-31", + "2011-01-01" + ] + """; + JsonSchema.IsValid(schema, json); + var exception = Assert.ThrowsException( + () => JsonAssert.IsValid(schema, json)); + Assert.AreEqual(ENDE01, exception.Code); + Console.WriteLine(exception); + } + + [TestMethod] + public void When_JsonDateNotValidWithBefore_ExceptionThrown() + { + var schema = + """ + @before*("2011-01-01") #date* #array + """; + var json = + """ + [ + "2010-01-01", + "2010-06-30", + "2010-12-31", + "2011-01-01", + "2023-11-15" + ] + """; + JsonSchema.IsValid(schema, json); + var exception = Assert.ThrowsException( + () => JsonAssert.IsValid(schema, json)); + Assert.AreEqual(BFOR01, exception.Code); + Console.WriteLine(exception); + } + + [TestMethod] + public void When_JsonDateNotValidWithAfter_ExceptionThrown() + { + var schema = + """ + @after*("2009-12-31") #date* #array + """; + var json = + """ + [ + "2010-01-01", + "2010-02-10", + "2010-12-31", + "2009-12-31", + "1980-11-19" + ] + """; + JsonSchema.IsValid(schema, json); + var exception = Assert.ThrowsException( + () => JsonAssert.IsValid(schema, json)); + Assert.AreEqual(AFTR01, exception.Code); + Console.WriteLine(exception); + } + + [TestMethod] + public void When_JsonTimeNotValidWithEndInFraction_ExceptionThrown() + { + var schema = + """ + @end*("1939-09-02T02:12:12.555Z") #time* #array + """; + var json = + """ + [ + "1939-09-02T02:12:12.554Z", + "1939-09-02T02:12:12.555Z", + "1939-09-02T02:12:12.556Z" + ] + """; + JsonSchema.IsValid(schema, json); + var exception = Assert.ThrowsException( + () => JsonAssert.IsValid(schema, json)); + Assert.AreEqual(ENDE02, exception.Code); + Console.WriteLine(exception); + } + + [TestMethod] + public void When_SchemaDateNotValidWithBefore_ExceptionThrown() + { + var schema = + """ + @before*("01-01-2011") #date* #array + """; + var json = + """ + [ + "1900-01-01", + "2010-06-30", + "2010-12-31" + ] + """; + JsonSchema.IsValid(schema, json); + var exception = Assert.ThrowsException( + () => JsonAssert.IsValid(schema, json)); + Assert.AreEqual(DYAR01, exception.Code); + Console.WriteLine(exception); + } + + [TestMethod] + public void When_SchemaDateNotValidWithAfter_ExceptionThrown() + { + var schema = + """ + @after*("12-31-2009") #date* #array + """; + var json = + """ + [ + "2010-01-01", + "2010-02-10", + "2050-12-31" + ] + """; + JsonSchema.IsValid(schema, json); + var exception = Assert.ThrowsException( + () => JsonAssert.IsValid(schema, json)); + Assert.AreEqual(DYAR01, exception.Code); + Console.WriteLine(exception); + } } \ No newline at end of file diff --git a/JsonSchema.Tests/RelogicLabs/JsonSchema/Tests/Negative/IntegerTests.cs b/JsonSchema.Tests/RelogicLabs/JsonSchema/Tests/Negative/IntegerTests.cs index 655d15b..8be90a4 100644 --- a/JsonSchema.Tests/RelogicLabs/JsonSchema/Tests/Negative/IntegerTests.cs +++ b/JsonSchema.Tests/RelogicLabs/JsonSchema/Tests/Negative/IntegerTests.cs @@ -186,7 +186,7 @@ public void When_NestedRangeWithJsonWrongIntegerInObject_ExceptionThrown() } [TestMethod] - public void When_NestedRangeWithUndefinedAndWrongIntegerInArray_ExceptionThrown() + public void When_NestedRangeWithMinUndefinedAndWrongIntegerInArray_ExceptionThrown() { var schema = """ @@ -204,6 +204,25 @@ public void When_NestedRangeWithUndefinedAndWrongIntegerInArray_ExceptionThrown( Console.WriteLine(exception); } + [TestMethod] + public void When_NestedRangeWithMaxUndefinedAndWrongIntegerInArray_ExceptionThrown() + { + var schema = + """ + @range*(1000, !) #integer* + """; + var json = + """ + [2000, 1000, 900] + """; + + JsonSchema.IsValid(schema, json); + var exception = Assert.ThrowsException( + () => JsonAssert.IsValid(schema, json)); + Assert.AreEqual(RANG03, exception.Code); + Console.WriteLine(exception); + } + [TestMethod] public void When_NestedPositiveWithWrongIntegerInArray_ExceptionThrown() { diff --git a/JsonSchema.Tests/RelogicLabs/JsonSchema/Tests/Negative/PragmaTests.cs b/JsonSchema.Tests/RelogicLabs/JsonSchema/Tests/Negative/PragmaTests.cs index b331297..50a9345 100644 --- a/JsonSchema.Tests/RelogicLabs/JsonSchema/Tests/Negative/PragmaTests.cs +++ b/JsonSchema.Tests/RelogicLabs/JsonSchema/Tests/Negative/PragmaTests.cs @@ -24,14 +24,14 @@ public void When_UndefinedPropertyOfObject_ExceptionThrown() "key2": "value1" } """; - + JsonSchema.IsValid(schema, json); var exception = Assert.ThrowsException( () => JsonAssert.IsValid(schema, json)); Assert.AreEqual(PROP06, exception.Code); Console.WriteLine(exception); } - + [TestMethod] public void When_InvalidUndefinedPropertyValueMissing_ExceptionThrown() { @@ -50,14 +50,14 @@ public void When_InvalidUndefinedPropertyValueMissing_ExceptionThrown() "key2": "value1" } """; - + //JsonSchema.IsValid(schema, json); var exception = Assert.ThrowsException( () => JsonAssert.IsValid(schema, json)); Assert.AreEqual(SPRS01, exception.Code); Console.WriteLine(exception); } - + [TestMethod] public void When_IgnoreUndefinedPropertiesMalformed_ExceptionThrown() { @@ -76,14 +76,14 @@ public void When_IgnoreUndefinedPropertiesMalformed_ExceptionThrown() "key2": "value1" } """; - + //JsonSchema.IsValid(schema, json); var exception = Assert.ThrowsException( () => JsonAssert.IsValid(schema, json)); Assert.AreEqual(PRAG01, exception.Code); Console.WriteLine(exception); } - + [TestMethod] public void When_InvalidUndefinedPropertyValue_ExceptionThrown() { @@ -102,14 +102,14 @@ public void When_InvalidUndefinedPropertyValue_ExceptionThrown() "key2": "value1" } """; - + //JsonSchema.IsValid(schema, json); var exception = Assert.ThrowsException( () => JsonAssert.IsValid(schema, json)); Assert.AreEqual(PRAG02, exception.Code); Console.WriteLine(exception); } - + [TestMethod] public void When_IgnorePropertyOrderOfObject_ExceptionThrown() { @@ -131,14 +131,14 @@ public void When_IgnorePropertyOrderOfObject_ExceptionThrown() "key2": "value1" } """; - + JsonSchema.IsValid(schema, json); var exception = Assert.ThrowsException( () => JsonAssert.IsValid(schema, json)); Assert.AreEqual(PROP07, exception.Code); Console.WriteLine(exception); } - + [TestMethod] public void When_FloatingPointToleranceOfNumber_ExceptionThrown() { @@ -158,14 +158,14 @@ public void When_FloatingPointToleranceOfNumber_ExceptionThrown() "key2": 10.0002E+0 } """; - + JsonSchema.IsValid(schema, json); var exception = Assert.ThrowsException( () => JsonAssert.IsValid(schema, json)); Assert.AreEqual(FLOT01, exception.Code); Console.WriteLine(exception); } - + [TestMethod] public void When_DuplicatePragmaAssign_ExceptionThrown() { @@ -186,11 +186,395 @@ public void When_DuplicatePragmaAssign_ExceptionThrown() "key2": "value1" } """; - + //JsonSchema.IsValid(schema, json); var exception = Assert.ThrowsException( () => JsonAssert.IsValid(schema, json)); Assert.AreEqual(PRAG03, exception.Code); Console.WriteLine(exception); } + + [TestMethod] + public void When_InvalidDateTypeFormat_ExceptionThrown() + { + var schema = + """ + %pragma DateDataTypeFormat: "ABCD" + %schema: + { + "key1": #date, + "key2": #date + } + """; + var json = + """ + { + "key1": "2023-11-05", + "key2": "2021-06-01" + } + """; + + //JsonSchema.IsValid(schema, json); + var exception = Assert.ThrowsException( + () => JsonAssert.IsValid(schema, json)); + Assert.AreEqual(DLEX01, exception.Code); + Console.WriteLine(exception); + } + + [TestMethod] + public void When_JsonMismatchWithDateFormat_ExceptionThrown() + { + var schema = + """ + %pragma DateDataTypeFormat: "DD-MM-YYYY" + %schema: + { + "key1": #date, + "key2": #date + } + """; + var json = + """ + { + "key1": "2023-11-05", + "key2": "2021-06-01" + } + """; + + JsonSchema.IsValid(schema, json); + var exception = Assert.ThrowsException( + () => JsonAssert.IsValid(schema, json)); + Assert.AreEqual(DTYP04, exception.Code); + Console.WriteLine(exception); + } + + [TestMethod] + public void When_JsonMismatchWithTimeFormat_ExceptionThrown() + { + var schema = + """ + %pragma TimeDataTypeFormat: "DD-MM-YYYY hh:mm:ss" + %schema: + { + "key1": #time, + "key2": #time + } + """; + var json = + """ + { + "key1": "05-11-2023 12:10:30", + "key2": "05-11-2023 23.59.59" + } + """; + + JsonSchema.IsValid(schema, json); + var exception = Assert.ThrowsException( + () => JsonAssert.IsValid(schema, json)); + Assert.AreEqual(DTYP04, exception.Code); + Console.WriteLine(exception); + } + + [TestMethod] + public void When_JsonDateNotValidWithBefore_ExceptionThrown() + { + var schema = + """ + %pragma DateDataTypeFormat: "DD-MM-YYYY" + %schema: + @before*("01-01-2011") #date* #array + """; + var json = + """ + [ + "01-01-2010", + "01-02-2010", + "31-12-2010", + "01-01-2011" + ] + """; + JsonSchema.IsValid(schema, json); + var exception = Assert.ThrowsException( + () => JsonAssert.IsValid(schema, json)); + Assert.AreEqual(BFOR01, exception.Code); + Console.WriteLine(exception); + } + + [TestMethod] + public void When_JsonDateNotValidWithAfter_ExceptionThrown() + { + var schema = + """ + %pragma DateDataTypeFormat: "DD-MM-YYYY" + %schema: + @after*("31-12-2009") #date* #array + """; + var json = + """ + [ + "01-01-2010", + "01-02-2010", + "31-12-2010", + "31-12-2009" + ] + """; + JsonSchema.IsValid(schema, json); + var exception = Assert.ThrowsException( + () => JsonAssert.IsValid(schema, json)); + Assert.AreEqual(AFTR01, exception.Code); + Console.WriteLine(exception); + } + + [TestMethod] + public void When_JsonTimeNotValidWithBefore_ExceptionThrown() + { + var schema = + """ + %pragma TimeDataTypeFormat: "DD-MM-YYYY hh:mm:ss" + %schema: + @before*("01-01-2011 00:00:00") #time* #array + """; + var json = + """ + [ + "01-01-1970 10:30:49", + "01-02-2010 12:59:49", + "31-12-2010 23:59:59", + "01-01-2011 00:00:00" + ] + """; + JsonSchema.IsValid(schema, json); + var exception = Assert.ThrowsException( + () => JsonAssert.IsValid(schema, json)); + Assert.AreEqual(BFOR02, exception.Code); + Console.WriteLine(exception); + } + + [TestMethod] + public void When_JsonTimeNotValidWithAfter_ExceptionThrown() + { + var schema = + """ + %pragma TimeDataTypeFormat: "DD-MM-YYYY hh:mm:ss" + %schema: + @after*("01-09-1939 00:00:00") #time* #array + """; + var json = + """ + [ + "01-09-1939 00:00:01", + "01-02-2010 12:59:49", + "31-12-2030 23:59:59", + "01-09-1939 00:00:00" + ] + """; + JsonSchema.IsValid(schema, json); + var exception = Assert.ThrowsException( + () => JsonAssert.IsValid(schema, json)); + Assert.AreEqual(AFTR02, exception.Code); + Console.WriteLine(exception); + } + + [TestMethod] + public void When_JsonDateNotValidWithBothRange_ExceptionThrown() + { + var schema = + """ + %pragma DateDataTypeFormat: "DD-MM-YYYY" + %schema: + @range*("01-01-2010", "31-12-2010") #date* #array + """; + var json = + """ + [ + "01-01-2010", + "01-02-2010", + "30-06-2010", + "31-12-2009", + "01-01-2011" + ] + """; + JsonSchema.IsValid(schema, json); + var exception = Assert.ThrowsException( + () => JsonAssert.IsValid(schema, json)); + Assert.AreEqual(DRNG01, exception.Code); + Console.WriteLine(exception); + } + + [TestMethod] + public void When_JsonDateNotValidWithStartRange_ExceptionThrown() + { + var schema = + """ + %pragma DateDataTypeFormat: "DD-MM-YYYY" + %schema: + @range*("01-01-2010", !) #date* #array + """; + var json = + """ + [ + "01-01-2010", + "01-02-2010", + "30-06-2011", + "01-11-2050", + "31-12-2009" + ] + """; + JsonSchema.IsValid(schema, json); + var exception = Assert.ThrowsException( + () => JsonAssert.IsValid(schema, json)); + Assert.AreEqual(DRNG07, exception.Code); + Console.WriteLine(exception); + } + + [TestMethod] + public void When_JsonDateNotValidWithEndRange_ExceptionThrown() + { + var schema = + """ + %pragma DateDataTypeFormat: "DD-MM-YYYY" + %schema: + @range*(!, "31-12-2010") #date* #array + """; + var json = + """ + [ + "01-01-1930", + "01-02-2000", + "30-06-2005", + "31-12-2010", + "01-01-2011" + ] + """; + JsonSchema.IsValid(schema, json); + var exception = Assert.ThrowsException( + () => JsonAssert.IsValid(schema, json)); + Assert.AreEqual(DRNG05, exception.Code); + Console.WriteLine(exception); + } + + [TestMethod] + public void When_JsonTimeNotValidWithBothRange_ExceptionThrown() + { + var schema = + """ + %pragma TimeDataTypeFormat: "DD-MM-YYYY hh:mm:ss" + %schema: + @range*("01-01-2010 00:00:00", "31-12-2010 23:59:59") #time* #array + """; + var json = + """ + [ + "01-01-2010 00:00:00", + "01-02-2010 01:30:45", + "30-06-2010 12:01:07", + "31-12-2009 23:59:59", + "01-01-2011 00:00:00" + ] + """; + JsonSchema.IsValid(schema, json); + var exception = Assert.ThrowsException( + () => JsonAssert.IsValid(schema, json)); + Assert.AreEqual(DRNG02, exception.Code); + Console.WriteLine(exception); + } + + [TestMethod] + public void When_JsonTimeNotValidWithStartRange_ExceptionThrown() + { + var schema = + """ + %pragma TimeDataTypeFormat: "DD-MM-YYYY hh:mm:ss" + %schema: + @range*("01-01-2010 00:00:00", !) #time* #array + """; + var json = + """ + [ + "01-01-2010 00:00:00", + "01-02-2021 01:30:45", + "30-06-2030 12:01:07", + "31-12-2009 23:59:59" + ] + """; + JsonSchema.IsValid(schema, json); + var exception = Assert.ThrowsException( + () => JsonAssert.IsValid(schema, json)); + Assert.AreEqual(DRNG08, exception.Code); + Console.WriteLine(exception); + } + + [TestMethod] + public void When_JsonTimeNotValidWithEndRange_ExceptionThrown() + { + var schema = + """ + %pragma TimeDataTypeFormat: "DD-MM-YYYY hh:mm:ss" + %schema: + @range*(!, "31-12-2010 23:59:59") #time* #array + """; + var json = + """ + [ + "01-01-1930 00:00:00", + "01-02-1990 01:30:45", + "30-06-2000 12:01:07", + "31-12-2010 23:59:59", + "01-01-2011 00:00:00" + ] + """; + JsonSchema.IsValid(schema, json); + var exception = Assert.ThrowsException( + () => JsonAssert.IsValid(schema, json)); + Assert.AreEqual(DRNG06, exception.Code); + Console.WriteLine(exception); + } + + [TestMethod] + public void When_SchemaDateNotValidWithStartRange_ExceptionThrown() + { + var schema = + """ + %pragma DateDataTypeFormat: "DD-MM-YYYY" + %schema: + @range*("2010-01-01", !) #date* #array + """; + var json = + """ + [ + "01-01-2010", + "30-06-2011", + "01-11-2050" + ] + """; + JsonSchema.IsValid(schema, json); + var exception = Assert.ThrowsException( + () => JsonAssert.IsValid(schema, json)); + Assert.AreEqual(DSYM01, exception.Code); + Console.WriteLine(exception); + } + + [TestMethod] + public void When_SchemaTimeNotValidWithEndRange_ExceptionThrown() + { + var schema = + """ + %pragma TimeDataTypeFormat: "DD-MM-YYYY hh:mm:ss" + %schema: + @range*(!, "31-12-2010 23.59.59") #time* #array + """; + var json = + """ + [ + "01-01-1930 00:00:00", + "30-06-2000 12:01:07", + "31-12-2010 23:59:59" + ] + """; + JsonSchema.IsValid(schema, json); + var exception = Assert.ThrowsException( + () => JsonAssert.IsValid(schema, json)); + Assert.AreEqual(DSYM01, exception.Code); + Console.WriteLine(exception); + } } \ No newline at end of file diff --git a/JsonSchema.Tests/RelogicLabs/JsonSchema/Tests/Negative/StringTests.cs b/JsonSchema.Tests/RelogicLabs/JsonSchema/Tests/Negative/StringTests.cs index bf20966..f34c411 100644 --- a/JsonSchema.Tests/RelogicLabs/JsonSchema/Tests/Negative/StringTests.cs +++ b/JsonSchema.Tests/RelogicLabs/JsonSchema/Tests/Negative/StringTests.cs @@ -128,6 +128,28 @@ public void When_NestedJsonNotStringInObject_ExceptionThrown() Console.WriteLine(exception); } + [TestMethod] + public void When_WrongLengthWithStringInObject_ExceptionThrown() + { + var schema = + """ + @length*(5) #string* + """; + var json = + """ + { + "key1": "12345", + "key2": "1234", + "key3": "123456" + } + """; + JsonSchema.IsValid(schema, json); + var exception = Assert.ThrowsException( + () => JsonAssert.IsValid(schema, json)); + Assert.AreEqual(SLEN01, exception.Code); + Console.WriteLine(exception); + } + [TestMethod] public void When_NestedWrongLengthWithStringInObject_ExceptionThrown() { diff --git a/JsonSchema.Tests/RelogicLabs/JsonSchema/Tests/Positive/DataTypeTests.cs b/JsonSchema.Tests/RelogicLabs/JsonSchema/Tests/Positive/DataTypeTests.cs index 6d54e03..297179a 100644 --- a/JsonSchema.Tests/RelogicLabs/JsonSchema/Tests/Positive/DataTypeTests.cs +++ b/JsonSchema.Tests/RelogicLabs/JsonSchema/Tests/Positive/DataTypeTests.cs @@ -10,7 +10,7 @@ public void When_DataTypeMultiple_ValidTrue() var json = "10"; JsonAssert.IsValid(schema, json); } - + [TestMethod] public void When_DataTypeMultipleInObject_ValidTrue() { @@ -32,7 +32,7 @@ public void When_DataTypeMultipleInObject_ValidTrue() """; JsonAssert.IsValid(schema, json); } - + [TestMethod] public void When_DataTypeMultipleInArray_ValidTrue() { @@ -46,7 +46,7 @@ public void When_DataTypeMultipleInArray_ValidTrue() """; JsonAssert.IsValid(schema, json); } - + [TestMethod] public void When_DataTypeMultipleWithNestedFunctionInObject_ValidTrue() { @@ -66,4 +66,18 @@ public void When_DataTypeMultipleWithNestedFunctionInObject_ValidTrue() """; JsonAssert.IsValid(schema, json); } + + [TestMethod] + public void When_DataTypeAnyInArray_ValidTrue() + { + var schema = + """ + #any* #array + """; + var json = + """ + [[], {}, null, false, "test", 0.5, 1E-10, 0] + """; + JsonAssert.IsValid(schema, json); + } } \ No newline at end of file diff --git a/JsonSchema.Tests/RelogicLabs/JsonSchema/Tests/Positive/DateTimeTests.cs b/JsonSchema.Tests/RelogicLabs/JsonSchema/Tests/Positive/DateTimeTests.cs index 5bb03a2..b24d18e 100644 --- a/JsonSchema.Tests/RelogicLabs/JsonSchema/Tests/Positive/DateTimeTests.cs +++ b/JsonSchema.Tests/RelogicLabs/JsonSchema/Tests/Positive/DateTimeTests.cs @@ -399,4 +399,148 @@ public void When_NestedTimeFunctionInObject_ValidTrue() """; JsonAssert.IsValid(schema, json); } + + [TestMethod] + public void When_RangeDateInObject_ValidTrue() + { + var schema = + """ + @range*("2010-01-01", "2010-12-31") #date* #object + """; + var json = + """ + { + "key1": "2010-01-01", + "key2": "2010-06-30", + "key3": "2010-12-31" + } + """; + JsonAssert.IsValid(schema, json); + } + + [TestMethod] + public void When_RangeTimeInObject_ValidTrue() + { + var schema = + """ + @range*("2010-01-01T00:00:00.000Z", "2010-12-31T23:59:59.999Z") #time* #object + """; + var json = + """ + { + "key1": "2010-01-01T00:00:00.000Z", + "key2": "2010-06-30T10:38:50.345Z", + "key3": "2010-12-31T23:59:59.999Z" + } + """; + JsonAssert.IsValid(schema, json); + } + + [TestMethod] + public void When_BeforeDateInObject_ValidTrue() + { + var schema = + """ + @before*("2023-11-02") #date* #object + """; + var json = + """ + { + "key1": "1900-01-01", + "key2": "2020-12-31", + "key3": "2023-11-01" + } + """; + JsonAssert.IsValid(schema, json); + } + + [TestMethod] + public void When_AfterDateInObject_ValidTrue() + { + var schema = + """ + @after*("2010-12-31") #date* #object + """; + var json = + """ + { + "key1": "2011-01-01", + "key2": "2030-01-31", + "key3": "2012-03-01" + } + """; + JsonAssert.IsValid(schema, json); + } + + [TestMethod] + public void When_StartDateInObject_ValidTrue() + { + var schema = + """ + @start*("2010-01-01") #date* #object + """; + var json = + """ + { + "key1": "2010-01-01", + "key2": "2030-01-31", + "key3": "2012-03-01" + } + """; + JsonAssert.IsValid(schema, json); + } + + [TestMethod] + public void When_EndDateInObject_ValidTrue() + { + var schema = + """ + @end*("2023-12-31") #date* #object + """; + var json = + """ + { + "key1": "1900-01-01", + "key2": "2020-12-31", + "key3": "2023-12-31" + } + """; + JsonAssert.IsValid(schema, json); + } + + [TestMethod] + public void When_BeforeTimeInObject_ValidTrue() + { + var schema = + """ + @before*("2023-11-02T22:30:58.999+05:00") #time* #object + """; + var json = + """ + { + "key1": "1900-01-01T23:59:59.0Z", + "key2": "2020-12-31T00:00:00.12Z", + "key3": "2023-11-02T22:58:58.999+05:30" + } + """; + JsonAssert.IsValid(schema, json); + } + + [TestMethod] + public void When_AfterTimeInObject_ValidTrue() + { + var schema = + """ + @after*("2010-12-31T23:59:59.999Z") #time* #object + """; + var json = + """ + { + "key1": "2011-01-01T00:00:00.000Z", + "key2": "2010-12-31T20:00:00.000-04:00", + "key3": "2023-11-02T22:58:58.999+05:30" + } + """; + JsonAssert.IsValid(schema, json); + } } \ No newline at end of file diff --git a/JsonSchema.Tests/RelogicLabs/JsonSchema/Tests/Positive/PragmaTests.cs b/JsonSchema.Tests/RelogicLabs/JsonSchema/Tests/Positive/PragmaTests.cs index 83f66e2..ce17326 100644 --- a/JsonSchema.Tests/RelogicLabs/JsonSchema/Tests/Positive/PragmaTests.cs +++ b/JsonSchema.Tests/RelogicLabs/JsonSchema/Tests/Positive/PragmaTests.cs @@ -23,7 +23,7 @@ public void When_UndefinedPropertyInObject_ValidTrue() """; JsonAssert.IsValid(schema, json); } - + [TestMethod] public void When_IgnorePropertyOrderFalseOfObject_ValidTrue() { @@ -47,7 +47,7 @@ public void When_IgnorePropertyOrderFalseOfObject_ValidTrue() """; JsonAssert.IsValid(schema, json); } - + [TestMethod] public void When_IgnorePropertyOrderTrueOfObject_ValidTrue() { @@ -71,7 +71,7 @@ public void When_IgnorePropertyOrderTrueOfObject_ValidTrue() """; JsonAssert.IsValid(schema, json); } - + [TestMethod] public void When_FloatingPointToleranceOfNumber_ValidTrue() { @@ -93,4 +93,202 @@ public void When_FloatingPointToleranceOfNumber_ValidTrue() """; JsonAssert.IsValid(schema, json); } + + [TestMethod] + public void When_DateDataTypeFormatSpecified_ValidTrue() + { + var schema = + """ + %pragma DateDataTypeFormat: "DD-MM-YYYY" + %schema: + { + "key1": #date, + "key2": #date + } + """; + var json = + """ + { + "key1": "05-11-2023", + "key2": "01-06-2021" + } + """; + JsonAssert.IsValid(schema, json); + } + + [TestMethod] + public void When_DateTypeFormatWithBeforeAndAfter_ValidTrue() + { + var schema = + """ + %pragma DateDataTypeFormat: "DD-MM-YYYY" + %schema: + @after*("31-12-2009") @before*("01-01-2011") #date* #array + """; + var json = + """ + [ + "01-01-2010", + "01-02-2010", + "30-06-2010", + "31-12-2010" + ] + """; + JsonAssert.IsValid(schema, json); + } + + [TestMethod] + public void When_TimeDataTypeFormatSpecified_ValidTrue() + { + var schema = + """ + %pragma TimeDataTypeFormat: "DD-MM-YYYY hh:mm:ss" + %schema: + { + "key1": #time, + "key2": #time + } + """; + var json = + """ + { + "key1": "05-11-2023 00:00:00", + "key2": "01-06-2021 23:59:59" + } + """; + JsonAssert.IsValid(schema, json); + } + + [TestMethod] + public void When_TimeTypeFormatWithBeforeAndAfter_ValidTrue() + { + var schema = + """ + %pragma TimeDataTypeFormat: "DD-MM-YYYY hh:mm:ss" + %schema: + @after*("31-12-2009 23:59:59") + @before*("01-01-2011 00:00:00") + #time* #array + """; + var json = + """ + [ + "01-01-2010 00:00:00", + "01-02-2010 00:00:01", + "30-06-2010 12:10:30", + "31-12-2010 23:59:59" + ] + """; + JsonAssert.IsValid(schema, json); + } + + [TestMethod] + public void When_TimeTypeFormatWithRange_ValidTrue() + { + var schema = + """ + %pragma TimeDataTypeFormat: "DD-MM-YYYY hh:mm:ss" + %schema: + @range*("01-01-2010 00:00:00", "31-12-2010 23:59:59") + #time* #array + """; + var json = + """ + [ + "01-01-2010 00:00:00", + "01-02-2010 00:00:01", + "30-06-2010 12:10:30", + "31-12-2010 23:59:59" + ] + """; + JsonAssert.IsValid(schema, json); + } + + [TestMethod] + public void When_TimeDataTypeOtherFormatSpecified_ValidTrue() + { + var schema = + """ + %pragma TimeDataTypeFormat: "DD-MM-YYYY 'Time' hh:mm:ss" + %schema: + { + "key1": #time, + "key2": #time + } + """; + var json = + """ + { + "key1": "05-11-2023 Time 00:00:00", + "key2": "01-06-2021 Time 23:59:59" + } + """; + JsonAssert.IsValid(schema, json); + } + + [TestMethod] + public void When_DateTypeFormatWithFullRange_ValidTrue() + { + var schema = + """ + %pragma DateDataTypeFormat: "DD-MM-YYYY" + %schema: + @range*("01-01-2010", "31-12-2010") #date* #array + """; + var json = + """ + [ + "01-01-2010", + "01-02-2010", + "30-06-2010", + "01-11-2010", + "31-12-2010" + ] + """; + JsonAssert.IsValid(schema, json); + } + + [TestMethod] + public void When_DateTypeFormatWithRangeStart_ValidTrue() + { + var schema = + """ + %pragma DateDataTypeFormat: "DD-MM-YYYY" + %schema: + @range*("01-01-2010", !) #date* #array + """; + var json = + """ + [ + "01-01-2010", + "01-02-2010", + "30-06-2011", + "01-11-2030", + "31-12-2050" + ] + """; + JsonAssert.IsValid(schema, json); + } + + [TestMethod] + public void When_DateTypeFormatWithRangeEnd_ValidTrue() + { + var schema = + """ + %pragma DateDataTypeFormat: "DD-MM-YYYY" + %schema: + @range*(!, "31-12-2010") #date* #array + """; + var json = + """ + [ + "01-01-1930", + "01-02-2000", + "30-06-2005", + "01-11-2010", + "31-12-2010" + ] + """; + JsonAssert.IsValid(schema, json); + } } \ No newline at end of file diff --git a/JsonSchema/RelogicLabs/JsonSchema/Time/JsonDateTime.cs b/JsonSchema/RelogicLabs/JsonSchema/Time/JsonDateTime.cs index 82ffff8..e6e55cf 100644 --- a/JsonSchema/RelogicLabs/JsonSchema/Time/JsonDateTime.cs +++ b/JsonSchema/RelogicLabs/JsonSchema/Time/JsonDateTime.cs @@ -32,9 +32,9 @@ public class JsonDateTime private DateTimeOffset _dateTimeOffset; private TimeSpan _utcOffset; - public JsonDateTime(DateTimeType type, int year = DEFAULT_YEAR, int month = DEFAULT_MONTH, - int day = DEFAULT_DAY, int hour = DEFAULT_HOUR, int minute = DEFAULT_MINUTE, int second = DEFAULT_SECOND, - int fraction = DEFAULT_FRACTION, int utcHour = DEFAULT_UTC_HOUR, int utcMinute = DEFAULT_UTC_MINUTE) + internal JsonDateTime(DateTimeType type, int year = UNSET, int month = UNSET, + int day = UNSET, int hour = UNSET, int minute = UNSET, int second = UNSET, + int fraction = UNSET, int utcHour = UNSET, int utcMinute = UNSET) { Type = type; Year = year; From 3038c1dd03c8a7108625fcf6509f941fd1a2ec21 Mon Sep 17 00:00:00 2001 From: Zahid Hossain <60911932+zhossain-info@users.noreply.github.com> Date: Tue, 14 Nov 2023 12:47:41 +0600 Subject: [PATCH 4/4] Update project documentations --- ...bs.JsonSchema.Functions.CoreFunctions.html | 299 ++++++- ...abs.JsonSchema.Functions.FunctionBase.html | 2 +- ...icLabs.JsonSchema.Message.ErrorDetail.html | 10 +- ...ogicLabs.JsonSchema.Time.DateTimeType.html | 331 ++++++++ ...ogicLabs.JsonSchema.Time.JsonDateTime.html | 619 +++++++++++++++ .../doc/api/RelogicLabs.JsonSchema.Time.html | 124 +++ ...Labs.JsonSchema.Tree.FunctionRegistry.html | 313 ++++++++ ...icLabs.JsonSchema.Tree.PragmaRegistry.html | 473 +++++++++++ ...icLabs.JsonSchema.Tree.RuntimeContext.html | 204 +---- .../doc/api/RelogicLabs.JsonSchema.Tree.html | 8 + .../RelogicLabs.JsonSchema.Types.JDate.html | 247 ++++++ ...elogicLabs.JsonSchema.Types.JDateTime.html | 281 +++++++ .../RelogicLabs.JsonSchema.Types.JNode.html | 14 +- ...logicLabs.JsonSchema.Types.JPrimitive.html | 4 +- .../RelogicLabs.JsonSchema.Types.JString.html | 23 +- .../RelogicLabs.JsonSchema.Types.JTime.html | 247 ++++++ ...RelogicLabs.JsonSchema.Types.JsonType.html | 70 +- .../doc/api/RelogicLabs.JsonSchema.Types.html | 12 + JsonSchema/doc/api/toc.html | 28 + JsonSchema/doc/api/toc.json | 2 +- JsonSchema/doc/articles/datatypes.html | 38 +- JsonSchema/doc/articles/datatypes.md | 40 +- JsonSchema/doc/articles/datetime.html | 2 +- JsonSchema/doc/articles/datetime.md | 2 +- JsonSchema/doc/articles/directives.html | 8 + JsonSchema/doc/articles/directives.md | 12 + JsonSchema/doc/articles/functions.html | 52 ++ JsonSchema/doc/articles/functions.md | 40 +- JsonSchema/doc/articles/quickstart.html | 4 +- JsonSchema/doc/articles/quickstart.md | 4 +- JsonSchema/doc/articles/sourcebuild.html | 2 +- JsonSchema/doc/articles/sourcebuild.md | 4 +- JsonSchema/doc/index.json | 66 +- JsonSchema/doc/manifest.json | 80 ++ JsonSchema/doc/xrefmap.yml | 744 +++++++++++++++--- 35 files changed, 4026 insertions(+), 383 deletions(-) create mode 100644 JsonSchema/doc/api/RelogicLabs.JsonSchema.Time.DateTimeType.html create mode 100644 JsonSchema/doc/api/RelogicLabs.JsonSchema.Time.JsonDateTime.html create mode 100644 JsonSchema/doc/api/RelogicLabs.JsonSchema.Time.html create mode 100644 JsonSchema/doc/api/RelogicLabs.JsonSchema.Tree.FunctionRegistry.html create mode 100644 JsonSchema/doc/api/RelogicLabs.JsonSchema.Tree.PragmaRegistry.html create mode 100644 JsonSchema/doc/api/RelogicLabs.JsonSchema.Types.JDate.html create mode 100644 JsonSchema/doc/api/RelogicLabs.JsonSchema.Types.JDateTime.html create mode 100644 JsonSchema/doc/api/RelogicLabs.JsonSchema.Types.JTime.html diff --git a/JsonSchema/doc/api/RelogicLabs.JsonSchema.Functions.CoreFunctions.html b/JsonSchema/doc/api/RelogicLabs.JsonSchema.Functions.CoreFunctions.html index af47623..94c820f 100644 --- a/JsonSchema/doc/api/RelogicLabs.JsonSchema.Functions.CoreFunctions.html +++ b/JsonSchema/doc/api/RelogicLabs.JsonSchema.Functions.CoreFunctions.html @@ -83,7 +83,7 @@
Table of Contents

Class CoreFunctions - +

@@ -121,6 +121,9 @@

FunctionBase.Function

+ @@ -185,11 +188,87 @@

Methods

+ + +

+ After(JDateTime, JString) + +

+ +
+
+ +
+
public bool After(JDateTime target, JString reference)
+
+ +

Parameters

+
+
target JDateTime
+
+
reference JString
+
+
+ +

Returns

+
+
bool
+
+
+ + + + + + + + + + + + + +

+ Before(JDateTime, JString) + +

+ +
+
+ +
+
public bool Before(JDateTime target, JString reference)
+
+ +

Parameters

+
+
target JDateTime
+
+
reference JString
+
+
+ +

Returns

+
+
bool
+
+
+ + + + + + + + + + +

Date(JString, JString) - +

@@ -227,7 +306,7 @@

Returns

Elements(JArray, params JNode[]) - +

@@ -265,7 +344,7 @@

Returns

Email(JString) - +

@@ -297,6 +376,44 @@

Returns

+ + +

+ End(JDateTime, JString) + +

+ +
+
+ +
+
public bool End(JDateTime target, JString reference)
+
+ +

Parameters

+
+
target JDateTime
+
+
reference JString
+
+
+ +

Returns

+
+
bool
+
+
+ + + + + + + + + + +

@@ -377,7 +494,7 @@

Returns

Keys(JObject, params JString[]) - +

@@ -1189,7 +1306,7 @@

Returns

Phone(JString) - +

@@ -1257,6 +1374,126 @@

Returns

+ + +

+ Range(JDateTime, JString, JString) + +

+ +
+
+ +
+
public bool Range(JDateTime target, JString start, JString end)
+
+ +

Parameters

+
+
target JDateTime
+
+
start JString
+
+
end JString
+
+
+ +

Returns

+
+
bool
+
+
+ + + + + + + + + + + + + +

+ Range(JDateTime, JString, JUndefined) + +

+ +
+
+ +
+
public bool Range(JDateTime target, JString start, JUndefined end)
+
+ +

Parameters

+
+
target JDateTime
+
+
start JString
+
+
end JUndefined
+
+
+ +

Returns

+
+
bool
+
+
+ + + + + + + + + + + + + +

+ Range(JDateTime, JUndefined, JString) + +

+ +
+
+ +
+
public bool Range(JDateTime target, JUndefined start, JString end)
+
+ +

Parameters

+
+
target JDateTime
+
+
start JUndefined
+
+
end JString
+
+
+ +

Returns

+
+
bool
+
+
+ + + + + + + + + + +

@@ -1381,7 +1618,7 @@

Returns

Regex(JString, JString) - +

@@ -1415,11 +1652,49 @@

Returns

+ + +

+ Start(JDateTime, JString) + +

+ +
+
+ +
+
public bool Start(JDateTime target, JString reference)
+
+ +

Parameters

+
+
target JDateTime
+
+
reference JString
+
+
+ +

Returns

+
+
bool
+
+
+ + + + + + + + + + +

Time(JString, JString) - +

@@ -1457,7 +1732,7 @@

Returns

Url(JString) - +

@@ -1493,7 +1768,7 @@

Returns

Url(JString, JString) - +

@@ -1531,7 +1806,7 @@

Returns

Values(JObject, params JNode[]) - +

@@ -1569,7 +1844,7 @@

Returns

diff --git a/JsonSchema/doc/api/RelogicLabs.JsonSchema.Functions.FunctionBase.html b/JsonSchema/doc/api/RelogicLabs.JsonSchema.Functions.FunctionBase.html index 84f6211..22ba31b 100644 --- a/JsonSchema/doc/api/RelogicLabs.JsonSchema.Functions.FunctionBase.html +++ b/JsonSchema/doc/api/RelogicLabs.JsonSchema.Functions.FunctionBase.html @@ -264,7 +264,7 @@

-
protected bool FailWith(JsonSchemaException exception)
+
public bool FailWith(JsonSchemaException exception)

Parameters

diff --git a/JsonSchema/doc/api/RelogicLabs.JsonSchema.Message.ErrorDetail.html b/JsonSchema/doc/api/RelogicLabs.JsonSchema.Message.ErrorDetail.html index 57c1398..b9cd989 100644 --- a/JsonSchema/doc/api/RelogicLabs.JsonSchema.Message.ErrorDetail.html +++ b/JsonSchema/doc/api/RelogicLabs.JsonSchema.Message.ErrorDetail.html @@ -83,7 +83,7 @@
Table of Contents

Class ErrorDetail - +

@@ -147,7 +147,7 @@

Constructors

ErrorDetail(string, string) - +

@@ -184,7 +184,7 @@

Properties

Code - +

@@ -215,7 +215,7 @@

Property Value

Message - +

@@ -246,7 +246,7 @@

Property Value

diff --git a/JsonSchema/doc/api/RelogicLabs.JsonSchema.Time.DateTimeType.html b/JsonSchema/doc/api/RelogicLabs.JsonSchema.Time.DateTimeType.html new file mode 100644 index 0000000..bccdd8e --- /dev/null +++ b/JsonSchema/doc/api/RelogicLabs.JsonSchema.Time.DateTimeType.html @@ -0,0 +1,331 @@ + + + + + Class DateTimeType + | Json Schema + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+
+
+
Table of Contents
+ +
+
+ +
+
+
+ +
+
+ + + +
+ +
+ + + +

+ Class DateTimeType + +

+ +
+
Namespace
RelogicLabs.JsonSchema.Time
+
Assembly
RelogicLabs.JsonSchema.dll
+
+ +
+
+ +
+
public sealed class DateTimeType
+
+ + + + +
+
Inheritance
+
+ +
DateTimeType
+
+
+ + + +
+
Inherited Members
+
+ + + + + +
+ + + + + + +

Fields +

+ + + +

+ DATE_TYPE + +

+ +
+
+ +
+
public static readonly DateTimeType DATE_TYPE
+
+ + + + +

Field Value

+
+
DateTimeType
+
+
+ + + + + + + + + + +

+ TIME_TYPE + +

+ +
+
+ +
+
public static readonly DateTimeType TIME_TYPE
+
+ + + + +

Field Value

+
+
DateTimeType
+
+
+ + + + + + + + + +

Properties +

+ + + + +

+ Name + +

+ +
+
+ +
+
public string Name { get; }
+
+ + + + + +

Property Value

+
+
string
+
+
+ + + + + + + + + + +

+ Type + +

+ +
+
+ +
+
public JsonType Type { get; }
+
+ + + + + +

Property Value

+
+
JsonType
+
+
+ + + + + + + + +

Methods +

+ + + + +

+ ToString() + +

+ +

Returns a string that represents the current object.

+
+
+ +
+
public override string ToString()
+
+ + +

Returns

+
+
string
+

A string that represents the current object.

+
+
+ + + + + + + + + + + + +
+ + + + +
+ +
+ +
+
+ +
+ +
+
+
+
Relogic Labs© Relogic Labs. All rights reserved.
+
+
+
+ + \ No newline at end of file diff --git a/JsonSchema/doc/api/RelogicLabs.JsonSchema.Time.JsonDateTime.html b/JsonSchema/doc/api/RelogicLabs.JsonSchema.Time.JsonDateTime.html new file mode 100644 index 0000000..6fc4c0a --- /dev/null +++ b/JsonSchema/doc/api/RelogicLabs.JsonSchema.Time.JsonDateTime.html @@ -0,0 +1,619 @@ + + + + + Class JsonDateTime + | Json Schema + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+
+
+
Table of Contents
+ +
+
+ +
+
+
+ +
+
+ + + +
+ +
+ + + +

+ Class JsonDateTime + +

+ +
+
Namespace
RelogicLabs.JsonSchema.Time
+
Assembly
RelogicLabs.JsonSchema.dll
+
+ +
+
+ +
+
public class JsonDateTime
+
+ + + + +
+
Inheritance
+
+ +
JsonDateTime
+
+
+ + + +
+
Inherited Members
+
+ + + + + + +
+ + + + + + +

Fields +

+ + + +

+ UNSET + +

+ +
+
+ +
+
public const int UNSET = -1000
+
+ + + + +

Field Value

+
+
int
+
+
+ + + + + + + + + +

Properties +

+ + + + +

+ Day + +

+ +
+
+ +
+
public int Day { get; }
+
+ + + + + +

Property Value

+
+
int
+
+
+ + + + + + + + + + +

+ Fraction + +

+ +
+
+ +
+
public int Fraction { get; }
+
+ + + + + +

Property Value

+
+
int
+
+
+ + + + + + + + + + +

+ Hour + +

+ +
+
+ +
+
public int Hour { get; }
+
+ + + + + +

Property Value

+
+
int
+
+
+ + + + + + + + + + +

+ Minute + +

+ +
+
+ +
+
public int Minute { get; }
+
+ + + + + +

Property Value

+
+
int
+
+
+ + + + + + + + + + +

+ Month + +

+ +
+
+ +
+
public int Month { get; }
+
+ + + + + +

Property Value

+
+
int
+
+
+ + + + + + + + + + +

+ Second + +

+ +
+
+ +
+
public int Second { get; }
+
+ + + + + +

Property Value

+
+
int
+
+
+ + + + + + + + + + +

+ Type + +

+ +
+
+ +
+
public DateTimeType Type { get; }
+
+ + + + + +

Property Value

+
+
DateTimeType
+
+
+ + + + + + + + + + +

+ UtcHour + +

+ +
+
+ +
+
public int UtcHour { get; }
+
+ + + + + +

Property Value

+
+
int
+
+
+ + + + + + + + + + +

+ UtcMinute + +

+ +
+
+ +
+
public int UtcMinute { get; }
+
+ + + + + +

Property Value

+
+
int
+
+
+ + + + + + + + + + +

+ Year + +

+ +
+
+ +
+
public int Year { get; }
+
+ + + + + +

Property Value

+
+
int
+
+
+ + + + + + + + +

Methods +

+ + + + +

+ Compare(JsonDateTime) + +

+ +
+
+ +
+
public int Compare(JsonDateTime other)
+
+ +

Parameters

+
+
other JsonDateTime
+
+
+ +

Returns

+
+
int
+
+
+ + + + + + + + + + + + + +

+ GetDayOfWeek() + +

+ +
+
+ +
+
public DayOfWeek? GetDayOfWeek()
+
+ + +

Returns

+
+
DayOfWeek?
+
+
+ + + + + + + + + + + + + +

+ ToString() + +

+ +

Returns a string that represents the current object.

+
+
+ +
+
public override string ToString()
+
+ + +

Returns

+
+
string
+

A string that represents the current object.

+
+
+ + + + + + + + + + + + +
+ + + + +
+ +
+ +
+
+ +
+ +
+
+
+
Relogic Labs© Relogic Labs. All rights reserved.
+
+
+
+ + \ No newline at end of file diff --git a/JsonSchema/doc/api/RelogicLabs.JsonSchema.Time.html b/JsonSchema/doc/api/RelogicLabs.JsonSchema.Time.html new file mode 100644 index 0000000..6cfa799 --- /dev/null +++ b/JsonSchema/doc/api/RelogicLabs.JsonSchema.Time.html @@ -0,0 +1,124 @@ + + + + + Namespace RelogicLabs.JsonSchema.Time + | Json Schema + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+
+
+
Table of Contents
+ +
+
+ +
+
+
+ +
+
+ + + +
+ + + +
+
+ + +
+ +
+ +
+
+ +
+ +
+
+
+
Relogic Labs© Relogic Labs. All rights reserved.
+
+
+
+ + \ No newline at end of file diff --git a/JsonSchema/doc/api/RelogicLabs.JsonSchema.Tree.FunctionRegistry.html b/JsonSchema/doc/api/RelogicLabs.JsonSchema.Tree.FunctionRegistry.html new file mode 100644 index 0000000..e759f03 --- /dev/null +++ b/JsonSchema/doc/api/RelogicLabs.JsonSchema.Tree.FunctionRegistry.html @@ -0,0 +1,313 @@ + + + + + Class FunctionRegistry + | Json Schema + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+
+
+
Table of Contents
+ +
+
+ +
+
+
+ +
+
+ + + +
+ +
+ + + +

+ Class FunctionRegistry + +

+ +
+
Namespace
RelogicLabs.JsonSchema.Tree
+
Assembly
RelogicLabs.JsonSchema.dll
+
+ +
+
+ +
+
public sealed class FunctionRegistry
+
+ + + + +
+
Inheritance
+
+ +
FunctionRegistry
+
+
+ + + +
+
Inherited Members
+
+ + + + + + +
+ + + + + + +

Constructors +

+ + + + +

+ FunctionRegistry(RuntimeContext) + +

+ +
+
+ +
+
public FunctionRegistry(RuntimeContext runtime)
+
+ +

Parameters

+
+
runtime RuntimeContext
+
+
+ + + + + + + + + + + + +

Methods +

+ + + + +

+ AddClass(JInclude) + +

+ +
+
+ +
+
public JInclude AddClass(JInclude include)
+
+ +

Parameters

+
+
include JInclude
+
+
+ +

Returns

+
+
JInclude
+
+
+ + + + + + + + + + + + + +

+ AddClass(string, Context?) + +

+ +
+
+ +
+
public void AddClass(string className, Context? context = null)
+
+ +

Parameters

+
+
className string
+
+
context Context
+
+
+ + + + + + + + + + + + + + +

+ InvokeFunction(JFunction, JNode) + +

+ +
+
+ +
+
public bool InvokeFunction(JFunction function, JNode target)
+
+ +

Parameters

+
+
function JFunction
+
+
target JNode
+
+
+ +

Returns

+
+
bool
+
+
+ + + + + + + + + + + + +
+ + + + +
+ +
+ +
+
+ +
+ +
+
+
+
Relogic Labs© Relogic Labs. All rights reserved.
+
+
+
+ + \ No newline at end of file diff --git a/JsonSchema/doc/api/RelogicLabs.JsonSchema.Tree.PragmaRegistry.html b/JsonSchema/doc/api/RelogicLabs.JsonSchema.Tree.PragmaRegistry.html new file mode 100644 index 0000000..a5914ff --- /dev/null +++ b/JsonSchema/doc/api/RelogicLabs.JsonSchema.Tree.PragmaRegistry.html @@ -0,0 +1,473 @@ + + + + + Class PragmaRegistry + | Json Schema + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+
+
+
Table of Contents
+ +
+
+ +
+
+
+ +
+
+ + + +
+ +
+ + + +

+ Class PragmaRegistry + +

+ +
+
Namespace
RelogicLabs.JsonSchema.Tree
+
Assembly
RelogicLabs.JsonSchema.dll
+
+ +
+
+ +
+
public sealed class PragmaRegistry
+
+ + + + +
+
Inheritance
+
+ +
PragmaRegistry
+
+
+ + + +
+
Inherited Members
+
+ + + + + + +
+ + + + + + +

Constructors +

+ + + + +

+ PragmaRegistry() + +

+ +
+
+ +
+
public PragmaRegistry()
+
+ + + + + + + + + + + + + +

Properties +

+ + + + +

+ DateDataTypeFormat + +

+ +
+
+ +
+
public string DateDataTypeFormat { get; }
+
+ + + + + +

Property Value

+
+
string
+
+
+ + + + + + + + + + +

+ FloatingPointTolerance + +

+ +
+
+ +
+
public double FloatingPointTolerance { get; }
+
+ + + + + +

Property Value

+
+
double
+
+
+ + + + + + + + + + +

+ IgnoreObjectPropertyOrder + +

+ +
+
+ +
+
public bool IgnoreObjectPropertyOrder { get; }
+
+ + + + + +

Property Value

+
+
bool
+
+
+ + + + + + + + + + +

+ IgnoreUndefinedProperties + +

+ +
+
+ +
+
public bool IgnoreUndefinedProperties { get; }
+
+ + + + + +

Property Value

+
+
bool
+
+
+ + + + + + + + + + +

+ TimeDataTypeFormat + +

+ +
+
+ +
+
public string TimeDataTypeFormat { get; }
+
+ + + + + +

Property Value

+
+
string
+
+
+ + + + + + + + +

Methods +

+ + + + +

+ AddPragma(JPragma) + +

+ +
+
+ +
+
public JPragma AddPragma(JPragma pragma)
+
+ +

Parameters

+
+
pragma JPragma
+
+
+ +

Returns

+
+
JPragma
+
+
+ + + + + + + + + + + + + +

+ GetPragma(string) + +

+ +
+
+ +
+
public JPragma? GetPragma(string name)
+
+ +

Parameters

+
+
name string
+
+
+ +

Returns

+
+
JPragma
+
+
+ + + + + + + + + + + + + +

+ GetPragmaValue<T>(string) + +

+ +
+
+ +
+
public T GetPragmaValue<T>(string name)
+
+ +

Parameters

+
+
name string
+
+
+ +

Returns

+
+
T
+
+
+ +

Type Parameters

+
+
T
+
+
+ + + + + + + + + + + +
+ + + + +
+ +
+ +
+
+ +
+ +
+
+
+
Relogic Labs© Relogic Labs. All rights reserved.
+
+
+
+ + \ No newline at end of file diff --git a/JsonSchema/doc/api/RelogicLabs.JsonSchema.Tree.RuntimeContext.html b/JsonSchema/doc/api/RelogicLabs.JsonSchema.Tree.RuntimeContext.html index dbf3d4c..91057a9 100644 --- a/JsonSchema/doc/api/RelogicLabs.JsonSchema.Tree.RuntimeContext.html +++ b/JsonSchema/doc/api/RelogicLabs.JsonSchema.Tree.RuntimeContext.html @@ -83,7 +83,7 @@
Table of Contents

Class RuntimeContext - +

@@ -178,7 +178,7 @@

Property Value

Exceptions - +

@@ -205,18 +205,18 @@

Property Value

- + -

- FloatingPointTolerance - +

+ Functions +

-
public double FloatingPointTolerance { get; }
+
public FunctionRegistry Functions { get; }
@@ -225,7 +225,7 @@

Property Value

-
double
+
FunctionRegistry
@@ -236,49 +236,18 @@

Property Value

- - -

- IgnoreObjectPropertyOrder - -

- -
-
- -
-
public bool IgnoreObjectPropertyOrder { get; }
-
- - - - + -

Property Value

-
-
bool
-
-
- - - - - - - - - - -

- IgnoreUndefinedProperties - +

+ Pragmas +

-
public bool IgnoreUndefinedProperties { get; }
+
public PragmaRegistry Pragmas { get; }
@@ -287,7 +256,7 @@

Property Value

-
bool
+
PragmaRegistry
@@ -333,80 +302,11 @@

Methods

- - -

- AddClass(JInclude) - -

- -
-
- -
-
public JInclude AddClass(JInclude include)
-
- -

Parameters

-
-
include JInclude
-
-
- -

Returns

-
-
JInclude
-
-
- - - - - - - - - - - - - -

- AddClass(string, Context?) - -

- -
-
- -
-
public void AddClass(string className, Context? context = null)
-
- -

Parameters

-
-
className string
-
-
context Context
-
-
- - - - - - - - - - - -

AddDefinition(JDefinition) - +

@@ -438,54 +338,18 @@

Returns

- - -

- AddPragma(JPragma) - -

- -
-
- -
-
public JPragma AddPragma(JPragma pragma)
-
- -

Parameters

-
-
pragma JPragma
-
-
- -

Returns

-
-
JPragma
-
-
- - - - - - - - - - - - + -

- GetPragmaValue<T>(string) - +

+ Retrieve(string) +

-
public T GetPragmaValue<T>(string name)
+
public object? Retrieve(string name)

Parameters

@@ -496,15 +360,10 @@

Parameters

Returns

-
T
+
object
-

Type Parameters

-
-
T
-
-
@@ -515,33 +374,28 @@

Type Parameters

- + -

- InvokeFunction(JFunction, JNode) - +

+ Store(string, object) +

-
public bool InvokeFunction(JFunction function, JNode target)
+
public void Store(string name, object value)

Parameters

-
function JFunction
+
name string
-
target JNode
+
value object
-

Returns

-
-
bool
-
-
@@ -557,7 +411,7 @@

Returns

diff --git a/JsonSchema/doc/api/RelogicLabs.JsonSchema.Tree.html b/JsonSchema/doc/api/RelogicLabs.JsonSchema.Tree.html index 6f4103c..834ff24 100644 --- a/JsonSchema/doc/api/RelogicLabs.JsonSchema.Tree.html +++ b/JsonSchema/doc/api/RelogicLabs.JsonSchema.Tree.html @@ -92,10 +92,18 @@

Context
+
+
FunctionRegistry
+
+
JsonTree
+
+
PragmaRegistry
+
+
RuntimeContext
diff --git a/JsonSchema/doc/api/RelogicLabs.JsonSchema.Types.JDate.html b/JsonSchema/doc/api/RelogicLabs.JsonSchema.Types.JDate.html new file mode 100644 index 0000000..eaed486 --- /dev/null +++ b/JsonSchema/doc/api/RelogicLabs.JsonSchema.Types.JDate.html @@ -0,0 +1,247 @@ + + + + + Class JDate + | Json Schema + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+
+
+
Table of Contents
+ +
+
+ +
+
+
+ +
+
+ + + +
+ +
+ + + +

+ Class JDate + +

+ +
+
Namespace
RelogicLabs.JsonSchema.Types
+
Assembly
RelogicLabs.JsonSchema.dll
+
+ +
+
+ +
+
public class JDate : JDateTime, IJsonType, IPragmaValue<string>
+
+ + + + +
+
Inheritance
+
+ + + + + + +
JDate
+
+
+ +
+
Implements
+
+ + +
+
+ + +
+
Inherited Members
+
+ + + + + + + + + + + + + + + + + +
+ + + + + + +

Properties +

+ + + + +

+ Type + +

+ +
+
+ +
+
public override JsonType Type { get; }
+
+ + + + + +

Property Value

+
+
JsonType
+
+
+ + + + + + + + + +
+ + + + +
+ +
+ +
+
+ +
+ +
+
+
+
Relogic Labs© Relogic Labs. All rights reserved.
+
+
+
+ + \ No newline at end of file diff --git a/JsonSchema/doc/api/RelogicLabs.JsonSchema.Types.JDateTime.html b/JsonSchema/doc/api/RelogicLabs.JsonSchema.Types.JDateTime.html new file mode 100644 index 0000000..66ca5d8 --- /dev/null +++ b/JsonSchema/doc/api/RelogicLabs.JsonSchema.Types.JDateTime.html @@ -0,0 +1,281 @@ + + + + + Class JDateTime + | Json Schema + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+
+
+
Table of Contents
+ +
+
+ +
+
+
+ +
+
+ + + +
+ +
+ + + +

+ Class JDateTime + +

+ +
+
Namespace
RelogicLabs.JsonSchema.Types
+
Assembly
RelogicLabs.JsonSchema.dll
+
+ +
+
+ +
+
public class JDateTime : JString, IJsonType, IPragmaValue<string>
+
+ + + + +
+
Inheritance
+
+ + + + + +
JDateTime
+
+
+ +
+
Implements
+
+ + +
+
+ +
+
Derived
+
+ + +
+
+ +
+
Inherited Members
+
+ + + + + + + + + + + + + + + + +
+ + + + + + +

Properties +

+ + + + +

+ DateTime + +

+ +
+
+ +
+
public JsonDateTime DateTime { get; }
+
+ + + + + +

Property Value

+
+
JsonDateTime
+
+
+ + + + + + + + + + +

+ Type + +

+ +
+
+ +
+
public override JsonType Type { get; }
+
+ + + + + +

Property Value

+
+
JsonType
+
+
+ + + + + + + + + +
+ + + + +
+ +
+ +
+
+ +
+ +
+
+
+
Relogic Labs© Relogic Labs. All rights reserved.
+
+
+
+ + \ No newline at end of file diff --git a/JsonSchema/doc/api/RelogicLabs.JsonSchema.Types.JNode.html b/JsonSchema/doc/api/RelogicLabs.JsonSchema.Types.JNode.html index df21b28..ba2384f 100644 --- a/JsonSchema/doc/api/RelogicLabs.JsonSchema.Types.JNode.html +++ b/JsonSchema/doc/api/RelogicLabs.JsonSchema.Types.JNode.html @@ -156,7 +156,7 @@

Properties

Children - +

@@ -218,7 +218,7 @@

Property Value

Parent - +

@@ -249,7 +249,7 @@

Property Value

Parser - +

@@ -280,7 +280,7 @@

Property Value

Runtime - +

@@ -315,7 +315,7 @@

Methods

GetOutline() - +

Returns an abbreviated outline version of the string obtained from the @@ -352,7 +352,7 @@

Returns

Match(JNode) - +

Determines whether the specified node matches with the current node.

@@ -392,7 +392,7 @@

Returns

ToString() - +

Returns a JSON string that represents the current object.

diff --git a/JsonSchema/doc/api/RelogicLabs.JsonSchema.Types.JPrimitive.html b/JsonSchema/doc/api/RelogicLabs.JsonSchema.Types.JPrimitive.html index 52b1332..05a7591 100644 --- a/JsonSchema/doc/api/RelogicLabs.JsonSchema.Types.JPrimitive.html +++ b/JsonSchema/doc/api/RelogicLabs.JsonSchema.Types.JPrimitive.html @@ -188,7 +188,7 @@

Properties

Node - +

@@ -219,7 +219,7 @@

Property Value

Type - +

diff --git a/JsonSchema/doc/api/RelogicLabs.JsonSchema.Types.JString.html b/JsonSchema/doc/api/RelogicLabs.JsonSchema.Types.JString.html index 22d6343..6237322 100644 --- a/JsonSchema/doc/api/RelogicLabs.JsonSchema.Types.JString.html +++ b/JsonSchema/doc/api/RelogicLabs.JsonSchema.Types.JString.html @@ -95,7 +95,7 @@

-
public sealed class JString : JPrimitive, IJsonType, IPragmaValue<string>
+
public class JString : JPrimitive, IJsonType, IPragmaValue<string>
@@ -120,6 +120,12 @@

+
Derived
+
+ +
+

Inherited Members
@@ -151,6 +157,9 @@

object.GetType()

+ @@ -169,7 +178,7 @@

Properties

Type - +

@@ -235,7 +244,7 @@

Methods

Equals(object?) - +

Determines whether the specified object is equal to the current object.

@@ -274,7 +283,7 @@

Returns

GetHashCode() - +

Serves as the default hash function.

@@ -307,7 +316,7 @@

Returns

Match(JNode) - +

Determines whether the specified node matches with the current node.

@@ -347,7 +356,7 @@

Returns

ToString() - +

Returns a JSON string that represents the current object.

@@ -384,7 +393,7 @@

Operators

implicit operator string(JString) - +

diff --git a/JsonSchema/doc/api/RelogicLabs.JsonSchema.Types.JTime.html b/JsonSchema/doc/api/RelogicLabs.JsonSchema.Types.JTime.html new file mode 100644 index 0000000..76ea555 --- /dev/null +++ b/JsonSchema/doc/api/RelogicLabs.JsonSchema.Types.JTime.html @@ -0,0 +1,247 @@ + + + + + Class JTime + | Json Schema + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+
+
+
Table of Contents
+ +
+
+ +
+
+
+ +
+
+ + + +
+ +
+ + + +

+ Class JTime + +

+ +
+
Namespace
RelogicLabs.JsonSchema.Types
+
Assembly
RelogicLabs.JsonSchema.dll
+
+ +
+
+ +
+
public class JTime : JDateTime, IJsonType, IPragmaValue<string>
+
+ + + + +
+
Inheritance
+
+ + + + + + +
JTime
+
+
+ +
+
Implements
+
+ + +
+
+ + +
+
Inherited Members
+
+ + + + + + + + + + + + + + + + + +
+ + + + + + +

Properties +

+ + + + +

+ Type + +

+ +
+
+ +
+
public override JsonType Type { get; }
+
+ + + + + +

Property Value

+
+
JsonType
+
+
+ + + + + + + + + +
+ + + + +
+ +
+ +
+
+ +
+ +
+
+
+
Relogic Labs© Relogic Labs. All rights reserved.
+
+
+
+ + \ No newline at end of file diff --git a/JsonSchema/doc/api/RelogicLabs.JsonSchema.Types.JsonType.html b/JsonSchema/doc/api/RelogicLabs.JsonSchema.Types.JsonType.html index 77c69a1..803047f 100644 --- a/JsonSchema/doc/api/RelogicLabs.JsonSchema.Types.JsonType.html +++ b/JsonSchema/doc/api/RelogicLabs.JsonSchema.Types.JsonType.html @@ -83,7 +83,7 @@
Table of Contents

Class JsonType - +

@@ -146,7 +146,7 @@

Fields

ANY - +

@@ -176,7 +176,7 @@

Field Value

ARRAY - +

@@ -206,7 +206,7 @@

Field Value

BOOLEAN - +

@@ -236,7 +236,7 @@

Field Value

COMPOSITE - +

@@ -266,7 +266,7 @@

Field Value

DATE - +

@@ -294,9 +294,39 @@

Field Value

+

+ DATETIME + +

+ +
+
+ +
+
public static readonly JsonType DATETIME
+
+ + + + +

Field Value

+
+
JsonType
+
+
+ + + + + + + + + +

DOUBLE - +

@@ -326,7 +356,7 @@

Field Value

FLOAT - +

@@ -356,7 +386,7 @@

Field Value

INTEGER - +

@@ -386,7 +416,7 @@

Field Value

NULL - +

@@ -416,7 +446,7 @@

Field Value

NUMBER - +

@@ -446,7 +476,7 @@

Field Value

OBJECT - +

@@ -476,7 +506,7 @@

Field Value

PRIMITIVE - +

@@ -506,7 +536,7 @@

Field Value

STRING - +

@@ -536,7 +566,7 @@

Field Value

TIME - +

@@ -571,7 +601,7 @@

Properties

Name - +

@@ -602,7 +632,7 @@

Property Value

Type - +

@@ -637,7 +667,7 @@

Methods

Match(JNode, out string) - +

@@ -675,7 +705,7 @@

Returns

ToString() - +

Returns a string that represents the current object.

@@ -708,7 +738,7 @@

Returns

diff --git a/JsonSchema/doc/api/RelogicLabs.JsonSchema.Types.html b/JsonSchema/doc/api/RelogicLabs.JsonSchema.Types.html index 9539449..ef0b71e 100644 --- a/JsonSchema/doc/api/RelogicLabs.JsonSchema.Types.html +++ b/JsonSchema/doc/api/RelogicLabs.JsonSchema.Types.html @@ -112,6 +112,14 @@

JDataType
+
+
JDate
+
+
+
+
JDateTime
+
+
JDefinition
@@ -180,6 +188,10 @@

JString

+
+
JTime
+
+
JTitle
diff --git a/JsonSchema/doc/api/toc.html b/JsonSchema/doc/api/toc.html index 17af291..ed9a7ff 100644 --- a/JsonSchema/doc/api/toc.html +++ b/JsonSchema/doc/api/toc.html @@ -146,6 +146,19 @@ +
  • + + RelogicLabs.JsonSchema.Time + + +
  • RelogicLabs.JsonSchema.Tree @@ -154,12 +167,18 @@
  • Context
  • +
  • + FunctionRegistry +
  • JsonTree
  • Location
  • +
  • + PragmaRegistry +
  • RuntimeContext
  • @@ -200,6 +219,12 @@
  • JDataType
  • +
  • + JDate +
  • +
  • + JDateTime +
  • JDefinition
  • @@ -254,6 +279,9 @@
  • JString
  • +
  • + JTime +
  • JTitle
  • diff --git a/JsonSchema/doc/api/toc.json b/JsonSchema/doc/api/toc.json index abf28f6..9f15036 100644 --- a/JsonSchema/doc/api/toc.json +++ b/JsonSchema/doc/api/toc.json @@ -1,2 +1,2 @@ -{"items":[{"name":"RelogicLabs.JsonSchema","href":"RelogicLabs.JsonSchema.html","topicHref":"RelogicLabs.JsonSchema.html","topicUid":"RelogicLabs.JsonSchema","items":[{"name":"JsonAssert","href":"RelogicLabs.JsonSchema.JsonAssert.html","topicHref":"RelogicLabs.JsonSchema.JsonAssert.html","topicUid":"RelogicLabs.JsonSchema.JsonAssert"},{"name":"JsonSchema","href":"RelogicLabs.JsonSchema.JsonSchema.html","topicHref":"RelogicLabs.JsonSchema.JsonSchema.html","topicUid":"RelogicLabs.JsonSchema.JsonSchema"}]},{"name":"RelogicLabs.JsonSchema.Collections","href":"RelogicLabs.JsonSchema.Collections.html","topicHref":"RelogicLabs.JsonSchema.Collections.html","topicUid":"RelogicLabs.JsonSchema.Collections","items":[{"name":"IIndexMap","href":"RelogicLabs.JsonSchema.Collections.IIndexMap-2.html","topicHref":"RelogicLabs.JsonSchema.Collections.IIndexMap-2.html","topicUid":"RelogicLabs.JsonSchema.Collections.IIndexMap`2","name.vb":"IIndexMap(Of TK, TV)"},{"name":"IKeyer","href":"RelogicLabs.JsonSchema.Collections.IKeyer-1.html","topicHref":"RelogicLabs.JsonSchema.Collections.IKeyer-1.html","topicUid":"RelogicLabs.JsonSchema.Collections.IKeyer`1","name.vb":"IKeyer(Of TK)"},{"name":"IndexHashMap","href":"RelogicLabs.JsonSchema.Collections.IndexHashMap-2.html","topicHref":"RelogicLabs.JsonSchema.Collections.IndexHashMap-2.html","topicUid":"RelogicLabs.JsonSchema.Collections.IndexHashMap`2","name.vb":"IndexHashMap(Of TK, TV)"}]},{"name":"RelogicLabs.JsonSchema.Exceptions","href":"RelogicLabs.JsonSchema.Exceptions.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.html","topicUid":"RelogicLabs.JsonSchema.Exceptions","items":[{"name":"ClassInstantiationException","href":"RelogicLabs.JsonSchema.Exceptions.ClassInstantiationException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.ClassInstantiationException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.ClassInstantiationException"},{"name":"ClassNotFoundException","href":"RelogicLabs.JsonSchema.Exceptions.ClassNotFoundException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.ClassNotFoundException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.ClassNotFoundException"},{"name":"CommonException","href":"RelogicLabs.JsonSchema.Exceptions.CommonException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.CommonException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.CommonException"},{"name":"DateTimeLexerException","href":"RelogicLabs.JsonSchema.Exceptions.DateTimeLexerException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.DateTimeLexerException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.DateTimeLexerException"},{"name":"DefinitionNotFoundException","href":"RelogicLabs.JsonSchema.Exceptions.DefinitionNotFoundException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.DefinitionNotFoundException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.DefinitionNotFoundException"},{"name":"DuplicateDefinitionException","href":"RelogicLabs.JsonSchema.Exceptions.DuplicateDefinitionException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.DuplicateDefinitionException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.DuplicateDefinitionException"},{"name":"DuplicateIncludeException","href":"RelogicLabs.JsonSchema.Exceptions.DuplicateIncludeException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.DuplicateIncludeException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.DuplicateIncludeException"},{"name":"DuplicatePragmaException","href":"RelogicLabs.JsonSchema.Exceptions.DuplicatePragmaException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.DuplicatePragmaException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.DuplicatePragmaException"},{"name":"DuplicatePropertyKeyException","href":"RelogicLabs.JsonSchema.Exceptions.DuplicatePropertyKeyException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.DuplicatePropertyKeyException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.DuplicatePropertyKeyException"},{"name":"FunctionNotFoundException","href":"RelogicLabs.JsonSchema.Exceptions.FunctionNotFoundException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.FunctionNotFoundException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.FunctionNotFoundException"},{"name":"InvalidDataTypeException","href":"RelogicLabs.JsonSchema.Exceptions.InvalidDataTypeException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.InvalidDataTypeException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.InvalidDataTypeException"},{"name":"InvalidDateTimeException","href":"RelogicLabs.JsonSchema.Exceptions.InvalidDateTimeException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.InvalidDateTimeException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.InvalidDateTimeException"},{"name":"InvalidFunctionException","href":"RelogicLabs.JsonSchema.Exceptions.InvalidFunctionException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.InvalidFunctionException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.InvalidFunctionException"},{"name":"InvalidIncludeException","href":"RelogicLabs.JsonSchema.Exceptions.InvalidIncludeException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.InvalidIncludeException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.InvalidIncludeException"},{"name":"InvalidPragmaValueException","href":"RelogicLabs.JsonSchema.Exceptions.InvalidPragmaValueException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.InvalidPragmaValueException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.InvalidPragmaValueException"},{"name":"JsonLexerException","href":"RelogicLabs.JsonSchema.Exceptions.JsonLexerException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.JsonLexerException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.JsonLexerException"},{"name":"JsonParserException","href":"RelogicLabs.JsonSchema.Exceptions.JsonParserException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.JsonParserException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.JsonParserException"},{"name":"JsonSchemaException","href":"RelogicLabs.JsonSchema.Exceptions.JsonSchemaException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.JsonSchemaException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.JsonSchemaException"},{"name":"PragmaNotFoundException","href":"RelogicLabs.JsonSchema.Exceptions.PragmaNotFoundException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.PragmaNotFoundException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.PragmaNotFoundException"},{"name":"SchemaLexerException","href":"RelogicLabs.JsonSchema.Exceptions.SchemaLexerException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.SchemaLexerException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.SchemaLexerException"},{"name":"SchemaParserException","href":"RelogicLabs.JsonSchema.Exceptions.SchemaParserException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.SchemaParserException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.SchemaParserException"}]},{"name":"RelogicLabs.JsonSchema.Functions","href":"RelogicLabs.JsonSchema.Functions.html","topicHref":"RelogicLabs.JsonSchema.Functions.html","topicUid":"RelogicLabs.JsonSchema.Functions","items":[{"name":"CoreFunctions","href":"RelogicLabs.JsonSchema.Functions.CoreFunctions.html","topicHref":"RelogicLabs.JsonSchema.Functions.CoreFunctions.html","topicUid":"RelogicLabs.JsonSchema.Functions.CoreFunctions"},{"name":"FunctionBase","href":"RelogicLabs.JsonSchema.Functions.FunctionBase.html","topicHref":"RelogicLabs.JsonSchema.Functions.FunctionBase.html","topicUid":"RelogicLabs.JsonSchema.Functions.FunctionBase"}]},{"name":"RelogicLabs.JsonSchema.Message","href":"RelogicLabs.JsonSchema.Message.html","topicHref":"RelogicLabs.JsonSchema.Message.html","topicUid":"RelogicLabs.JsonSchema.Message","items":[{"name":"ActualDetail","href":"RelogicLabs.JsonSchema.Message.ActualDetail.html","topicHref":"RelogicLabs.JsonSchema.Message.ActualDetail.html","topicUid":"RelogicLabs.JsonSchema.Message.ActualDetail"},{"name":"ContextDetail","href":"RelogicLabs.JsonSchema.Message.ContextDetail.html","topicHref":"RelogicLabs.JsonSchema.Message.ContextDetail.html","topicUid":"RelogicLabs.JsonSchema.Message.ContextDetail"},{"name":"ErrorDetail","href":"RelogicLabs.JsonSchema.Message.ErrorDetail.html","topicHref":"RelogicLabs.JsonSchema.Message.ErrorDetail.html","topicUid":"RelogicLabs.JsonSchema.Message.ErrorDetail"},{"name":"ExpectedDetail","href":"RelogicLabs.JsonSchema.Message.ExpectedDetail.html","topicHref":"RelogicLabs.JsonSchema.Message.ExpectedDetail.html","topicUid":"RelogicLabs.JsonSchema.Message.ExpectedDetail"},{"name":"MessageFormatter","href":"RelogicLabs.JsonSchema.Message.MessageFormatter.html","topicHref":"RelogicLabs.JsonSchema.Message.MessageFormatter.html","topicUid":"RelogicLabs.JsonSchema.Message.MessageFormatter"}]},{"name":"RelogicLabs.JsonSchema.Tree","href":"RelogicLabs.JsonSchema.Tree.html","topicHref":"RelogicLabs.JsonSchema.Tree.html","topicUid":"RelogicLabs.JsonSchema.Tree","items":[{"name":"Context","href":"RelogicLabs.JsonSchema.Tree.Context.html","topicHref":"RelogicLabs.JsonSchema.Tree.Context.html","topicUid":"RelogicLabs.JsonSchema.Tree.Context"},{"name":"JsonTree","href":"RelogicLabs.JsonSchema.Tree.JsonTree.html","topicHref":"RelogicLabs.JsonSchema.Tree.JsonTree.html","topicUid":"RelogicLabs.JsonSchema.Tree.JsonTree"},{"name":"Location","href":"RelogicLabs.JsonSchema.Tree.Location.html","topicHref":"RelogicLabs.JsonSchema.Tree.Location.html","topicUid":"RelogicLabs.JsonSchema.Tree.Location"},{"name":"RuntimeContext","href":"RelogicLabs.JsonSchema.Tree.RuntimeContext.html","topicHref":"RelogicLabs.JsonSchema.Tree.RuntimeContext.html","topicUid":"RelogicLabs.JsonSchema.Tree.RuntimeContext"},{"name":"SchemaTree","href":"RelogicLabs.JsonSchema.Tree.SchemaTree.html","topicHref":"RelogicLabs.JsonSchema.Tree.SchemaTree.html","topicUid":"RelogicLabs.JsonSchema.Tree.SchemaTree"}]},{"name":"RelogicLabs.JsonSchema.Types","href":"RelogicLabs.JsonSchema.Types.html","topicHref":"RelogicLabs.JsonSchema.Types.html","topicUid":"RelogicLabs.JsonSchema.Types","items":[{"name":"IJsonType","href":"RelogicLabs.JsonSchema.Types.IJsonType.html","topicHref":"RelogicLabs.JsonSchema.Types.IJsonType.html","topicUid":"RelogicLabs.JsonSchema.Types.IJsonType"},{"name":"INestedMode","href":"RelogicLabs.JsonSchema.Types.INestedMode.html","topicHref":"RelogicLabs.JsonSchema.Types.INestedMode.html","topicUid":"RelogicLabs.JsonSchema.Types.INestedMode"},{"name":"IPragmaValue","href":"RelogicLabs.JsonSchema.Types.IPragmaValue-1.html","topicHref":"RelogicLabs.JsonSchema.Types.IPragmaValue-1.html","topicUid":"RelogicLabs.JsonSchema.Types.IPragmaValue`1","name.vb":"IPragmaValue(Of T)"},{"name":"JAlias","href":"RelogicLabs.JsonSchema.Types.JAlias.html","topicHref":"RelogicLabs.JsonSchema.Types.JAlias.html","topicUid":"RelogicLabs.JsonSchema.Types.JAlias"},{"name":"JArray","href":"RelogicLabs.JsonSchema.Types.JArray.html","topicHref":"RelogicLabs.JsonSchema.Types.JArray.html","topicUid":"RelogicLabs.JsonSchema.Types.JArray"},{"name":"JBoolean","href":"RelogicLabs.JsonSchema.Types.JBoolean.html","topicHref":"RelogicLabs.JsonSchema.Types.JBoolean.html","topicUid":"RelogicLabs.JsonSchema.Types.JBoolean"},{"name":"JBranch","href":"RelogicLabs.JsonSchema.Types.JBranch.html","topicHref":"RelogicLabs.JsonSchema.Types.JBranch.html","topicUid":"RelogicLabs.JsonSchema.Types.JBranch"},{"name":"JComposite","href":"RelogicLabs.JsonSchema.Types.JComposite.html","topicHref":"RelogicLabs.JsonSchema.Types.JComposite.html","topicUid":"RelogicLabs.JsonSchema.Types.JComposite"},{"name":"JDataType","href":"RelogicLabs.JsonSchema.Types.JDataType.html","topicHref":"RelogicLabs.JsonSchema.Types.JDataType.html","topicUid":"RelogicLabs.JsonSchema.Types.JDataType"},{"name":"JDefinition","href":"RelogicLabs.JsonSchema.Types.JDefinition.html","topicHref":"RelogicLabs.JsonSchema.Types.JDefinition.html","topicUid":"RelogicLabs.JsonSchema.Types.JDefinition"},{"name":"JDirective","href":"RelogicLabs.JsonSchema.Types.JDirective.html","topicHref":"RelogicLabs.JsonSchema.Types.JDirective.html","topicUid":"RelogicLabs.JsonSchema.Types.JDirective"},{"name":"JDouble","href":"RelogicLabs.JsonSchema.Types.JDouble.html","topicHref":"RelogicLabs.JsonSchema.Types.JDouble.html","topicUid":"RelogicLabs.JsonSchema.Types.JDouble"},{"name":"JFloat","href":"RelogicLabs.JsonSchema.Types.JFloat.html","topicHref":"RelogicLabs.JsonSchema.Types.JFloat.html","topicUid":"RelogicLabs.JsonSchema.Types.JFloat"},{"name":"JFunction","href":"RelogicLabs.JsonSchema.Types.JFunction.html","topicHref":"RelogicLabs.JsonSchema.Types.JFunction.html","topicUid":"RelogicLabs.JsonSchema.Types.JFunction"},{"name":"JInclude","href":"RelogicLabs.JsonSchema.Types.JInclude.html","topicHref":"RelogicLabs.JsonSchema.Types.JInclude.html","topicUid":"RelogicLabs.JsonSchema.Types.JInclude"},{"name":"JInteger","href":"RelogicLabs.JsonSchema.Types.JInteger.html","topicHref":"RelogicLabs.JsonSchema.Types.JInteger.html","topicUid":"RelogicLabs.JsonSchema.Types.JInteger"},{"name":"JLeaf","href":"RelogicLabs.JsonSchema.Types.JLeaf.html","topicHref":"RelogicLabs.JsonSchema.Types.JLeaf.html","topicUid":"RelogicLabs.JsonSchema.Types.JLeaf"},{"name":"JNode","href":"RelogicLabs.JsonSchema.Types.JNode.html","topicHref":"RelogicLabs.JsonSchema.Types.JNode.html","topicUid":"RelogicLabs.JsonSchema.Types.JNode"},{"name":"JNull","href":"RelogicLabs.JsonSchema.Types.JNull.html","topicHref":"RelogicLabs.JsonSchema.Types.JNull.html","topicUid":"RelogicLabs.JsonSchema.Types.JNull"},{"name":"JNumber","href":"RelogicLabs.JsonSchema.Types.JNumber.html","topicHref":"RelogicLabs.JsonSchema.Types.JNumber.html","topicUid":"RelogicLabs.JsonSchema.Types.JNumber"},{"name":"JObject","href":"RelogicLabs.JsonSchema.Types.JObject.html","topicHref":"RelogicLabs.JsonSchema.Types.JObject.html","topicUid":"RelogicLabs.JsonSchema.Types.JObject"},{"name":"JPragma","href":"RelogicLabs.JsonSchema.Types.JPragma.html","topicHref":"RelogicLabs.JsonSchema.Types.JPragma.html","topicUid":"RelogicLabs.JsonSchema.Types.JPragma"},{"name":"JPrimitive","href":"RelogicLabs.JsonSchema.Types.JPrimitive.html","topicHref":"RelogicLabs.JsonSchema.Types.JPrimitive.html","topicUid":"RelogicLabs.JsonSchema.Types.JPrimitive"},{"name":"JProperty","href":"RelogicLabs.JsonSchema.Types.JProperty.html","topicHref":"RelogicLabs.JsonSchema.Types.JProperty.html","topicUid":"RelogicLabs.JsonSchema.Types.JProperty"},{"name":"JRoot","href":"RelogicLabs.JsonSchema.Types.JRoot.html","topicHref":"RelogicLabs.JsonSchema.Types.JRoot.html","topicUid":"RelogicLabs.JsonSchema.Types.JRoot"},{"name":"JsonType","href":"RelogicLabs.JsonSchema.Types.JsonType.html","topicHref":"RelogicLabs.JsonSchema.Types.JsonType.html","topicUid":"RelogicLabs.JsonSchema.Types.JsonType"},{"name":"JString","href":"RelogicLabs.JsonSchema.Types.JString.html","topicHref":"RelogicLabs.JsonSchema.Types.JString.html","topicUid":"RelogicLabs.JsonSchema.Types.JString"},{"name":"JTitle","href":"RelogicLabs.JsonSchema.Types.JTitle.html","topicHref":"RelogicLabs.JsonSchema.Types.JTitle.html","topicUid":"RelogicLabs.JsonSchema.Types.JTitle"},{"name":"JUndefined","href":"RelogicLabs.JsonSchema.Types.JUndefined.html","topicHref":"RelogicLabs.JsonSchema.Types.JUndefined.html","topicUid":"RelogicLabs.JsonSchema.Types.JUndefined"},{"name":"JValidator","href":"RelogicLabs.JsonSchema.Types.JValidator.html","topicHref":"RelogicLabs.JsonSchema.Types.JValidator.html","topicUid":"RelogicLabs.JsonSchema.Types.JValidator"},{"name":"JVersion","href":"RelogicLabs.JsonSchema.Types.JVersion.html","topicHref":"RelogicLabs.JsonSchema.Types.JVersion.html","topicUid":"RelogicLabs.JsonSchema.Types.JVersion"}]}],"memberLayout":"SamePage"} \ No newline at end of file +{"items":[{"name":"RelogicLabs.JsonSchema","href":"RelogicLabs.JsonSchema.html","topicHref":"RelogicLabs.JsonSchema.html","topicUid":"RelogicLabs.JsonSchema","items":[{"name":"JsonAssert","href":"RelogicLabs.JsonSchema.JsonAssert.html","topicHref":"RelogicLabs.JsonSchema.JsonAssert.html","topicUid":"RelogicLabs.JsonSchema.JsonAssert"},{"name":"JsonSchema","href":"RelogicLabs.JsonSchema.JsonSchema.html","topicHref":"RelogicLabs.JsonSchema.JsonSchema.html","topicUid":"RelogicLabs.JsonSchema.JsonSchema"}]},{"name":"RelogicLabs.JsonSchema.Collections","href":"RelogicLabs.JsonSchema.Collections.html","topicHref":"RelogicLabs.JsonSchema.Collections.html","topicUid":"RelogicLabs.JsonSchema.Collections","items":[{"name":"IIndexMap","href":"RelogicLabs.JsonSchema.Collections.IIndexMap-2.html","topicHref":"RelogicLabs.JsonSchema.Collections.IIndexMap-2.html","topicUid":"RelogicLabs.JsonSchema.Collections.IIndexMap`2","name.vb":"IIndexMap(Of TK, TV)"},{"name":"IKeyer","href":"RelogicLabs.JsonSchema.Collections.IKeyer-1.html","topicHref":"RelogicLabs.JsonSchema.Collections.IKeyer-1.html","topicUid":"RelogicLabs.JsonSchema.Collections.IKeyer`1","name.vb":"IKeyer(Of TK)"},{"name":"IndexHashMap","href":"RelogicLabs.JsonSchema.Collections.IndexHashMap-2.html","topicHref":"RelogicLabs.JsonSchema.Collections.IndexHashMap-2.html","topicUid":"RelogicLabs.JsonSchema.Collections.IndexHashMap`2","name.vb":"IndexHashMap(Of TK, TV)"}]},{"name":"RelogicLabs.JsonSchema.Exceptions","href":"RelogicLabs.JsonSchema.Exceptions.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.html","topicUid":"RelogicLabs.JsonSchema.Exceptions","items":[{"name":"ClassInstantiationException","href":"RelogicLabs.JsonSchema.Exceptions.ClassInstantiationException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.ClassInstantiationException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.ClassInstantiationException"},{"name":"ClassNotFoundException","href":"RelogicLabs.JsonSchema.Exceptions.ClassNotFoundException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.ClassNotFoundException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.ClassNotFoundException"},{"name":"CommonException","href":"RelogicLabs.JsonSchema.Exceptions.CommonException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.CommonException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.CommonException"},{"name":"DateTimeLexerException","href":"RelogicLabs.JsonSchema.Exceptions.DateTimeLexerException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.DateTimeLexerException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.DateTimeLexerException"},{"name":"DefinitionNotFoundException","href":"RelogicLabs.JsonSchema.Exceptions.DefinitionNotFoundException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.DefinitionNotFoundException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.DefinitionNotFoundException"},{"name":"DuplicateDefinitionException","href":"RelogicLabs.JsonSchema.Exceptions.DuplicateDefinitionException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.DuplicateDefinitionException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.DuplicateDefinitionException"},{"name":"DuplicateIncludeException","href":"RelogicLabs.JsonSchema.Exceptions.DuplicateIncludeException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.DuplicateIncludeException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.DuplicateIncludeException"},{"name":"DuplicatePragmaException","href":"RelogicLabs.JsonSchema.Exceptions.DuplicatePragmaException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.DuplicatePragmaException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.DuplicatePragmaException"},{"name":"DuplicatePropertyKeyException","href":"RelogicLabs.JsonSchema.Exceptions.DuplicatePropertyKeyException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.DuplicatePropertyKeyException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.DuplicatePropertyKeyException"},{"name":"FunctionNotFoundException","href":"RelogicLabs.JsonSchema.Exceptions.FunctionNotFoundException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.FunctionNotFoundException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.FunctionNotFoundException"},{"name":"InvalidDataTypeException","href":"RelogicLabs.JsonSchema.Exceptions.InvalidDataTypeException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.InvalidDataTypeException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.InvalidDataTypeException"},{"name":"InvalidDateTimeException","href":"RelogicLabs.JsonSchema.Exceptions.InvalidDateTimeException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.InvalidDateTimeException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.InvalidDateTimeException"},{"name":"InvalidFunctionException","href":"RelogicLabs.JsonSchema.Exceptions.InvalidFunctionException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.InvalidFunctionException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.InvalidFunctionException"},{"name":"InvalidIncludeException","href":"RelogicLabs.JsonSchema.Exceptions.InvalidIncludeException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.InvalidIncludeException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.InvalidIncludeException"},{"name":"InvalidPragmaValueException","href":"RelogicLabs.JsonSchema.Exceptions.InvalidPragmaValueException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.InvalidPragmaValueException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.InvalidPragmaValueException"},{"name":"JsonLexerException","href":"RelogicLabs.JsonSchema.Exceptions.JsonLexerException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.JsonLexerException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.JsonLexerException"},{"name":"JsonParserException","href":"RelogicLabs.JsonSchema.Exceptions.JsonParserException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.JsonParserException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.JsonParserException"},{"name":"JsonSchemaException","href":"RelogicLabs.JsonSchema.Exceptions.JsonSchemaException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.JsonSchemaException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.JsonSchemaException"},{"name":"PragmaNotFoundException","href":"RelogicLabs.JsonSchema.Exceptions.PragmaNotFoundException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.PragmaNotFoundException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.PragmaNotFoundException"},{"name":"SchemaLexerException","href":"RelogicLabs.JsonSchema.Exceptions.SchemaLexerException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.SchemaLexerException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.SchemaLexerException"},{"name":"SchemaParserException","href":"RelogicLabs.JsonSchema.Exceptions.SchemaParserException.html","topicHref":"RelogicLabs.JsonSchema.Exceptions.SchemaParserException.html","topicUid":"RelogicLabs.JsonSchema.Exceptions.SchemaParserException"}]},{"name":"RelogicLabs.JsonSchema.Functions","href":"RelogicLabs.JsonSchema.Functions.html","topicHref":"RelogicLabs.JsonSchema.Functions.html","topicUid":"RelogicLabs.JsonSchema.Functions","items":[{"name":"CoreFunctions","href":"RelogicLabs.JsonSchema.Functions.CoreFunctions.html","topicHref":"RelogicLabs.JsonSchema.Functions.CoreFunctions.html","topicUid":"RelogicLabs.JsonSchema.Functions.CoreFunctions"},{"name":"FunctionBase","href":"RelogicLabs.JsonSchema.Functions.FunctionBase.html","topicHref":"RelogicLabs.JsonSchema.Functions.FunctionBase.html","topicUid":"RelogicLabs.JsonSchema.Functions.FunctionBase"}]},{"name":"RelogicLabs.JsonSchema.Message","href":"RelogicLabs.JsonSchema.Message.html","topicHref":"RelogicLabs.JsonSchema.Message.html","topicUid":"RelogicLabs.JsonSchema.Message","items":[{"name":"ActualDetail","href":"RelogicLabs.JsonSchema.Message.ActualDetail.html","topicHref":"RelogicLabs.JsonSchema.Message.ActualDetail.html","topicUid":"RelogicLabs.JsonSchema.Message.ActualDetail"},{"name":"ContextDetail","href":"RelogicLabs.JsonSchema.Message.ContextDetail.html","topicHref":"RelogicLabs.JsonSchema.Message.ContextDetail.html","topicUid":"RelogicLabs.JsonSchema.Message.ContextDetail"},{"name":"ErrorDetail","href":"RelogicLabs.JsonSchema.Message.ErrorDetail.html","topicHref":"RelogicLabs.JsonSchema.Message.ErrorDetail.html","topicUid":"RelogicLabs.JsonSchema.Message.ErrorDetail"},{"name":"ExpectedDetail","href":"RelogicLabs.JsonSchema.Message.ExpectedDetail.html","topicHref":"RelogicLabs.JsonSchema.Message.ExpectedDetail.html","topicUid":"RelogicLabs.JsonSchema.Message.ExpectedDetail"},{"name":"MessageFormatter","href":"RelogicLabs.JsonSchema.Message.MessageFormatter.html","topicHref":"RelogicLabs.JsonSchema.Message.MessageFormatter.html","topicUid":"RelogicLabs.JsonSchema.Message.MessageFormatter"}]},{"name":"RelogicLabs.JsonSchema.Time","href":"RelogicLabs.JsonSchema.Time.html","topicHref":"RelogicLabs.JsonSchema.Time.html","topicUid":"RelogicLabs.JsonSchema.Time","items":[{"name":"DateTimeType","href":"RelogicLabs.JsonSchema.Time.DateTimeType.html","topicHref":"RelogicLabs.JsonSchema.Time.DateTimeType.html","topicUid":"RelogicLabs.JsonSchema.Time.DateTimeType"},{"name":"JsonDateTime","href":"RelogicLabs.JsonSchema.Time.JsonDateTime.html","topicHref":"RelogicLabs.JsonSchema.Time.JsonDateTime.html","topicUid":"RelogicLabs.JsonSchema.Time.JsonDateTime"}]},{"name":"RelogicLabs.JsonSchema.Tree","href":"RelogicLabs.JsonSchema.Tree.html","topicHref":"RelogicLabs.JsonSchema.Tree.html","topicUid":"RelogicLabs.JsonSchema.Tree","items":[{"name":"Context","href":"RelogicLabs.JsonSchema.Tree.Context.html","topicHref":"RelogicLabs.JsonSchema.Tree.Context.html","topicUid":"RelogicLabs.JsonSchema.Tree.Context"},{"name":"FunctionRegistry","href":"RelogicLabs.JsonSchema.Tree.FunctionRegistry.html","topicHref":"RelogicLabs.JsonSchema.Tree.FunctionRegistry.html","topicUid":"RelogicLabs.JsonSchema.Tree.FunctionRegistry"},{"name":"JsonTree","href":"RelogicLabs.JsonSchema.Tree.JsonTree.html","topicHref":"RelogicLabs.JsonSchema.Tree.JsonTree.html","topicUid":"RelogicLabs.JsonSchema.Tree.JsonTree"},{"name":"Location","href":"RelogicLabs.JsonSchema.Tree.Location.html","topicHref":"RelogicLabs.JsonSchema.Tree.Location.html","topicUid":"RelogicLabs.JsonSchema.Tree.Location"},{"name":"PragmaRegistry","href":"RelogicLabs.JsonSchema.Tree.PragmaRegistry.html","topicHref":"RelogicLabs.JsonSchema.Tree.PragmaRegistry.html","topicUid":"RelogicLabs.JsonSchema.Tree.PragmaRegistry"},{"name":"RuntimeContext","href":"RelogicLabs.JsonSchema.Tree.RuntimeContext.html","topicHref":"RelogicLabs.JsonSchema.Tree.RuntimeContext.html","topicUid":"RelogicLabs.JsonSchema.Tree.RuntimeContext"},{"name":"SchemaTree","href":"RelogicLabs.JsonSchema.Tree.SchemaTree.html","topicHref":"RelogicLabs.JsonSchema.Tree.SchemaTree.html","topicUid":"RelogicLabs.JsonSchema.Tree.SchemaTree"}]},{"name":"RelogicLabs.JsonSchema.Types","href":"RelogicLabs.JsonSchema.Types.html","topicHref":"RelogicLabs.JsonSchema.Types.html","topicUid":"RelogicLabs.JsonSchema.Types","items":[{"name":"IJsonType","href":"RelogicLabs.JsonSchema.Types.IJsonType.html","topicHref":"RelogicLabs.JsonSchema.Types.IJsonType.html","topicUid":"RelogicLabs.JsonSchema.Types.IJsonType"},{"name":"INestedMode","href":"RelogicLabs.JsonSchema.Types.INestedMode.html","topicHref":"RelogicLabs.JsonSchema.Types.INestedMode.html","topicUid":"RelogicLabs.JsonSchema.Types.INestedMode"},{"name":"IPragmaValue","href":"RelogicLabs.JsonSchema.Types.IPragmaValue-1.html","topicHref":"RelogicLabs.JsonSchema.Types.IPragmaValue-1.html","topicUid":"RelogicLabs.JsonSchema.Types.IPragmaValue`1","name.vb":"IPragmaValue(Of T)"},{"name":"JAlias","href":"RelogicLabs.JsonSchema.Types.JAlias.html","topicHref":"RelogicLabs.JsonSchema.Types.JAlias.html","topicUid":"RelogicLabs.JsonSchema.Types.JAlias"},{"name":"JArray","href":"RelogicLabs.JsonSchema.Types.JArray.html","topicHref":"RelogicLabs.JsonSchema.Types.JArray.html","topicUid":"RelogicLabs.JsonSchema.Types.JArray"},{"name":"JBoolean","href":"RelogicLabs.JsonSchema.Types.JBoolean.html","topicHref":"RelogicLabs.JsonSchema.Types.JBoolean.html","topicUid":"RelogicLabs.JsonSchema.Types.JBoolean"},{"name":"JBranch","href":"RelogicLabs.JsonSchema.Types.JBranch.html","topicHref":"RelogicLabs.JsonSchema.Types.JBranch.html","topicUid":"RelogicLabs.JsonSchema.Types.JBranch"},{"name":"JComposite","href":"RelogicLabs.JsonSchema.Types.JComposite.html","topicHref":"RelogicLabs.JsonSchema.Types.JComposite.html","topicUid":"RelogicLabs.JsonSchema.Types.JComposite"},{"name":"JDataType","href":"RelogicLabs.JsonSchema.Types.JDataType.html","topicHref":"RelogicLabs.JsonSchema.Types.JDataType.html","topicUid":"RelogicLabs.JsonSchema.Types.JDataType"},{"name":"JDate","href":"RelogicLabs.JsonSchema.Types.JDate.html","topicHref":"RelogicLabs.JsonSchema.Types.JDate.html","topicUid":"RelogicLabs.JsonSchema.Types.JDate"},{"name":"JDateTime","href":"RelogicLabs.JsonSchema.Types.JDateTime.html","topicHref":"RelogicLabs.JsonSchema.Types.JDateTime.html","topicUid":"RelogicLabs.JsonSchema.Types.JDateTime"},{"name":"JDefinition","href":"RelogicLabs.JsonSchema.Types.JDefinition.html","topicHref":"RelogicLabs.JsonSchema.Types.JDefinition.html","topicUid":"RelogicLabs.JsonSchema.Types.JDefinition"},{"name":"JDirective","href":"RelogicLabs.JsonSchema.Types.JDirective.html","topicHref":"RelogicLabs.JsonSchema.Types.JDirective.html","topicUid":"RelogicLabs.JsonSchema.Types.JDirective"},{"name":"JDouble","href":"RelogicLabs.JsonSchema.Types.JDouble.html","topicHref":"RelogicLabs.JsonSchema.Types.JDouble.html","topicUid":"RelogicLabs.JsonSchema.Types.JDouble"},{"name":"JFloat","href":"RelogicLabs.JsonSchema.Types.JFloat.html","topicHref":"RelogicLabs.JsonSchema.Types.JFloat.html","topicUid":"RelogicLabs.JsonSchema.Types.JFloat"},{"name":"JFunction","href":"RelogicLabs.JsonSchema.Types.JFunction.html","topicHref":"RelogicLabs.JsonSchema.Types.JFunction.html","topicUid":"RelogicLabs.JsonSchema.Types.JFunction"},{"name":"JInclude","href":"RelogicLabs.JsonSchema.Types.JInclude.html","topicHref":"RelogicLabs.JsonSchema.Types.JInclude.html","topicUid":"RelogicLabs.JsonSchema.Types.JInclude"},{"name":"JInteger","href":"RelogicLabs.JsonSchema.Types.JInteger.html","topicHref":"RelogicLabs.JsonSchema.Types.JInteger.html","topicUid":"RelogicLabs.JsonSchema.Types.JInteger"},{"name":"JLeaf","href":"RelogicLabs.JsonSchema.Types.JLeaf.html","topicHref":"RelogicLabs.JsonSchema.Types.JLeaf.html","topicUid":"RelogicLabs.JsonSchema.Types.JLeaf"},{"name":"JNode","href":"RelogicLabs.JsonSchema.Types.JNode.html","topicHref":"RelogicLabs.JsonSchema.Types.JNode.html","topicUid":"RelogicLabs.JsonSchema.Types.JNode"},{"name":"JNull","href":"RelogicLabs.JsonSchema.Types.JNull.html","topicHref":"RelogicLabs.JsonSchema.Types.JNull.html","topicUid":"RelogicLabs.JsonSchema.Types.JNull"},{"name":"JNumber","href":"RelogicLabs.JsonSchema.Types.JNumber.html","topicHref":"RelogicLabs.JsonSchema.Types.JNumber.html","topicUid":"RelogicLabs.JsonSchema.Types.JNumber"},{"name":"JObject","href":"RelogicLabs.JsonSchema.Types.JObject.html","topicHref":"RelogicLabs.JsonSchema.Types.JObject.html","topicUid":"RelogicLabs.JsonSchema.Types.JObject"},{"name":"JPragma","href":"RelogicLabs.JsonSchema.Types.JPragma.html","topicHref":"RelogicLabs.JsonSchema.Types.JPragma.html","topicUid":"RelogicLabs.JsonSchema.Types.JPragma"},{"name":"JPrimitive","href":"RelogicLabs.JsonSchema.Types.JPrimitive.html","topicHref":"RelogicLabs.JsonSchema.Types.JPrimitive.html","topicUid":"RelogicLabs.JsonSchema.Types.JPrimitive"},{"name":"JProperty","href":"RelogicLabs.JsonSchema.Types.JProperty.html","topicHref":"RelogicLabs.JsonSchema.Types.JProperty.html","topicUid":"RelogicLabs.JsonSchema.Types.JProperty"},{"name":"JRoot","href":"RelogicLabs.JsonSchema.Types.JRoot.html","topicHref":"RelogicLabs.JsonSchema.Types.JRoot.html","topicUid":"RelogicLabs.JsonSchema.Types.JRoot"},{"name":"JsonType","href":"RelogicLabs.JsonSchema.Types.JsonType.html","topicHref":"RelogicLabs.JsonSchema.Types.JsonType.html","topicUid":"RelogicLabs.JsonSchema.Types.JsonType"},{"name":"JString","href":"RelogicLabs.JsonSchema.Types.JString.html","topicHref":"RelogicLabs.JsonSchema.Types.JString.html","topicUid":"RelogicLabs.JsonSchema.Types.JString"},{"name":"JTime","href":"RelogicLabs.JsonSchema.Types.JTime.html","topicHref":"RelogicLabs.JsonSchema.Types.JTime.html","topicUid":"RelogicLabs.JsonSchema.Types.JTime"},{"name":"JTitle","href":"RelogicLabs.JsonSchema.Types.JTitle.html","topicHref":"RelogicLabs.JsonSchema.Types.JTitle.html","topicUid":"RelogicLabs.JsonSchema.Types.JTitle"},{"name":"JUndefined","href":"RelogicLabs.JsonSchema.Types.JUndefined.html","topicHref":"RelogicLabs.JsonSchema.Types.JUndefined.html","topicUid":"RelogicLabs.JsonSchema.Types.JUndefined"},{"name":"JValidator","href":"RelogicLabs.JsonSchema.Types.JValidator.html","topicHref":"RelogicLabs.JsonSchema.Types.JValidator.html","topicUid":"RelogicLabs.JsonSchema.Types.JValidator"},{"name":"JVersion","href":"RelogicLabs.JsonSchema.Types.JVersion.html","topicHref":"RelogicLabs.JsonSchema.Types.JVersion.html","topicUid":"RelogicLabs.JsonSchema.Types.JVersion"}]}],"memberLayout":"SamePage"} \ No newline at end of file diff --git a/JsonSchema/doc/articles/datatypes.html b/JsonSchema/doc/articles/datatypes.html index 475a898..aa3937f 100644 --- a/JsonSchema/doc/articles/datatypes.html +++ b/JsonSchema/doc/articles/datatypes.html @@ -85,19 +85,25 @@

    Constraint Data Types

    In the schema document, data types are denoted by the # prefix. Here is an outline of all data types, including their subtypes, used in the schema document to validate a JSON document. When using multiple data types for validation, it indicates that the JSON value is considered valid if it complies with any of the specified alternative data types. All of these data types and their subtypes offer the flexibility of selecting the most appropriate type based on requirements.

    #any
      ┬
    - ├ #object
    - ├ #array
    - ├ #string
    + ├ #primitive
      │  ┬
    - │  ├ #date
    - │  └ #time
    - ├ #number
    - │  ┬
    - │  ├ #integer
    - │  ├ #float
    - │  └ #double  
    - ├ #boolean
    - └ #null
    + │  ├ #string
    + │  │  ┬
    + │  │  └ #datetime
    + │  │     ┬
    + │  │     ├ #date
    + │  │     └ #time
    + │  ├ #number
    + │  │  ┬
    + │  │  ├ #integer
    + │  │  ├ #float
    + │  │  └ #double  
    + │  ├ #boolean
    + │  └ #null  
    + └ #composite
    +    ┬
    +    ├ #array
    +    └ #object
     

    The Any Data Type

    This data type accepts any valid JSON value that conforms to the JSON standard. It is the least restrictive data type and serves as the parent type for all other data types defined in this schema, each of which imposes more specific constraints. Here is the specification of JSON document containing rules of all valid JSON values. Following is the syntax for specifying this data type:

    @@ -115,12 +121,16 @@

    The String Data Type

    This is one of the most commonly used data types in a JSON document, designed to accept any JSON string as specified by the JSON standard. The syntax for specifying this data type is as follows:

    #string
     
    +

    The Date Time Data Type

    +

    The date-time data type serves as the parent data type for both date and time data types. It is a subtype of string data type and thus formatted as per the JSON string specification.

    +
    #datetime
    +

    The Date Data Type

    -

    The date data type accepts only a type of string which represent a date specified by ISO 8601 standard (date part only). It is a subtype of string data type and thus formatted as per the JSON string specification. Detailed explanations of the ISO 8601 standard can be found in this document. Furthermore, you can refer to this document for a detailed description of the date pattern associated with this data type. To define this data type in schema, use the following syntax:

    +

    The date data type accepts a string representation of a date, conforming to the ISO 8601 standard (date part only). This behavior is based on the default configuration, which can be modified as needed. It is a subtype of date-time type and thus also formatted as per the JSON string specification. Detailed explanations of the ISO 8601 standard can be found in this document. Furthermore, you can refer to this document for a detailed description of the date pattern associated with this data type. To define this data type in schema, use the following syntax:

    #date
     

    The Time Data Type

    -

    The time data type only accepts strings representing date-time (including both date and time), in accordance with the ISO 8601 standard. Similar to the date data type, it is a subtype of string data type and thus formatted as per the JSON string specification. Here is the ISO 8601 standard document, which contains detailed explanations. Furthermore, you can refer to this document for a detailed description of the date-time pattern associated with this data type. To define this data type in schema, use the following syntax:

    +

    The time data type accepts a string representation of a time (including both date and time parts), in accordance with the ISO 8601 standard. This behavior is based on the default configuration, which can be modified as needed. Similar to the date data type, it is a subtype of date-time data type and thus also formatted as per the JSON string specification. Here is the ISO 8601 standard document, which contains detailed explanations. Furthermore, you can refer to this document for a detailed description of the date-time pattern associated with this data type. To define this data type in schema, use the following syntax:

    #time
     

    The Number Data Type

    diff --git a/JsonSchema/doc/articles/datatypes.md b/JsonSchema/doc/articles/datatypes.md index 0133ae8..625b3e4 100644 --- a/JsonSchema/doc/articles/datatypes.md +++ b/JsonSchema/doc/articles/datatypes.md @@ -10,19 +10,25 @@ In the schema document, data types are denoted by the `#` prefix. Here is an out ```stylus #any ┬ - ├ #object - ├ #array - ├ #string + ├ #primitive │ ┬ - │ ├ #date - │ └ #time - ├ #number - │ ┬ - │ ├ #integer - │ ├ #float - │ └ #double - ├ #boolean - └ #null + │ ├ #string + │ │ ┬ + │ │ └ #datetime + │ │ ┬ + │ │ ├ #date + │ │ └ #time + │ ├ #number + │ │ ┬ + │ │ ├ #integer + │ │ ├ #float + │ │ └ #double + │ ├ #boolean + │ └ #null + └ #composite + ┬ + ├ #array + └ #object ``` ### The Any Data Type @@ -49,14 +55,20 @@ This is one of the most commonly used data types in a JSON document, designed to #string ``` +### The Date Time Data Type +The date-time data type serves as the parent data type for both date and time data types. It is a subtype of string data type and thus formatted as per the JSON string specification. +```stylus +#datetime +``` + ### The Date Data Type -The date data type accepts only a type of string which represent a date specified by ISO 8601 standard (date part only). It is a subtype of string data type and thus formatted as per the JSON string specification. Detailed explanations of the ISO 8601 standard can be found in this [document](https://www.iso.org/iso-8601-date-and-time-format.html). Furthermore, you can refer to this [document](/JsonSchema-DotNet/articles/datetime.html) for a detailed description of the date pattern associated with this data type. To define this data type in schema, use the following syntax: +The date data type accepts a string representation of a date, conforming to the ISO 8601 standard (date part only). This behavior is based on the default configuration, which can be modified as needed. It is a subtype of date-time type and thus also formatted as per the JSON string specification. Detailed explanations of the ISO 8601 standard can be found in this [document](https://www.iso.org/iso-8601-date-and-time-format.html). Furthermore, you can refer to this [document](/JsonSchema-DotNet/articles/datetime.html) for a detailed description of the date pattern associated with this data type. To define this data type in schema, use the following syntax: ```stylus #date ``` ### The Time Data Type -The time data type only accepts strings representing date-time (including both date and time), in accordance with the ISO 8601 standard. Similar to the date data type, it is a subtype of string data type and thus formatted as per the JSON string specification. Here is the ISO 8601 standard [document](https://www.iso.org/iso-8601-date-and-time-format.html), which contains detailed explanations. Furthermore, you can refer to this [document](/JsonSchema-DotNet/articles/datetime.html) for a detailed description of the date-time pattern associated with this data type. To define this data type in schema, use the following syntax: +The time data type accepts a string representation of a time (including both date and time parts), in accordance with the ISO 8601 standard. This behavior is based on the default configuration, which can be modified as needed. Similar to the date data type, it is a subtype of date-time data type and thus also formatted as per the JSON string specification. Here is the ISO 8601 standard [document](https://www.iso.org/iso-8601-date-and-time-format.html), which contains detailed explanations. Furthermore, you can refer to this [document](/JsonSchema-DotNet/articles/datetime.html) for a detailed description of the date-time pattern associated with this data type. To define this data type in schema, use the following syntax: ```stylus #time ``` diff --git a/JsonSchema/doc/articles/datetime.html b/JsonSchema/doc/articles/datetime.html index c0037ef..2923364 100644 --- a/JsonSchema/doc/articles/datetime.html +++ b/JsonSchema/doc/articles/datetime.html @@ -316,7 +316,7 @@

    Date and Time Patterns

    -

    The first pattern in the table above adheres to the ISO 8601 date format and is used to validate the #date data type within the schema. The second pattern in the table follows the ISO 8601 format for date and time, validating the #time data type in the schema. Instead of explicitly specifying these patterns in the @date or @time functions, a more concise approach is to directly utilize the #date or #time type within the schema.

    +

    The first pattern in the table above adheres to the ISO 8601 date format and is used to validate the #date data type within the schema. The second pattern in the table follows the ISO 8601 format for date and time, validating the #time data type in the schema. Instead of explicitly specifying these patterns in the @date or @time functions, a more concise approach is to directly utilize the #date or #time type within the schema. Detailed explanations regarding the date and time format of the ISO 8601 standard are available in this document.

    When the AM/PM designator is included in the date and time pattern, the presence of any hour format specifier indicates that the time is in the 12-hour clock format. Conversely, when the AM/PM designator is omitted, the presence of any hour format specifier indicates that the time is in the 24-hour clock format.

    diff --git a/JsonSchema/doc/articles/datetime.md b/JsonSchema/doc/articles/datetime.md index 634be66..8ab1834 100644 --- a/JsonSchema/doc/articles/datetime.md +++ b/JsonSchema/doc/articles/datetime.md @@ -48,6 +48,6 @@ The pattern components listed above can be combined to create comprehensive and | 6 | `@time` | `DDD, D MMM YY hh:mm:ss ZZ` | `Sun, 4 Jul 99 12:08:56 -06:00` | | 7 | `@time` | `hh:mm:ss t ZZ` | `03:11:30 AM +06:00` | -The first pattern in the table above adheres to the ISO 8601 date format and is used to validate the `#date` data type within the schema. The second pattern in the table follows the ISO 8601 format for date and time, validating the `#time` data type in the schema. Instead of explicitly specifying these patterns in the `@date` or `@time` functions, a more concise approach is to directly utilize the `#date` or `#time` type within the schema. +The first pattern in the table above adheres to the ISO 8601 date format and is used to validate the `#date` data type within the schema. The second pattern in the table follows the ISO 8601 format for date and time, validating the `#time` data type in the schema. Instead of explicitly specifying these patterns in the `@date` or `@time` functions, a more concise approach is to directly utilize the `#date` or `#time` type within the schema. Detailed explanations regarding the date and time format of the ISO 8601 standard are available in this [document](https://www.iso.org/iso-8601-date-and-time-format.html). When the AM/PM designator is included in the date and time pattern, the presence of any hour format specifier indicates that the time is in the 12-hour clock format. Conversely, when the AM/PM designator is omitted, the presence of any hour format specifier indicates that the time is in the 24-hour clock format. \ No newline at end of file diff --git a/JsonSchema/doc/articles/directives.html b/JsonSchema/doc/articles/directives.html index 95005dc..10c2ab8 100644 --- a/JsonSchema/doc/articles/directives.html +++ b/JsonSchema/doc/articles/directives.html @@ -103,6 +103,14 @@

    Ignore Undefined Properties

    The default value of this directive is false, which means that by default, undefined properties in the JSON document are not ignored, and validation errors will be raised for them. For example, the following usage of this directive instructs the validation process to ignore any undefined properties in the JSON document:

    %pragma IgnoreUndefinedProperties: true
     
    +

    Date Data Type Format

    +

    The DateDataTypeFormat pragma directive enables you to customize the default format of the #date data type. By default, the #date data type follows the ISO 8601 standard, precisely using the format YYYY-MM-DD. Additional details on date-time patterns and formats are available here. The subsequent example illustrates the process of defining a customized date format for the #date data type:

    +
    %pragma DateDataTypeFormat: "DD-MM-YYYY"
    +
    +

    Time Data Type Format

    +

    To customize the default format of the #time data type, utilize the TimeDataTypeFormat pragma directive. By default, the #time data type follows the ISO 8601 standard, precisely in the format YYYY-MM-DD'T'hh:mm:ss.FZZ. Further information on date-time patterns and formats can be found here. The following example demonstrates how to specify a customized time format for the #time data type:

    +
    %pragma TimeDataTypeFormat: "DD-MM-YYYY hh:mm:ss"
    +

    Floating Point Tolerance

    The FloatingPointTolerance pragma directive allows you to define the tolerance level for relative errors in floating-point numbers during calculations and computations carried out by the validation process. By default, this directive is set to 1E-10, indicating a small tolerance. However, you have the flexibility to adjust this value to any desired number. To specify a custom tolerance value of 1E-07, you can use the following notation as an example:

    %pragma FloatingPointTolerance: 1E-07
    diff --git a/JsonSchema/doc/articles/directives.md b/JsonSchema/doc/articles/directives.md
    index b731a1d..00f42e9 100644
    --- a/JsonSchema/doc/articles/directives.md
    +++ b/JsonSchema/doc/articles/directives.md
    @@ -37,6 +37,18 @@ The default value of this directive is `false`, which means that by default, und
     %pragma IgnoreUndefinedProperties: true
     ```
     
    +### Date Data Type Format
    +The `DateDataTypeFormat` pragma directive enables you to customize the default format of the `#date` data type. By default, the `#date` data type follows the ISO 8601 standard, precisely using the format `YYYY-MM-DD`. Additional details on date-time patterns and formats are available [here](/JsonSchema-DotNet/articles/datetime.html). The subsequent example illustrates the process of defining a customized date format for the `#date` data type:
    +```stylus
    +%pragma DateDataTypeFormat: "DD-MM-YYYY"
    +```
    +
    +### Time Data Type Format
    +To customize the default format of the `#time` data type, utilize the `TimeDataTypeFormat` pragma directive. By default, the `#time` data type follows the ISO 8601 standard, precisely in the format `YYYY-MM-DD'T'hh:mm:ss.FZZ`. Further information on date-time patterns and formats can be found [here](/JsonSchema-DotNet/articles/datetime.html). The following example demonstrates how to specify a customized time format for the `#time` data type:
    +```stylus
    +%pragma TimeDataTypeFormat: "DD-MM-YYYY hh:mm:ss"
    +```
    +
     ### Floating Point Tolerance
     The `FloatingPointTolerance` pragma directive allows you to define the tolerance level for relative errors in floating-point numbers during calculations and computations carried out by the validation process. By default, this directive is set to `1E-10`, indicating a small tolerance. However, you have the flexibility to adjust this value to any desired number. To specify a custom tolerance value of `1E-07`, you can use the following notation as an example:
     ```stylus
    diff --git a/JsonSchema/doc/articles/functions.html b/JsonSchema/doc/articles/functions.html
    index 8bd7ad6..b4d055e 100644
    --- a/JsonSchema/doc/articles/functions.html
    +++ b/JsonSchema/doc/articles/functions.html
    @@ -345,6 +345,58 @@ 

    Date and Time

    #string target - @time(pattern)
     

    Both the @date and @time functions support a complete range of date-time patterns, enabling the precise definition of any date and time scenario. Therefore, these functions can be used interchangeably. When the sole consideration is the date or day of the month in a year, employing the @date function is the more convenient choice. In contrast, when it becomes necessary to specify a particular time on a date, the @time function is the more appropriate option. To learn more about date-time patterns, please refer to this page.

    +

    Date and Time Range

    +
    #datetime target - @range(#string start, #string end)
    +
    +

    Validates that the target date-time satisfies the range requirement specified by the parameters. It checks that the target date-time is from or after the start date-time specified and simultaneously until and before the end date-time specified. If not, a validation error will generate. The start and end parameters must be the string representation of the target data type, which can either be a #date or #time type.

    +

    If either the parameter values for start or end are unspecified or undefined, the undefined symbol ! can be used in place of either of these parameters. The following examples illustrate the various use cases of the @range function of the two variations described above, for the target type:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Ues CasesValid ValuesInvalid Values
    @range("2010-01-01", "2010-12-31")2010-01-01; 2010-06-30; 2010-12-312009-12-31; 2011-01-01; 2030-11-05
    @range("2010-01-01T00:00:00.000Z", "2010-12-31T23:59:59.999Z")2010-01-01T00:00:00.000Z; 2010-12-31T23:59:59.999Z2009-12-31T23:59:59.999Z
    @range(!, "2010-12-31")1990-01-01; 2010-12-312011-01-01; 2030-11-05
    @range("2010-01-01", !)2010-01-01; 2030-11-051990-01-01; 2009-12-31
    +

    Date and Time Start

    +
    #datetime target - @start(#string reference)
    +
    +

    Validates that the target date-time starts from or finds after the specified reference date-time parameter. If the target date-time finds before the reference date-time, a validation error is triggered. The reference parameter must be the string representation of the target data type, which can either be a #date or #time type.

    +

    Date and Time End

    +
    #datetime target - @end(#string reference)
    +
    +

    Validates that the target date-time finds before or ends at the specified reference date-time parameter. If the target date-time finds after the reference date-time, a validation error is triggered. The reference parameter must be the string representation of the target data type, which can either be a #date or #time type.

    +

    Date and Time Before

    +
    #datetime target - @before(#string reference)
    +
    +

    Validates that the target date-time is exclusively before the reference date-time. If the target date-time finds on or after the reference date-time, a validation error is triggered. The reference parameter must be the string representation of the target data type, which can either be a #date or #time type.

    +

    Date and Time After

    +
    #datetime target - @after(#string reference)
    +
    +

    Validates that the target date-time is exclusively after the reference date-time. If the target date-time finds on or before the reference date-time, a validation error is triggered. The reference parameter must be the string representation of the target data type, which can either be a #date or #time type.

    Number Positive

    #number target - @positive
     
    diff --git a/JsonSchema/doc/articles/functions.md b/JsonSchema/doc/articles/functions.md index 2008ed9..4dec7d8 100644 --- a/JsonSchema/doc/articles/functions.md +++ b/JsonSchema/doc/articles/functions.md @@ -185,6 +185,44 @@ Validates that the `target` string matches the date and time pattern specified b ``` Both the `@date` and `@time` functions support a complete range of date-time patterns, enabling the precise definition of any date and time scenario. Therefore, these functions can be used interchangeably. When the sole consideration is the date or day of the month in a year, employing the `@date` function is the more convenient choice. In contrast, when it becomes necessary to specify a particular time on a date, the `@time` function is the more appropriate option. To learn more about date-time patterns, please refer to [this page](/JsonSchema-DotNet/articles/datetime.html). +### Date and Time Range +```stylus +#datetime target - @range(#string start, #string end) +``` +Validates that the `target` date-time satisfies the range requirement specified by the parameters. It checks that the `target` date-time is from or after the `start` date-time specified and simultaneously until and before the `end` date-time specified. If not, a validation error will generate. The `start` and `end` parameters must be the string representation of the `target` data type, which can either be a `#date` or `#time` type. + +If either the parameter values for `start` or `end` are unspecified or undefined, the `undefined` symbol `!` can be used in place of either of these parameters. The following examples illustrate the various use cases of the `@range` function of the two variations described above, for the target type: + +| Ues Cases | Valid Values | Invalid Values | +|------------------------------------------------------------------|--------------------------------------------------------|------------------------------------------| +| `@range("2010-01-01", "2010-12-31")` | `2010-01-01`; `2010-06-30`; `2010-12-31` | `2009-12-31`; `2011-01-01`; `2030-11-05` | +| `@range("2010-01-01T00:00:00.000Z", "2010-12-31T23:59:59.999Z")` | `2010-01-01T00:00:00.000Z`; `2010-12-31T23:59:59.999Z` | `2009-12-31T23:59:59.999Z` | +| `@range(!, "2010-12-31")` | `1990-01-01`; `2010-12-31` | `2011-01-01`; `2030-11-05` | +| `@range("2010-01-01", !)` | `2010-01-01`; `2030-11-05` | `1990-01-01`; `2009-12-31` | + +### Date and Time Start +```stylus +#datetime target - @start(#string reference) +``` +Validates that the `target` date-time starts from or finds after the specified `reference` date-time parameter. If the `target` date-time finds before the `reference` date-time, a validation error is triggered. The `reference` parameter must be the string representation of the `target` data type, which can either be a `#date` or `#time` type. + +### Date and Time End +```stylus +#datetime target - @end(#string reference) +``` +Validates that the `target` date-time finds before or ends at the specified `reference` date-time parameter. If the `target` date-time finds after the `reference` date-time, a validation error is triggered. The `reference` parameter must be the string representation of the `target` data type, which can either be a `#date` or `#time` type. + +### Date and Time Before +```stylus +#datetime target - @before(#string reference) +``` +Validates that the `target` date-time is exclusively before the `reference` date-time. If the `target` date-time finds on or after the `reference` date-time, a validation error is triggered. The `reference` parameter must be the string representation of the `target` data type, which can either be a `#date` or `#time` type. + +### Date and Time After +```stylus +#datetime target - @after(#string reference) +``` +Validates that the `target` date-time is exclusively after the `reference` date-time. If the `target` date-time finds on or before the `reference` date-time, a validation error is triggered. The `reference` parameter must be the string representation of the `target` data type, which can either be a `#date` or `#time` type. ### Number Positive ```stylus @@ -214,4 +252,4 @@ Validates that the `target` array is not empty. If the `target` array is empty, ```stylus #object target - @nonempty ``` -Validates that the `target` object is not empty. If the `target` object is empty, it generates a validation error. +Validates that the `target` object is not empty. If the `target` object is empty, it generates a validation error. \ No newline at end of file diff --git a/JsonSchema/doc/articles/quickstart.html b/JsonSchema/doc/articles/quickstart.html index 1325240..81de426 100644 --- a/JsonSchema/doc/articles/quickstart.html +++ b/JsonSchema/doc/articles/quickstart.html @@ -78,7 +78,7 @@
    Table of Contents

    Getting Started

    -

    This guide will walk you through the essential steps to quickly get up and running with New JSON Schema library. It is also assumes a modest familiarity with the .NET SDK and .NET CLI (command-line interface) toolchain including basic familiarity with NuGet packages. Additionally, it considers a certain level of knowledge in C# language.

    +

    This guide will walk you through the essential steps to quickly get up and running with the New JSON Schema library. It is also assumed a modest familiarity with the C# language, .NET SDK, and .NET CLI (command-line interface), including basic familiarity with NuGet packages.

    NuGet Library Package

    To get started, launch your preferred IDE (such as Visual Studio, JetBrains Rider, or VS Code) and open the C# project where you intend to include this library package. Within your IDE, navigate to the NuGet package manager and search for the package by the name 'RelogicLabs.JsonSchema'. Subsequently, proceed to add or install the package to your project. Alternatively, you can use the .NET CLI to add the package to your project. Simply run the following command, replacing 1.x.x with either the latest version or your preferred version:

    dotnet add package RelogicLabs.JsonSchema --version 1.x.x
    @@ -90,7 +90,7 @@ 

    NuGet Library Package

    For additional information regarding this library package, you can visit the NuGet package repository page of this library here.

    Write a Sample to Test

    -

    With all the necessary components in place, you are now ready to create a sample schema and validate a corresponding JSON against the schema. The subsequent example presents a C# class featuring a method designed for validating a sample JSON based on a provided schema. If you are working with C# 11 or above, you can enhance the code further by utilizing new C# language features like raw string literals, file scoped namespaces and others.

    +

    With all the necessary components in place, you are now ready to create a sample schema and validate a corresponding JSON against the schema. The subsequent example presents a C# class featuring a method designed for validating a sample JSON based on a provided schema. If you are working with C# 11 or above, you can enhance the code further by utilizing new language features like raw string literals, file scoped namespaces and others.

    using RelogicLabs.JsonSchema;
     
     namespace CSharpApplication
    diff --git a/JsonSchema/doc/articles/quickstart.md b/JsonSchema/doc/articles/quickstart.md
    index 6c08e41..0ed3d1f 100644
    --- a/JsonSchema/doc/articles/quickstart.md
    +++ b/JsonSchema/doc/articles/quickstart.md
    @@ -1,5 +1,5 @@
     # Getting Started
    -This guide will walk you through the essential steps to quickly get up and running with New JSON Schema library. It is also assumes a modest familiarity with the .NET SDK and .NET CLI (command-line interface) toolchain including basic familiarity with NuGet packages. Additionally, it considers a certain level of knowledge in C# language.
    +This guide will walk you through the essential steps to quickly get up and running with the New JSON Schema library. It is also assumed a modest familiarity with the C# language, .NET SDK, and .NET CLI (command-line interface), including basic familiarity with NuGet packages.
     
     ## NuGet Library Package
     To get started, launch your preferred IDE (such as Visual Studio, JetBrains Rider, or VS Code) and open the C# project where you intend to include this library package. Within your IDE, navigate to the NuGet package manager and search for the package by the name 'RelogicLabs.JsonSchema'. Subsequently, proceed to add or install the package to your project. Alternatively, you can use the .NET CLI to add the package to your project. Simply run the following command, replacing `1.x.x` with either the latest version or your preferred version:
    @@ -15,7 +15,7 @@ To verify the successful integration of the library into your project, you may m
     For additional information regarding this library package, you can visit the NuGet package repository page of this library [here](https://www.nuget.org/packages/RelogicLabs.JsonSchema).
     
     ## Write a Sample to Test
    -With all the necessary components in place, you are now ready to create a sample schema and validate a corresponding JSON against the schema. The subsequent example presents a C# class featuring a method designed for validating a sample JSON based on a provided schema. If you are working with C# 11 or above, you can enhance the code further by utilizing new C# language features like raw string literals, file scoped namespaces and others.
    +With all the necessary components in place, you are now ready to create a sample schema and validate a corresponding JSON against the schema. The subsequent example presents a C# class featuring a method designed for validating a sample JSON based on a provided schema. If you are working with C# 11 or above, you can enhance the code further by utilizing new language features like raw string literals, file scoped namespaces and others.
     ```c#
     using RelogicLabs.JsonSchema;
     
    diff --git a/JsonSchema/doc/articles/sourcebuild.html b/JsonSchema/doc/articles/sourcebuild.html
    index 98b34d3..e4f4907 100644
    --- a/JsonSchema/doc/articles/sourcebuild.html
    +++ b/JsonSchema/doc/articles/sourcebuild.html
    @@ -78,7 +78,7 @@ 
    Table of Contents

    Build from Source Code

    -

    This comprehensive guide illustrates the procedures for retrieving source code from a GitHub repository, compiling the project source code into a library, and seamlessly integrating the compiled library into your project. Within this document, we will navigate through these steps, presenting them clearly and straightforwardly.

    +

    This comprehensive guide illustrates the procedures for retrieving source code from a GitHub repository, compiling the project source code into a library, and seamlessly integrating the compiled library into your project. It is essential to have a foundational understanding of the C# language, as well as a modest level of familiarity with the .NET SDK and CLI.

    Build the Library

    To get started, clone the project from the following URL using your preferred Git client (command line or GUI). You can open a terminal and enter the following Git clone command as shown below:

    git clone https://github.com/relogiclabs/JsonSchema-DotNet.git
    diff --git a/JsonSchema/doc/articles/sourcebuild.md b/JsonSchema/doc/articles/sourcebuild.md
    index db46be8..a0643f6 100644
    --- a/JsonSchema/doc/articles/sourcebuild.md
    +++ b/JsonSchema/doc/articles/sourcebuild.md
    @@ -1,5 +1,5 @@
     # Build from Source Code
    -This comprehensive guide illustrates the procedures for retrieving source code from a GitHub repository, compiling the project source code into a library, and seamlessly integrating the compiled library into your project. Within this document, we will navigate through these steps, presenting them clearly and straightforwardly.
    +This comprehensive guide illustrates the procedures for retrieving source code from a GitHub repository, compiling the project source code into a library, and seamlessly integrating the compiled library into your project. It is essential to have a foundational understanding of the C# language, as well as a modest level of familiarity with the .NET SDK and CLI.
     
     ## Build the Library
     To get started, clone the project from the following URL using your preferred Git client (command line or GUI). You can open a terminal and enter the following Git clone command as shown below:
    @@ -168,4 +168,4 @@ Actual (Json Line: 3:30): found #string inferred by "not number"
        at RelogicLabs.JsonSchema.JsonAssert.IsValid(String schemaExpected, String jsonActual)
        at CSharpApplication.SampleSchema.CheckIsValid() in /SampleSchema.cs:line 62
     ```
    -For more information about the schema syntax format and library functionalities, please refer to the reference documentation [here](/JsonSchema-DotNet/api/index.html).
    +For more information about the schema syntax format and library functionalities, please refer to the reference documentation [here](/JsonSchema-DotNet/api/index.html).
    \ No newline at end of file
    diff --git a/JsonSchema/doc/index.json b/JsonSchema/doc/index.json
    index 5a7cea3..4f9acac 100644
    --- a/JsonSchema/doc/index.json
    +++ b/JsonSchema/doc/index.json
    @@ -137,12 +137,12 @@
       "api/RelogicLabs.JsonSchema.Functions.CoreFunctions.html": {
         "href": "api/RelogicLabs.JsonSchema.Functions.CoreFunctions.html",
         "title": "Class CoreFunctions | Json Schema",
    -    "keywords": "Class CoreFunctions Namespace RelogicLabs.JsonSchema.Functions Assembly RelogicLabs.JsonSchema.dll public sealed class CoreFunctions : FunctionBase Inheritance object FunctionBase CoreFunctions Inherited Members FunctionBase.Runtime FunctionBase.Function object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.ReferenceEquals(object, object) object.ToString() Constructors CoreFunctions(RuntimeContext) public CoreFunctions(RuntimeContext runtime) Parameters runtime RuntimeContext Methods Date(JString, JString) public bool Date(JString target, JString pattern) Parameters target JString pattern JString Returns bool Elements(JArray, params JNode[]) public bool Elements(JArray target, params JNode[] items) Parameters target JArray items JNode[] Returns bool Email(JString) public bool Email(JString target) Parameters target JString Returns bool Enum(JNumber, params JNumber[]) public bool Enum(JNumber target, params JNumber[] items) Parameters target JNumber items JNumber[] Returns bool Enum(JString, params JString[]) public bool Enum(JString target, params JString[] items) Parameters target JString items JString[] Returns bool Keys(JObject, params JString[]) public bool Keys(JObject target, params JString[] items) Parameters target JObject items JString[] Returns bool Length(JArray, JInteger) public bool Length(JArray target, JInteger length) Parameters target JArray length JInteger Returns bool Length(JArray, JInteger, JInteger) public bool Length(JArray target, JInteger minimum, JInteger maximum) Parameters target JArray minimum JInteger maximum JInteger Returns bool Length(JArray, JInteger, JUndefined) public bool Length(JArray target, JInteger minimum, JUndefined undefined) Parameters target JArray minimum JInteger undefined JUndefined Returns bool Length(JArray, JUndefined, JInteger) public bool Length(JArray target, JUndefined undefined, JInteger maximum) Parameters target JArray undefined JUndefined maximum JInteger Returns bool Length(JObject, JInteger) public bool Length(JObject target, JInteger length) Parameters target JObject length JInteger Returns bool Length(JObject, JInteger, JInteger) public bool Length(JObject target, JInteger minimum, JInteger maximum) Parameters target JObject minimum JInteger maximum JInteger Returns bool Length(JObject, JInteger, JUndefined) public bool Length(JObject target, JInteger minimum, JUndefined undefined) Parameters target JObject minimum JInteger undefined JUndefined Returns bool Length(JObject, JUndefined, JInteger) public bool Length(JObject target, JUndefined undefined, JInteger maximum) Parameters target JObject undefined JUndefined maximum JInteger Returns bool Length(JString, JInteger) public bool Length(JString target, JInteger length) Parameters target JString length JInteger Returns bool Length(JString, JInteger, JInteger) public bool Length(JString target, JInteger minimum, JInteger maximum) Parameters target JString minimum JInteger maximum JInteger Returns bool Length(JString, JInteger, JUndefined) public bool Length(JString target, JInteger minimum, JUndefined undefined) Parameters target JString minimum JInteger undefined JUndefined Returns bool Length(JString, JUndefined, JInteger) public bool Length(JString target, JUndefined undefined, JInteger maximum) Parameters target JString undefined JUndefined maximum JInteger Returns bool Maximum(JNumber, JNumber) public bool Maximum(JNumber target, JNumber maximum) Parameters target JNumber maximum JNumber Returns bool Maximum(JNumber, JNumber, JBoolean) public bool Maximum(JNumber target, JNumber maximum, JBoolean exclusive) Parameters target JNumber maximum JNumber exclusive JBoolean Returns bool Minimum(JNumber, JNumber) public bool Minimum(JNumber target, JNumber minimum) Parameters target JNumber minimum JNumber Returns bool Minimum(JNumber, JNumber, JBoolean) public bool Minimum(JNumber target, JNumber minimum, JBoolean exclusive) Parameters target JNumber minimum JNumber exclusive JBoolean Returns bool Negative(JNumber) public bool Negative(JNumber target) Parameters target JNumber Returns bool Nonempty(JArray) public bool Nonempty(JArray target) Parameters target JArray Returns bool Nonempty(JObject) public bool Nonempty(JObject target) Parameters target JObject Returns bool Nonempty(JString) public bool Nonempty(JString target) Parameters target JString Returns bool Phone(JString) public bool Phone(JString target) Parameters target JString Returns bool Positive(JNumber) public bool Positive(JNumber target) Parameters target JNumber Returns bool Range(JNumber, JNumber, JNumber) public bool Range(JNumber target, JNumber minimum, JNumber maximum) Parameters target JNumber minimum JNumber maximum JNumber Returns bool Range(JNumber, JNumber, JUndefined) public bool Range(JNumber target, JNumber minimum, JUndefined undefined) Parameters target JNumber minimum JNumber undefined JUndefined Returns bool Range(JNumber, JUndefined, JNumber) public bool Range(JNumber target, JUndefined undefined, JNumber maximum) Parameters target JNumber undefined JUndefined maximum JNumber Returns bool Regex(JString, JString) public bool Regex(JString target, JString pattern) Parameters target JString pattern JString Returns bool Time(JString, JString) public bool Time(JString target, JString pattern) Parameters target JString pattern JString Returns bool Url(JString) public bool Url(JString target) Parameters target JString Returns bool Url(JString, JString) public bool Url(JString target, JString scheme) Parameters target JString scheme JString Returns bool Values(JObject, params JNode[]) public bool Values(JObject target, params JNode[] items) Parameters target JObject items JNode[] Returns bool"
    +    "keywords": "Class CoreFunctions Namespace RelogicLabs.JsonSchema.Functions Assembly RelogicLabs.JsonSchema.dll public sealed class CoreFunctions : FunctionBase Inheritance object FunctionBase CoreFunctions Inherited Members FunctionBase.Runtime FunctionBase.Function FunctionBase.FailWith(JsonSchemaException) object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.ReferenceEquals(object, object) object.ToString() Constructors CoreFunctions(RuntimeContext) public CoreFunctions(RuntimeContext runtime) Parameters runtime RuntimeContext Methods After(JDateTime, JString) public bool After(JDateTime target, JString reference) Parameters target JDateTime reference JString Returns bool Before(JDateTime, JString) public bool Before(JDateTime target, JString reference) Parameters target JDateTime reference JString Returns bool Date(JString, JString) public bool Date(JString target, JString pattern) Parameters target JString pattern JString Returns bool Elements(JArray, params JNode[]) public bool Elements(JArray target, params JNode[] items) Parameters target JArray items JNode[] Returns bool Email(JString) public bool Email(JString target) Parameters target JString Returns bool End(JDateTime, JString) public bool End(JDateTime target, JString reference) Parameters target JDateTime reference JString Returns bool Enum(JNumber, params JNumber[]) public bool Enum(JNumber target, params JNumber[] items) Parameters target JNumber items JNumber[] Returns bool Enum(JString, params JString[]) public bool Enum(JString target, params JString[] items) Parameters target JString items JString[] Returns bool Keys(JObject, params JString[]) public bool Keys(JObject target, params JString[] items) Parameters target JObject items JString[] Returns bool Length(JArray, JInteger) public bool Length(JArray target, JInteger length) Parameters target JArray length JInteger Returns bool Length(JArray, JInteger, JInteger) public bool Length(JArray target, JInteger minimum, JInteger maximum) Parameters target JArray minimum JInteger maximum JInteger Returns bool Length(JArray, JInteger, JUndefined) public bool Length(JArray target, JInteger minimum, JUndefined undefined) Parameters target JArray minimum JInteger undefined JUndefined Returns bool Length(JArray, JUndefined, JInteger) public bool Length(JArray target, JUndefined undefined, JInteger maximum) Parameters target JArray undefined JUndefined maximum JInteger Returns bool Length(JObject, JInteger) public bool Length(JObject target, JInteger length) Parameters target JObject length JInteger Returns bool Length(JObject, JInteger, JInteger) public bool Length(JObject target, JInteger minimum, JInteger maximum) Parameters target JObject minimum JInteger maximum JInteger Returns bool Length(JObject, JInteger, JUndefined) public bool Length(JObject target, JInteger minimum, JUndefined undefined) Parameters target JObject minimum JInteger undefined JUndefined Returns bool Length(JObject, JUndefined, JInteger) public bool Length(JObject target, JUndefined undefined, JInteger maximum) Parameters target JObject undefined JUndefined maximum JInteger Returns bool Length(JString, JInteger) public bool Length(JString target, JInteger length) Parameters target JString length JInteger Returns bool Length(JString, JInteger, JInteger) public bool Length(JString target, JInteger minimum, JInteger maximum) Parameters target JString minimum JInteger maximum JInteger Returns bool Length(JString, JInteger, JUndefined) public bool Length(JString target, JInteger minimum, JUndefined undefined) Parameters target JString minimum JInteger undefined JUndefined Returns bool Length(JString, JUndefined, JInteger) public bool Length(JString target, JUndefined undefined, JInteger maximum) Parameters target JString undefined JUndefined maximum JInteger Returns bool Maximum(JNumber, JNumber) public bool Maximum(JNumber target, JNumber maximum) Parameters target JNumber maximum JNumber Returns bool Maximum(JNumber, JNumber, JBoolean) public bool Maximum(JNumber target, JNumber maximum, JBoolean exclusive) Parameters target JNumber maximum JNumber exclusive JBoolean Returns bool Minimum(JNumber, JNumber) public bool Minimum(JNumber target, JNumber minimum) Parameters target JNumber minimum JNumber Returns bool Minimum(JNumber, JNumber, JBoolean) public bool Minimum(JNumber target, JNumber minimum, JBoolean exclusive) Parameters target JNumber minimum JNumber exclusive JBoolean Returns bool Negative(JNumber) public bool Negative(JNumber target) Parameters target JNumber Returns bool Nonempty(JArray) public bool Nonempty(JArray target) Parameters target JArray Returns bool Nonempty(JObject) public bool Nonempty(JObject target) Parameters target JObject Returns bool Nonempty(JString) public bool Nonempty(JString target) Parameters target JString Returns bool Phone(JString) public bool Phone(JString target) Parameters target JString Returns bool Positive(JNumber) public bool Positive(JNumber target) Parameters target JNumber Returns bool Range(JDateTime, JString, JString) public bool Range(JDateTime target, JString start, JString end) Parameters target JDateTime start JString end JString Returns bool Range(JDateTime, JString, JUndefined) public bool Range(JDateTime target, JString start, JUndefined end) Parameters target JDateTime start JString end JUndefined Returns bool Range(JDateTime, JUndefined, JString) public bool Range(JDateTime target, JUndefined start, JString end) Parameters target JDateTime start JUndefined end JString Returns bool Range(JNumber, JNumber, JNumber) public bool Range(JNumber target, JNumber minimum, JNumber maximum) Parameters target JNumber minimum JNumber maximum JNumber Returns bool Range(JNumber, JNumber, JUndefined) public bool Range(JNumber target, JNumber minimum, JUndefined undefined) Parameters target JNumber minimum JNumber undefined JUndefined Returns bool Range(JNumber, JUndefined, JNumber) public bool Range(JNumber target, JUndefined undefined, JNumber maximum) Parameters target JNumber undefined JUndefined maximum JNumber Returns bool Regex(JString, JString) public bool Regex(JString target, JString pattern) Parameters target JString pattern JString Returns bool Start(JDateTime, JString) public bool Start(JDateTime target, JString reference) Parameters target JDateTime reference JString Returns bool Time(JString, JString) public bool Time(JString target, JString pattern) Parameters target JString pattern JString Returns bool Url(JString) public bool Url(JString target) Parameters target JString Returns bool Url(JString, JString) public bool Url(JString target, JString scheme) Parameters target JString scheme JString Returns bool Values(JObject, params JNode[]) public bool Values(JObject target, params JNode[] items) Parameters target JObject items JNode[] Returns bool"
       },
       "api/RelogicLabs.JsonSchema.Functions.FunctionBase.html": {
         "href": "api/RelogicLabs.JsonSchema.Functions.FunctionBase.html",
         "title": "Class FunctionBase | Json Schema",
    -    "keywords": "Class FunctionBase Namespace RelogicLabs.JsonSchema.Functions Assembly RelogicLabs.JsonSchema.dll public abstract class FunctionBase Inheritance object FunctionBase Derived CoreFunctions Inherited Members object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) object.ToString() Constructors FunctionBase(RuntimeContext) protected FunctionBase(RuntimeContext runtime) Parameters runtime RuntimeContext Properties Function public JFunction Function { get; set; } Property Value JFunction Runtime public RuntimeContext Runtime { get; } Property Value RuntimeContext Methods FailWith(JsonSchemaException) protected bool FailWith(JsonSchemaException exception) Parameters exception JsonSchemaException Returns bool"
    +    "keywords": "Class FunctionBase Namespace RelogicLabs.JsonSchema.Functions Assembly RelogicLabs.JsonSchema.dll public abstract class FunctionBase Inheritance object FunctionBase Derived CoreFunctions Inherited Members object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) object.ToString() Constructors FunctionBase(RuntimeContext) protected FunctionBase(RuntimeContext runtime) Parameters runtime RuntimeContext Properties Function public JFunction Function { get; set; } Property Value JFunction Runtime public RuntimeContext Runtime { get; } Property Value RuntimeContext Methods FailWith(JsonSchemaException) public bool FailWith(JsonSchemaException exception) Parameters exception JsonSchemaException Returns bool"
       },
       "api/RelogicLabs.JsonSchema.Functions.html": {
         "href": "api/RelogicLabs.JsonSchema.Functions.html",
    @@ -194,15 +194,35 @@
         "title": "Class MessageFormatter | Json Schema",
         "keywords": "Class MessageFormatter Namespace RelogicLabs.JsonSchema.Message Assembly RelogicLabs.JsonSchema.dll public abstract class MessageFormatter Inheritance object MessageFormatter Inherited Members object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) object.ToString() Fields JsonAssertion public static readonly MessageFormatter JsonAssertion Field Value MessageFormatter SchemaAssertion public static readonly MessageFormatter SchemaAssertion Field Value MessageFormatter SchemaValidation public static readonly MessageFormatter SchemaValidation Field Value MessageFormatter Properties Actual public string Actual { get; } Property Value string Expected public string Expected { get; } Property Value string OutlineLength public int OutlineLength { get; set; } Property Value int Summary public string Summary { get; } Property Value string Methods CreateOutline(string) public string CreateOutline(string target) Parameters target string Returns string"
       },
    +  "api/RelogicLabs.JsonSchema.Time.DateTimeType.html": {
    +    "href": "api/RelogicLabs.JsonSchema.Time.DateTimeType.html",
    +    "title": "Class DateTimeType | Json Schema",
    +    "keywords": "Class DateTimeType Namespace RelogicLabs.JsonSchema.Time Assembly RelogicLabs.JsonSchema.dll public sealed class DateTimeType Inheritance object DateTimeType Inherited Members object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.ReferenceEquals(object, object) Fields DATE_TYPE public static readonly DateTimeType DATE_TYPE Field Value DateTimeType TIME_TYPE public static readonly DateTimeType TIME_TYPE Field Value DateTimeType Properties Name public string Name { get; } Property Value string Type public JsonType Type { get; } Property Value JsonType Methods ToString() Returns a string that represents the current object. public override string ToString() Returns string A string that represents the current object."
    +  },
    +  "api/RelogicLabs.JsonSchema.Time.html": {
    +    "href": "api/RelogicLabs.JsonSchema.Time.html",
    +    "title": "Namespace RelogicLabs.JsonSchema.Time | Json Schema",
    +    "keywords": "Namespace RelogicLabs.JsonSchema.Time Classes DateTimeType JsonDateTime"
    +  },
    +  "api/RelogicLabs.JsonSchema.Time.JsonDateTime.html": {
    +    "href": "api/RelogicLabs.JsonSchema.Time.JsonDateTime.html",
    +    "title": "Class JsonDateTime | Json Schema",
    +    "keywords": "Class JsonDateTime Namespace RelogicLabs.JsonSchema.Time Assembly RelogicLabs.JsonSchema.dll public class JsonDateTime Inheritance object JsonDateTime Inherited Members object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) Fields UNSET public const int UNSET = -1000 Field Value int Properties Day public int Day { get; } Property Value int Fraction public int Fraction { get; } Property Value int Hour public int Hour { get; } Property Value int Minute public int Minute { get; } Property Value int Month public int Month { get; } Property Value int Second public int Second { get; } Property Value int Type public DateTimeType Type { get; } Property Value DateTimeType UtcHour public int UtcHour { get; } Property Value int UtcMinute public int UtcMinute { get; } Property Value int Year public int Year { get; } Property Value int Methods Compare(JsonDateTime) public int Compare(JsonDateTime other) Parameters other JsonDateTime Returns int GetDayOfWeek() public DayOfWeek? GetDayOfWeek() Returns DayOfWeek? ToString() Returns a string that represents the current object. public override string ToString() Returns string A string that represents the current object."
    +  },
       "api/RelogicLabs.JsonSchema.Tree.Context.html": {
         "href": "api/RelogicLabs.JsonSchema.Tree.Context.html",
         "title": "Class Context | Json Schema",
         "keywords": "Class Context Namespace RelogicLabs.JsonSchema.Tree Assembly RelogicLabs.JsonSchema.dll public sealed class Context Inheritance object Context Inherited Members object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.ReferenceEquals(object, object) object.ToString() Constructors Context(ParserRuleContext, RuntimeContext) public Context(ParserRuleContext parser, RuntimeContext runtime) Parameters parser ParserRuleContext runtime RuntimeContext Properties Parser public ParserRuleContext Parser { get; } Property Value ParserRuleContext Runtime public RuntimeContext Runtime { get; } Property Value RuntimeContext Methods GetLocation() public Location GetLocation() Returns Location GetText() public string GetText() Returns string"
       },
    +  "api/RelogicLabs.JsonSchema.Tree.FunctionRegistry.html": {
    +    "href": "api/RelogicLabs.JsonSchema.Tree.FunctionRegistry.html",
    +    "title": "Class FunctionRegistry | Json Schema",
    +    "keywords": "Class FunctionRegistry Namespace RelogicLabs.JsonSchema.Tree Assembly RelogicLabs.JsonSchema.dll public sealed class FunctionRegistry Inheritance object FunctionRegistry Inherited Members object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.ReferenceEquals(object, object) object.ToString() Constructors FunctionRegistry(RuntimeContext) public FunctionRegistry(RuntimeContext runtime) Parameters runtime RuntimeContext Methods AddClass(JInclude) public JInclude AddClass(JInclude include) Parameters include JInclude Returns JInclude AddClass(string, Context?) public void AddClass(string className, Context? context = null) Parameters className string context Context InvokeFunction(JFunction, JNode) public bool InvokeFunction(JFunction function, JNode target) Parameters function JFunction target JNode Returns bool"
    +  },
       "api/RelogicLabs.JsonSchema.Tree.html": {
         "href": "api/RelogicLabs.JsonSchema.Tree.html",
         "title": "Namespace RelogicLabs.JsonSchema.Tree | Json Schema",
    -    "keywords": "Namespace RelogicLabs.JsonSchema.Tree Classes Context JsonTree RuntimeContext SchemaTree Structs Location"
    +    "keywords": "Namespace RelogicLabs.JsonSchema.Tree Classes Context FunctionRegistry JsonTree PragmaRegistry RuntimeContext SchemaTree Structs Location"
       },
       "api/RelogicLabs.JsonSchema.Tree.JsonTree.html": {
         "href": "api/RelogicLabs.JsonSchema.Tree.JsonTree.html",
    @@ -214,10 +234,15 @@
         "title": "Struct Location | Json Schema",
         "keywords": "Struct Location Namespace RelogicLabs.JsonSchema.Tree Assembly RelogicLabs.JsonSchema.dll public readonly record struct Location : IEquatable Implements IEquatable Inherited Members ValueType.Equals(object) ValueType.GetHashCode() object.Equals(object, object) object.GetType() object.ReferenceEquals(object, object) Constructors Location(int, int) public Location(int Line, int Column) Parameters Line int Column int Properties Column public int Column { get; init; } Property Value int Line public int Line { get; init; } Property Value int Methods From(IToken) public static Location From(IToken token) Parameters token IToken Returns Location ToString() Returns the fully qualified type name of this instance. public override string ToString() Returns string The fully qualified type name."
       },
    +  "api/RelogicLabs.JsonSchema.Tree.PragmaRegistry.html": {
    +    "href": "api/RelogicLabs.JsonSchema.Tree.PragmaRegistry.html",
    +    "title": "Class PragmaRegistry | Json Schema",
    +    "keywords": "Class PragmaRegistry Namespace RelogicLabs.JsonSchema.Tree Assembly RelogicLabs.JsonSchema.dll public sealed class PragmaRegistry Inheritance object PragmaRegistry Inherited Members object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.ReferenceEquals(object, object) object.ToString() Constructors PragmaRegistry() public PragmaRegistry() Properties DateDataTypeFormat public string DateDataTypeFormat { get; } Property Value string FloatingPointTolerance public double FloatingPointTolerance { get; } Property Value double IgnoreObjectPropertyOrder public bool IgnoreObjectPropertyOrder { get; } Property Value bool IgnoreUndefinedProperties public bool IgnoreUndefinedProperties { get; } Property Value bool TimeDataTypeFormat public string TimeDataTypeFormat { get; } Property Value string Methods AddPragma(JPragma) public JPragma AddPragma(JPragma pragma) Parameters pragma JPragma Returns JPragma GetPragma(string) public JPragma? GetPragma(string name) Parameters name string Returns JPragma GetPragmaValue(string) public T GetPragmaValue(string name) Parameters name string Returns T Type Parameters T"
    +  },
       "api/RelogicLabs.JsonSchema.Tree.RuntimeContext.html": {
         "href": "api/RelogicLabs.JsonSchema.Tree.RuntimeContext.html",
         "title": "Class RuntimeContext | Json Schema",
    -    "keywords": "Class RuntimeContext Namespace RelogicLabs.JsonSchema.Tree Assembly RelogicLabs.JsonSchema.dll public sealed class RuntimeContext Inheritance object RuntimeContext Inherited Members object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.ReferenceEquals(object, object) object.ToString() Properties Definitions public Dictionary Definitions { get; } Property Value Dictionary Exceptions public Queue Exceptions { get; } Property Value Queue FloatingPointTolerance public double FloatingPointTolerance { get; } Property Value double IgnoreObjectPropertyOrder public bool IgnoreObjectPropertyOrder { get; } Property Value bool IgnoreUndefinedProperties public bool IgnoreUndefinedProperties { get; } Property Value bool ThrowException public bool ThrowException { get; set; } Property Value bool Methods AddClass(JInclude) public JInclude AddClass(JInclude include) Parameters include JInclude Returns JInclude AddClass(string, Context?) public void AddClass(string className, Context? context = null) Parameters className string context Context AddDefinition(JDefinition) public JDefinition AddDefinition(JDefinition definition) Parameters definition JDefinition Returns JDefinition AddPragma(JPragma) public JPragma AddPragma(JPragma pragma) Parameters pragma JPragma Returns JPragma GetPragmaValue(string) public T GetPragmaValue(string name) Parameters name string Returns T Type Parameters T InvokeFunction(JFunction, JNode) public bool InvokeFunction(JFunction function, JNode target) Parameters function JFunction target JNode Returns bool"
    +    "keywords": "Class RuntimeContext Namespace RelogicLabs.JsonSchema.Tree Assembly RelogicLabs.JsonSchema.dll public sealed class RuntimeContext Inheritance object RuntimeContext Inherited Members object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.ReferenceEquals(object, object) object.ToString() Properties Definitions public Dictionary Definitions { get; } Property Value Dictionary Exceptions public Queue Exceptions { get; } Property Value Queue Functions public FunctionRegistry Functions { get; } Property Value FunctionRegistry Pragmas public PragmaRegistry Pragmas { get; } Property Value PragmaRegistry ThrowException public bool ThrowException { get; set; } Property Value bool Methods AddDefinition(JDefinition) public JDefinition AddDefinition(JDefinition definition) Parameters definition JDefinition Returns JDefinition Retrieve(string) public object? Retrieve(string name) Parameters name string Returns object Store(string, object) public void Store(string name, object value) Parameters name string value object"
       },
       "api/RelogicLabs.JsonSchema.Tree.SchemaTree.html": {
         "href": "api/RelogicLabs.JsonSchema.Tree.SchemaTree.html",
    @@ -227,7 +252,7 @@
       "api/RelogicLabs.JsonSchema.Types.html": {
         "href": "api/RelogicLabs.JsonSchema.Types.html",
         "title": "Namespace RelogicLabs.JsonSchema.Types | Json Schema",
    -    "keywords": "Namespace RelogicLabs.JsonSchema.Types Classes JAlias JArray JBoolean JBranch JComposite JDataType JDefinition JDirective JDouble JFloat JFunction JInclude JInteger JLeaf JNode JNull JNumber JObject JPragma JPrimitive JProperty JRoot JString JTitle JUndefined JValidator JVersion JsonType Interfaces IJsonType INestedMode IPragmaValue"
    +    "keywords": "Namespace RelogicLabs.JsonSchema.Types Classes JAlias JArray JBoolean JBranch JComposite JDataType JDate JDateTime JDefinition JDirective JDouble JFloat JFunction JInclude JInteger JLeaf JNode JNull JNumber JObject JPragma JPrimitive JProperty JRoot JString JTime JTitle JUndefined JValidator JVersion JsonType Interfaces IJsonType INestedMode IPragmaValue"
       },
       "api/RelogicLabs.JsonSchema.Types.IJsonType.html": {
         "href": "api/RelogicLabs.JsonSchema.Types.IJsonType.html",
    @@ -274,6 +299,16 @@
         "title": "Class JDataType | Json Schema",
         "keywords": "Class JDataType Namespace RelogicLabs.JsonSchema.Types Assembly RelogicLabs.JsonSchema.dll public sealed class JDataType : JBranch, INestedMode Inheritance object JNode JBranch JDataType Implements INestedMode Inherited Members JNode.Context JNode.Parent JNode.Children JNode.Parser JNode.Runtime JNode.GetOutline() object.Equals(object, object) object.GetType() object.ReferenceEquals(object, object) Properties Alias public JAlias? Alias { get; } Property Value JAlias JsonType public JsonType JsonType { get; } Property Value JsonType Nested public bool Nested { get; } Property Value bool Methods Equals(object?) Determines whether the specified object is equal to the current object. public override bool Equals(object? obj) Parameters obj object The object to compare with the current object. Returns bool true if the specified object is equal to the current object; otherwise, false. GetHashCode() Serves as the default hash function. public override int GetHashCode() Returns int A hash code for the current object. IsApplicable(JNode) public bool IsApplicable(JNode node) Parameters node JNode Returns bool Match(JNode) Determines whether the specified node matches with the current node. public override bool Match(JNode node) Parameters node JNode The node to compare with the current node. Returns bool true if the specified node matches with the current node; otherwise, false. ToString() Returns a JSON string that represents the current object. public override string ToString() Returns string A JSON string that represents the current object. ToString(bool) public string ToString(bool baseForm) Parameters baseForm bool Returns string"
       },
    +  "api/RelogicLabs.JsonSchema.Types.JDate.html": {
    +    "href": "api/RelogicLabs.JsonSchema.Types.JDate.html",
    +    "title": "Class JDate | Json Schema",
    +    "keywords": "Class JDate Namespace RelogicLabs.JsonSchema.Types Assembly RelogicLabs.JsonSchema.dll public class JDate : JDateTime, IJsonType, IPragmaValue Inheritance object JNode JLeaf JPrimitive JString JDateTime JDate Implements IJsonType IPragmaValue Inherited Members JDateTime.DateTime JString.Value JString.Match(JNode) JString.Equals(object) JString.GetHashCode() JString.ToString() JPrimitive.Node JNode.Context JNode.Parent JNode.Children JNode.Parser JNode.Runtime JNode.GetOutline() object.Equals(object, object) object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) Properties Type public override JsonType Type { get; } Property Value JsonType"
    +  },
    +  "api/RelogicLabs.JsonSchema.Types.JDateTime.html": {
    +    "href": "api/RelogicLabs.JsonSchema.Types.JDateTime.html",
    +    "title": "Class JDateTime | Json Schema",
    +    "keywords": "Class JDateTime Namespace RelogicLabs.JsonSchema.Types Assembly RelogicLabs.JsonSchema.dll public class JDateTime : JString, IJsonType, IPragmaValue Inheritance object JNode JLeaf JPrimitive JString JDateTime Implements IJsonType IPragmaValue Derived JDate JTime Inherited Members JString.Value JString.Match(JNode) JString.Equals(object) JString.GetHashCode() JString.ToString() JPrimitive.Node JNode.Context JNode.Parent JNode.Children JNode.Parser JNode.Runtime JNode.GetOutline() object.Equals(object, object) object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) Properties DateTime public JsonDateTime DateTime { get; } Property Value JsonDateTime Type public override JsonType Type { get; } Property Value JsonType"
    +  },
       "api/RelogicLabs.JsonSchema.Types.JDefinition.html": {
         "href": "api/RelogicLabs.JsonSchema.Types.JDefinition.html",
         "title": "Class JDefinition | Json Schema",
    @@ -357,12 +392,17 @@
       "api/RelogicLabs.JsonSchema.Types.JsonType.html": {
         "href": "api/RelogicLabs.JsonSchema.Types.JsonType.html",
         "title": "Class JsonType | Json Schema",
    -    "keywords": "Class JsonType Namespace RelogicLabs.JsonSchema.Types Assembly RelogicLabs.JsonSchema.dll public class JsonType Inheritance object JsonType Inherited Members object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) Fields ANY public static readonly JsonType ANY Field Value JsonType ARRAY public static readonly JsonType ARRAY Field Value JsonType BOOLEAN public static readonly JsonType BOOLEAN Field Value JsonType COMPOSITE public static readonly JsonType COMPOSITE Field Value JsonType DATE public static readonly JsonType DATE Field Value JsonType DOUBLE public static readonly JsonType DOUBLE Field Value JsonType FLOAT public static readonly JsonType FLOAT Field Value JsonType INTEGER public static readonly JsonType INTEGER Field Value JsonType NULL public static readonly JsonType NULL Field Value JsonType NUMBER public static readonly JsonType NUMBER Field Value JsonType OBJECT public static readonly JsonType OBJECT Field Value JsonType PRIMITIVE public static readonly JsonType PRIMITIVE Field Value JsonType STRING public static readonly JsonType STRING Field Value JsonType TIME public static readonly JsonType TIME Field Value JsonType Properties Name public string Name { get; } Property Value string Type public Type Type { get; } Property Value Type Methods Match(JNode, out string) public bool Match(JNode node, out string error) Parameters node JNode error string Returns bool ToString() Returns a string that represents the current object. public override string ToString() Returns string A string that represents the current object."
    +    "keywords": "Class JsonType Namespace RelogicLabs.JsonSchema.Types Assembly RelogicLabs.JsonSchema.dll public class JsonType Inheritance object JsonType Inherited Members object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) Fields ANY public static readonly JsonType ANY Field Value JsonType ARRAY public static readonly JsonType ARRAY Field Value JsonType BOOLEAN public static readonly JsonType BOOLEAN Field Value JsonType COMPOSITE public static readonly JsonType COMPOSITE Field Value JsonType DATE public static readonly JsonType DATE Field Value JsonType DATETIME public static readonly JsonType DATETIME Field Value JsonType DOUBLE public static readonly JsonType DOUBLE Field Value JsonType FLOAT public static readonly JsonType FLOAT Field Value JsonType INTEGER public static readonly JsonType INTEGER Field Value JsonType NULL public static readonly JsonType NULL Field Value JsonType NUMBER public static readonly JsonType NUMBER Field Value JsonType OBJECT public static readonly JsonType OBJECT Field Value JsonType PRIMITIVE public static readonly JsonType PRIMITIVE Field Value JsonType STRING public static readonly JsonType STRING Field Value JsonType TIME public static readonly JsonType TIME Field Value JsonType Properties Name public string Name { get; } Property Value string Type public Type Type { get; } Property Value Type Methods Match(JNode, out string) public bool Match(JNode node, out string error) Parameters node JNode error string Returns bool ToString() Returns a string that represents the current object. public override string ToString() Returns string A string that represents the current object."
       },
       "api/RelogicLabs.JsonSchema.Types.JString.html": {
         "href": "api/RelogicLabs.JsonSchema.Types.JString.html",
         "title": "Class JString | Json Schema",
    -    "keywords": "Class JString Namespace RelogicLabs.JsonSchema.Types Assembly RelogicLabs.JsonSchema.dll public sealed class JString : JPrimitive, IJsonType, IPragmaValue Inheritance object JNode JLeaf JPrimitive JString Implements IJsonType IPragmaValue Inherited Members JPrimitive.Node JNode.Context JNode.Parent JNode.Children JNode.Parser JNode.Runtime JNode.GetOutline() object.Equals(object, object) object.GetType() object.ReferenceEquals(object, object) Properties Type public override JsonType Type { get; } Property Value JsonType Value public string Value { get; } Property Value string Methods Equals(object?) Determines whether the specified object is equal to the current object. public override bool Equals(object? obj) Parameters obj object The object to compare with the current object. Returns bool true if the specified object is equal to the current object; otherwise, false. GetHashCode() Serves as the default hash function. public override int GetHashCode() Returns int A hash code for the current object. Match(JNode) Determines whether the specified node matches with the current node. public override bool Match(JNode node) Parameters node JNode The node to compare with the current node. Returns bool true if the specified node matches with the current node; otherwise, false. ToString() Returns a JSON string that represents the current object. public override string ToString() Returns string A JSON string that represents the current object. Operators implicit operator string(JString) public static implicit operator string(JString @string) Parameters string JString Returns string"
    +    "keywords": "Class JString Namespace RelogicLabs.JsonSchema.Types Assembly RelogicLabs.JsonSchema.dll public class JString : JPrimitive, IJsonType, IPragmaValue Inheritance object JNode JLeaf JPrimitive JString Implements IJsonType IPragmaValue Derived JDateTime Inherited Members JPrimitive.Node JNode.Context JNode.Parent JNode.Children JNode.Parser JNode.Runtime JNode.GetOutline() object.Equals(object, object) object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) Properties Type public override JsonType Type { get; } Property Value JsonType Value public string Value { get; } Property Value string Methods Equals(object?) Determines whether the specified object is equal to the current object. public override bool Equals(object? obj) Parameters obj object The object to compare with the current object. Returns bool true if the specified object is equal to the current object; otherwise, false. GetHashCode() Serves as the default hash function. public override int GetHashCode() Returns int A hash code for the current object. Match(JNode) Determines whether the specified node matches with the current node. public override bool Match(JNode node) Parameters node JNode The node to compare with the current node. Returns bool true if the specified node matches with the current node; otherwise, false. ToString() Returns a JSON string that represents the current object. public override string ToString() Returns string A JSON string that represents the current object. Operators implicit operator string(JString) public static implicit operator string(JString @string) Parameters string JString Returns string"
    +  },
    +  "api/RelogicLabs.JsonSchema.Types.JTime.html": {
    +    "href": "api/RelogicLabs.JsonSchema.Types.JTime.html",
    +    "title": "Class JTime | Json Schema",
    +    "keywords": "Class JTime Namespace RelogicLabs.JsonSchema.Types Assembly RelogicLabs.JsonSchema.dll public class JTime : JDateTime, IJsonType, IPragmaValue Inheritance object JNode JLeaf JPrimitive JString JDateTime JTime Implements IJsonType IPragmaValue Inherited Members JDateTime.DateTime JString.Value JString.Match(JNode) JString.Equals(object) JString.GetHashCode() JString.ToString() JPrimitive.Node JNode.Context JNode.Parent JNode.Children JNode.Parser JNode.Runtime JNode.GetOutline() object.Equals(object, object) object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) Properties Type public override JsonType Type { get; } Property Value JsonType"
       },
       "api/RelogicLabs.JsonSchema.Types.JTitle.html": {
         "href": "api/RelogicLabs.JsonSchema.Types.JTitle.html",
    @@ -387,22 +427,22 @@
       "articles/datatypes.html": {
         "href": "articles/datatypes.html",
         "title": "Constraint Data Types | Json Schema",
    -    "keywords": "pre code { font-size: 1.1em; } Constraint Data Types Data types play a pivotal role in validating JSON data for compliance with the schema. Essentially, data types determine the kind of data that a JSON element or value can contain. This mechanism serves as a fundamental process in maintaining the accuracy, consistency, and integrity of JSON document and its structure throughout the system, where data quality and reliability are vital. In the schema document, data types are denoted by the # prefix. Here is an outline of all data types, including their subtypes, used in the schema document to validate a JSON document. When using multiple data types for validation, it indicates that the JSON value is considered valid if it complies with any of the specified alternative data types. All of these data types and their subtypes offer the flexibility of selecting the most appropriate type based on requirements. #any ┬ ├ #object ├ #array ├ #string │ ┬ │ ├ #date │ └ #time ├ #number │ ┬ │ ├ #integer │ ├ #float │ └ #double ├ #boolean └ #null The Any Data Type This data type accepts any valid JSON value that conforms to the JSON standard. It is the least restrictive data type and serves as the parent type for all other data types defined in this schema, each of which imposes more specific constraints. Here is the specification of JSON document containing rules of all valid JSON values. Following is the syntax for specifying this data type: #any The Object Data Type This data type represents the JSON object type and accepts any JSON object specified by the JSON standard. The specification document for JSON provides details about the different syntax and forms of JSON objects. Following is the syntax for specifying this data type: #object The Array Data Type This data type represents the JSON array type and accepts any JSON array specified by the JSON standard. The specification document for JSON provides details about the various syntax and forms of JSON arrays. Below is the syntax for specifying this data type: #array The String Data Type This is one of the most commonly used data types in a JSON document, designed to accept any JSON string as specified by the JSON standard. The syntax for specifying this data type is as follows: #string The Date Data Type The date data type accepts only a type of string which represent a date specified by ISO 8601 standard (date part only). It is a subtype of string data type and thus formatted as per the JSON string specification. Detailed explanations of the ISO 8601 standard can be found in this document. Furthermore, you can refer to this document for a detailed description of the date pattern associated with this data type. To define this data type in schema, use the following syntax: #date The Time Data Type The time data type only accepts strings representing date-time (including both date and time), in accordance with the ISO 8601 standard. Similar to the date data type, it is a subtype of string data type and thus formatted as per the JSON string specification. Here is the ISO 8601 standard document, which contains detailed explanations. Furthermore, you can refer to this document for a detailed description of the date-time pattern associated with this data type. To define this data type in schema, use the following syntax: #time The Number Data Type The number data type serves as the parent data type for all numeric types accommodated by the schema, including integer, floating-point, and exponent-based numbers. It accepts any JSON numerical value in accordance with the JSON standard. The syntax for specifying the number type is as follows: #number The Integer Data Type The integer data type is a subtype of the number data type that only allows integral numbers or whole numbers without any fraction and exponent and thus provides constraints for a wide range of real-world scenarios where numbers cannot involve decimal points or exponents. To specify the integer type in schema, use the following syntax: #integer The Float Data Type The float data type is also a subtype of the number data type that only accepts floating point numbers and does not allow exponent in numbers or integral numbers. This constraint is useful for various real-world applications that require numbers to be exclusively in floating-point format. To specify the float type in schema, use the following syntax: #float The Double Data Type The double data type, as a subtype of the number data type, exclusively accepts numbers with exponents. It can either be an integral number with an exponent or a floating-point number with an exponent. This constraint distinguishes it from other number formats and makes it particularly useful for handling large numbers with exponents. To specify the double type in a schema, use the following syntax: #double The Boolean Data Type The boolean data type is a binary or switch-based data type that only accepts two values, namely true and false. It is particularly useful in situations where toggling and switching are necessary. To specify the boolean type in the schema, use the following syntax: #boolean The Null Data Type The null data type serves as a special constraint within JSON schemas, facilitating the controlled use of null in place of other JSON elements or values. Typically, it is combined with other data types to permit the use of null for specific JSON elements or values. This can set constraints for scenarios in which an array without any elements and an object without any properties can either have null or only be allowed to be empty. Additionally, the @nonempty constraint functions can be employed to further control the use of empty values within a JSON document. To specify the null type in the schema, use the following syntax: #null"
    +    "keywords": "pre code { font-size: 1.1em; } Constraint Data Types Data types play a pivotal role in validating JSON data for compliance with the schema. Essentially, data types determine the kind of data that a JSON element or value can contain. This mechanism serves as a fundamental process in maintaining the accuracy, consistency, and integrity of JSON document and its structure throughout the system, where data quality and reliability are vital. In the schema document, data types are denoted by the # prefix. Here is an outline of all data types, including their subtypes, used in the schema document to validate a JSON document. When using multiple data types for validation, it indicates that the JSON value is considered valid if it complies with any of the specified alternative data types. All of these data types and their subtypes offer the flexibility of selecting the most appropriate type based on requirements. #any ┬ ├ #primitive │ ┬ │ ├ #string │ │ ┬ │ │ └ #datetime │ │ ┬ │ │ ├ #date │ │ └ #time │ ├ #number │ │ ┬ │ │ ├ #integer │ │ ├ #float │ │ └ #double │ ├ #boolean │ └ #null └ #composite ┬ ├ #array └ #object The Any Data Type This data type accepts any valid JSON value that conforms to the JSON standard. It is the least restrictive data type and serves as the parent type for all other data types defined in this schema, each of which imposes more specific constraints. Here is the specification of JSON document containing rules of all valid JSON values. Following is the syntax for specifying this data type: #any The Object Data Type This data type represents the JSON object type and accepts any JSON object specified by the JSON standard. The specification document for JSON provides details about the different syntax and forms of JSON objects. Following is the syntax for specifying this data type: #object The Array Data Type This data type represents the JSON array type and accepts any JSON array specified by the JSON standard. The specification document for JSON provides details about the various syntax and forms of JSON arrays. Below is the syntax for specifying this data type: #array The String Data Type This is one of the most commonly used data types in a JSON document, designed to accept any JSON string as specified by the JSON standard. The syntax for specifying this data type is as follows: #string The Date Time Data Type The date-time data type serves as the parent data type for both date and time data types. It is a subtype of string data type and thus formatted as per the JSON string specification. #datetime The Date Data Type The date data type accepts a string representation of a date, conforming to the ISO 8601 standard (date part only). This behavior is based on the default configuration, which can be modified as needed. It is a subtype of date-time type and thus also formatted as per the JSON string specification. Detailed explanations of the ISO 8601 standard can be found in this document. Furthermore, you can refer to this document for a detailed description of the date pattern associated with this data type. To define this data type in schema, use the following syntax: #date The Time Data Type The time data type accepts a string representation of a time (including both date and time parts), in accordance with the ISO 8601 standard. This behavior is based on the default configuration, which can be modified as needed. Similar to the date data type, it is a subtype of date-time data type and thus also formatted as per the JSON string specification. Here is the ISO 8601 standard document, which contains detailed explanations. Furthermore, you can refer to this document for a detailed description of the date-time pattern associated with this data type. To define this data type in schema, use the following syntax: #time The Number Data Type The number data type serves as the parent data type for all numeric types accommodated by the schema, including integer, floating-point, and exponent-based numbers. It accepts any JSON numerical value in accordance with the JSON standard. The syntax for specifying the number type is as follows: #number The Integer Data Type The integer data type is a subtype of the number data type that only allows integral numbers or whole numbers without any fraction and exponent and thus provides constraints for a wide range of real-world scenarios where numbers cannot involve decimal points or exponents. To specify the integer type in schema, use the following syntax: #integer The Float Data Type The float data type is also a subtype of the number data type that only accepts floating point numbers and does not allow exponent in numbers or integral numbers. This constraint is useful for various real-world applications that require numbers to be exclusively in floating-point format. To specify the float type in schema, use the following syntax: #float The Double Data Type The double data type, as a subtype of the number data type, exclusively accepts numbers with exponents. It can either be an integral number with an exponent or a floating-point number with an exponent. This constraint distinguishes it from other number formats and makes it particularly useful for handling large numbers with exponents. To specify the double type in a schema, use the following syntax: #double The Boolean Data Type The boolean data type is a binary or switch-based data type that only accepts two values, namely true and false. It is particularly useful in situations where toggling and switching are necessary. To specify the boolean type in the schema, use the following syntax: #boolean The Null Data Type The null data type serves as a special constraint within JSON schemas, facilitating the controlled use of null in place of other JSON elements or values. Typically, it is combined with other data types to permit the use of null for specific JSON elements or values. This can set constraints for scenarios in which an array without any elements and an object without any properties can either have null or only be allowed to be empty. Additionally, the @nonempty constraint functions can be employed to further control the use of empty values within a JSON document. To specify the null type in the schema, use the following syntax: #null"
       },
       "articles/datetime.html": {
         "href": "articles/datetime.html",
         "title": "Date and Time Patterns | Json Schema",
    -    "keywords": "Date and Time Patterns Dates and times are fundamental data types used in a wide range of data exchange scenarios. This schema offers a comprehensive set of tools for managing dates and times, including pattern-based formatting to meet the unique requirements of various systems and applications. Simultaneously, it incorporates validation processes to ensure compliance with the schema. Date and time formats are defined using date and time pattern strings. Within these pattern strings, unquoted letters ranging from 'A' to 'Z' and 'a' to 'z' serve as placeholders representing various components of a date or time string. To prevent their interpretation as patterns, text can be enclosed in single quotes ('). Additionally, two consecutive single quotes ('') are used to represent a literal single quote within the string. Any characters outside of these uppercase and lowercase letters, as well as the text enclosed in single quotes, are not interpreted and are matched against the input string during validation. Below, you will find a list of pattern letters and strings that are defined for date and time patterns. Please note that any characters within the 'A' to 'Z' and 'a' to 'z' range are reserved and should not be directly included in the pattern string. SN Pattern Description Example 1 G Era period designator AD 2 YYYY Four digit year number 1970 3 YY Two digit year number 70 4 MM Month number in year (2 digit form) 01 5 MMMM Full name of month January 6 MMM Short name of month Jan 7 M Month number in year (1-2 digit form) 1; 01 8 DDDD Full name of day in week Monday 9 DDD Short name of day in week Mon 10 DD Day in month (2 digit form) 01 11 D Day in month (1-2 digit form) 1; 01 12 t AM/PM designator AM; PM 13 hh Hour in day (2 digit form) 01; 12 14 h Hour in day (1-2 digit form) 1; 01 15 mm Minute in hour (2 digit form) 01; 20 16 m Minute in hour (1-2 digit form) 1; 01 17 ss Second in minute (2 digit form) 01; 30 18 s Second in minute (1-2 digit form) 1; 01 19 f Tenths of a second 1 20 ff Hundredths of a second 11 21 fff Milliseconds of a second 111 22 ffff Ten thousandths of a second 1111 23 fffff Hundred thousandths of a second 11111 24 ffffff Millionths of a second 111111 25 F Fraction of a second upto 6 digits 1; 111; 111111 26 Z Time zone hours only offset +06; -05; Z 27 ZZ Time zone hours and minutes offset +09:30; −03:30; Z 28 ZZZ Time zone hours and minutes offset +0930; −0330; Z The pattern components listed above can be combined to create comprehensive and customized date and time patterns to accommodate all system and user requirements. The following table illustrates some examples of how different date-time pattern components can be combined. SN Usage Combined Pattern Example 1 #date YYYY-MM-DD 2023-09-01 2 #time YYYY-MM-DD'T'hh:mm:ss.FZZ 2023-09-01T14:35:10.111+06:00 3 @date MMMM DD, YYYY G January 01, 1980 AD 4 @date DDDD, D MMMM YYYY Tuesday, 11 July 2023 5 @time YYYY.MM.DD hh.mm.ss t 1980.11.21 10.30.50 pm 6 @time DDD, D MMM YY hh:mm:ss ZZ Sun, 4 Jul 99 12:08:56 -06:00 7 @time hh:mm:ss t ZZ 03:11:30 AM +06:00 The first pattern in the table above adheres to the ISO 8601 date format and is used to validate the #date data type within the schema. The second pattern in the table follows the ISO 8601 format for date and time, validating the #time data type in the schema. Instead of explicitly specifying these patterns in the @date or @time functions, a more concise approach is to directly utilize the #date or #time type within the schema. When the AM/PM designator is included in the date and time pattern, the presence of any hour format specifier indicates that the time is in the 12-hour clock format. Conversely, when the AM/PM designator is omitted, the presence of any hour format specifier indicates that the time is in the 24-hour clock format."
    +    "keywords": "Date and Time Patterns Dates and times are fundamental data types used in a wide range of data exchange scenarios. This schema offers a comprehensive set of tools for managing dates and times, including pattern-based formatting to meet the unique requirements of various systems and applications. Simultaneously, it incorporates validation processes to ensure compliance with the schema. Date and time formats are defined using date and time pattern strings. Within these pattern strings, unquoted letters ranging from 'A' to 'Z' and 'a' to 'z' serve as placeholders representing various components of a date or time string. To prevent their interpretation as patterns, text can be enclosed in single quotes ('). Additionally, two consecutive single quotes ('') are used to represent a literal single quote within the string. Any characters outside of these uppercase and lowercase letters, as well as the text enclosed in single quotes, are not interpreted and are matched against the input string during validation. Below, you will find a list of pattern letters and strings that are defined for date and time patterns. Please note that any characters within the 'A' to 'Z' and 'a' to 'z' range are reserved and should not be directly included in the pattern string. SN Pattern Description Example 1 G Era period designator AD 2 YYYY Four digit year number 1970 3 YY Two digit year number 70 4 MM Month number in year (2 digit form) 01 5 MMMM Full name of month January 6 MMM Short name of month Jan 7 M Month number in year (1-2 digit form) 1; 01 8 DDDD Full name of day in week Monday 9 DDD Short name of day in week Mon 10 DD Day in month (2 digit form) 01 11 D Day in month (1-2 digit form) 1; 01 12 t AM/PM designator AM; PM 13 hh Hour in day (2 digit form) 01; 12 14 h Hour in day (1-2 digit form) 1; 01 15 mm Minute in hour (2 digit form) 01; 20 16 m Minute in hour (1-2 digit form) 1; 01 17 ss Second in minute (2 digit form) 01; 30 18 s Second in minute (1-2 digit form) 1; 01 19 f Tenths of a second 1 20 ff Hundredths of a second 11 21 fff Milliseconds of a second 111 22 ffff Ten thousandths of a second 1111 23 fffff Hundred thousandths of a second 11111 24 ffffff Millionths of a second 111111 25 F Fraction of a second upto 6 digits 1; 111; 111111 26 Z Time zone hours only offset +06; -05; Z 27 ZZ Time zone hours and minutes offset +09:30; −03:30; Z 28 ZZZ Time zone hours and minutes offset +0930; −0330; Z The pattern components listed above can be combined to create comprehensive and customized date and time patterns to accommodate all system and user requirements. The following table illustrates some examples of how different date-time pattern components can be combined. SN Usage Combined Pattern Example 1 #date YYYY-MM-DD 2023-09-01 2 #time YYYY-MM-DD'T'hh:mm:ss.FZZ 2023-09-01T14:35:10.111+06:00 3 @date MMMM DD, YYYY G January 01, 1980 AD 4 @date DDDD, D MMMM YYYY Tuesday, 11 July 2023 5 @time YYYY.MM.DD hh.mm.ss t 1980.11.21 10.30.50 pm 6 @time DDD, D MMM YY hh:mm:ss ZZ Sun, 4 Jul 99 12:08:56 -06:00 7 @time hh:mm:ss t ZZ 03:11:30 AM +06:00 The first pattern in the table above adheres to the ISO 8601 date format and is used to validate the #date data type within the schema. The second pattern in the table follows the ISO 8601 format for date and time, validating the #time data type in the schema. Instead of explicitly specifying these patterns in the @date or @time functions, a more concise approach is to directly utilize the #date or #time type within the schema. Detailed explanations regarding the date and time format of the ISO 8601 standard are available in this document. When the AM/PM designator is included in the date and time pattern, the presence of any hour format specifier indicates that the time is in the 12-hour clock format. Conversely, when the AM/PM designator is omitted, the presence of any hour format specifier indicates that the time is in the 24-hour clock format."
       },
       "articles/directives.html": {
         "href": "articles/directives.html",
         "title": "Validation Directives | Json Schema",
    -    "keywords": "pre code { font-size: 1.1em; } Validation Directives Directives serve as special instructions or commands for the Schema and JSON parsers, interpreters, and validators. They are used to control various aspects of the validation process or to provide metadata for documentation. Additionally, they offer crucial information about Schema and JSON and provide custom validation functions to meet specific Schema validation requirements. Title Directive Within a schema, the title directive is used to provide a name, label, or a brief intent of the schema for which it is written. Besides, the title directive is optional and additional description can be supplied as multiple comments inside the schema document to provide more detail. However, this directive is only used for documentation purposes and does not have any impact in the validation process. To represent the title directive, the following example of notation can be used: %title: \"Example name or brief description\" Version Directive In a schema, the version directive is used to provide a version number of the schema which helps to keep track of updates. Although optional, the version directive is useful for documentation purposes and does not affect the validation process. The version directive can be represented using the following notation example: %version: 2023.09.11.01 Include Directive Include directive enables the addition or inclusion of a class, as defined by object-oriented programming, to a schema along with a set of methods that have specific signatures for performing custom validations. This feature extends the built-in validation capabilities of the schema. In the C# language, it is also necessary to specify the assembly name together with the class name. The example below illustrates how to utilize the include directive in C# language: %include: RelogicLabs.JsonSchema.Tests.Positive.ExternalFunctions, RelogicLabs.JsonSchema.Tests Pragma Directive Pragma directives provide a mechanism to modify the default settings for certain predefined parameters of the validation process. This allows you to adjust the behaviours of schema validation process as per your requirements. Ignore Undefined Properties The IgnoreUndefinedProperties pragma directive serves the purpose of instructing the validation process on how to handle JSON properties that are not explicitly defined in the schema, not even by the undefined marker or symbol. You can use this directive to specify whether such properties should be ignored during validation or if validation errors should be raised for any undefined properties in the JSON document. The default value of this directive is false, which means that by default, undefined properties in the JSON document are not ignored, and validation errors will be raised for them. For example, the following usage of this directive instructs the validation process to ignore any undefined properties in the JSON document: %pragma IgnoreUndefinedProperties: true Floating Point Tolerance The FloatingPointTolerance pragma directive allows you to define the tolerance level for relative errors in floating-point numbers during calculations and computations carried out by the validation process. By default, this directive is set to 1E-10, indicating a small tolerance. However, you have the flexibility to adjust this value to any desired number. To specify a custom tolerance value of 1E-07, you can use the following notation as an example: %pragma FloatingPointTolerance: 1E-07 Ignore Object Property Order The IgnoreObjectPropertyOrder pragma directive provides a means to enforce a specific order or sequence of JSON object properties, following the schema definition. This requirement for strict ordering is only needed in certain special cases. By default, this directive is set to true, meaning that the object property order outlined in the schema document is not mandatory. However, you can override this default by setting it to false, as shown in the following example below: %pragma IgnoreObjectPropertyOrder: false Definition / Define Directive This feature in JSON schemas allows you to define a name for a fragment of schema or validation rules, which can be referenced from various parts of your schema. This means that if you encounter similar validation requirements in different sections of your schema, you can conveniently refer to the named fragment instead of duplicating the same validation rules. By providing clear and descriptive names for these validation rules or sub-schemas, you enhance the overall clarity and context of your schema. This clarity not only makes it easier to understand the structure and intent of the schema but also contributes to keeping your complex schema well-organized, concise, and more manageable. The name or alias of the directive is always start with $ which also refers to that they are named fragment defined elsewhere in the schema. Here is a simple example of how to use this directive: %define $product: { \"id\": @length(2, 10) @regex(\"[a-z][a-z0-9]+\") #string, \"name\": @length(5, 100) #string, \"price\": @range(0.1, 1000000), \"inStock\": #boolean } Schema Directive The schema directive serves as the starting or entry point for both the schema document and the schema validation process. It becomes mandatory when other directives are present within the document. In such cases, the schema directive explicitly designates the beginning of the schema document and defines the entry point for validation process. However, if there are no other directives used in the document, the entire document itself is automatically considered as the schema document, with the document's beginning serving as its entry point. To illustrate, here is a simple example of a schema document with schema directive: %schema: { \"user\": { \"id\": @range(1, 10000) #integer, /*username does not allow special characters*/ \"username\": @regex(\"[a-z_]{3,30}\") #string, /*currently only one role is allowed by system*/ \"role\": \"user\" #string, \"isActive\": #boolean, //user account current status \"registeredAt\": #time } }"
    +    "keywords": "pre code { font-size: 1.1em; } Validation Directives Directives serve as special instructions or commands for the Schema and JSON parsers, interpreters, and validators. They are used to control various aspects of the validation process or to provide metadata for documentation. Additionally, they offer crucial information about Schema and JSON and provide custom validation functions to meet specific Schema validation requirements. Title Directive Within a schema, the title directive is used to provide a name, label, or a brief intent of the schema for which it is written. Besides, the title directive is optional and additional description can be supplied as multiple comments inside the schema document to provide more detail. However, this directive is only used for documentation purposes and does not have any impact in the validation process. To represent the title directive, the following example of notation can be used: %title: \"Example name or brief description\" Version Directive In a schema, the version directive is used to provide a version number of the schema which helps to keep track of updates. Although optional, the version directive is useful for documentation purposes and does not affect the validation process. The version directive can be represented using the following notation example: %version: 2023.09.11.01 Include Directive Include directive enables the addition or inclusion of a class, as defined by object-oriented programming, to a schema along with a set of methods that have specific signatures for performing custom validations. This feature extends the built-in validation capabilities of the schema. In the C# language, it is also necessary to specify the assembly name together with the class name. The example below illustrates how to utilize the include directive in C# language: %include: RelogicLabs.JsonSchema.Tests.Positive.ExternalFunctions, RelogicLabs.JsonSchema.Tests Pragma Directive Pragma directives provide a mechanism to modify the default settings for certain predefined parameters of the validation process. This allows you to adjust the behaviours of schema validation process as per your requirements. Ignore Undefined Properties The IgnoreUndefinedProperties pragma directive serves the purpose of instructing the validation process on how to handle JSON properties that are not explicitly defined in the schema, not even by the undefined marker or symbol. You can use this directive to specify whether such properties should be ignored during validation or if validation errors should be raised for any undefined properties in the JSON document. The default value of this directive is false, which means that by default, undefined properties in the JSON document are not ignored, and validation errors will be raised for them. For example, the following usage of this directive instructs the validation process to ignore any undefined properties in the JSON document: %pragma IgnoreUndefinedProperties: true Date Data Type Format The DateDataTypeFormat pragma directive enables you to customize the default format of the #date data type. By default, the #date data type follows the ISO 8601 standard, precisely using the format YYYY-MM-DD. Additional details on date-time patterns and formats are available here. The subsequent example illustrates the process of defining a customized date format for the #date data type: %pragma DateDataTypeFormat: \"DD-MM-YYYY\" Time Data Type Format To customize the default format of the #time data type, utilize the TimeDataTypeFormat pragma directive. By default, the #time data type follows the ISO 8601 standard, precisely in the format YYYY-MM-DD'T'hh:mm:ss.FZZ. Further information on date-time patterns and formats can be found here. The following example demonstrates how to specify a customized time format for the #time data type: %pragma TimeDataTypeFormat: \"DD-MM-YYYY hh:mm:ss\" Floating Point Tolerance The FloatingPointTolerance pragma directive allows you to define the tolerance level for relative errors in floating-point numbers during calculations and computations carried out by the validation process. By default, this directive is set to 1E-10, indicating a small tolerance. However, you have the flexibility to adjust this value to any desired number. To specify a custom tolerance value of 1E-07, you can use the following notation as an example: %pragma FloatingPointTolerance: 1E-07 Ignore Object Property Order The IgnoreObjectPropertyOrder pragma directive provides a means to enforce a specific order or sequence of JSON object properties, following the schema definition. This requirement for strict ordering is only needed in certain special cases. By default, this directive is set to true, meaning that the object property order outlined in the schema document is not mandatory. However, you can override this default by setting it to false, as shown in the following example below: %pragma IgnoreObjectPropertyOrder: false Definition / Define Directive This feature in JSON schemas allows you to define a name for a fragment of schema or validation rules, which can be referenced from various parts of your schema. This means that if you encounter similar validation requirements in different sections of your schema, you can conveniently refer to the named fragment instead of duplicating the same validation rules. By providing clear and descriptive names for these validation rules or sub-schemas, you enhance the overall clarity and context of your schema. This clarity not only makes it easier to understand the structure and intent of the schema but also contributes to keeping your complex schema well-organized, concise, and more manageable. The name or alias of the directive is always start with $ which also refers to that they are named fragment defined elsewhere in the schema. Here is a simple example of how to use this directive: %define $product: { \"id\": @length(2, 10) @regex(\"[a-z][a-z0-9]+\") #string, \"name\": @length(5, 100) #string, \"price\": @range(0.1, 1000000), \"inStock\": #boolean } Schema Directive The schema directive serves as the starting or entry point for both the schema document and the schema validation process. It becomes mandatory when other directives are present within the document. In such cases, the schema directive explicitly designates the beginning of the schema document and defines the entry point for validation process. However, if there are no other directives used in the document, the entire document itself is automatically considered as the schema document, with the document's beginning serving as its entry point. To illustrate, here is a simple example of a schema document with schema directive: %schema: { \"user\": { \"id\": @range(1, 10000) #integer, /*username does not allow special characters*/ \"username\": @regex(\"[a-z_]{3,30}\") #string, /*currently only one role is allowed by system*/ \"role\": \"user\" #string, \"isActive\": #boolean, //user account current status \"registeredAt\": #time } }"
       },
       "articles/functions.html": {
         "href": "articles/functions.html",
         "title": "Constraint Functions | Json Schema",
    -    "keywords": "pre code { font-size: 1.1em; } table th:first-of-type { min-width: 140px; } Constraint Functions This document serves as a brief overview, providing key insights into the built-in constraint functions that are part of the core schema. These functions significantly extend the scope of data and structural validation, going beyond the limits of basic data type restrictions. These functions are designed to enhance the effectiveness of schema validation, ensuring the accuracy, consistency, integrity, and compliance of the JSON data to the schema. The notation below outlines the typical structure of constraint or validation functions applicable to JSON elements or values. In this notation, Target comprises two components: the target type, which specifies the JSON value type under consideration, and the target name, which identifies the specific JSON value to which the validation or constraint function applies. The Constraint-Function refers to the name of the function responsible for the validation. Target - Constraint-Function[(Parameter-Set)] The Parameter-Set contains the parameters that control the validation process provided by the constraint function on the target JSON value. Please note that the Parameter-Set including the opening and closing parentheses are optional. The ellipsis or three dots ... after a parameter type indicates it can accept any number of arguments of that type. When using multiple validation functions, each function validates the target JSON value, and the overall validation succeeds only when every function independently deems the target JSON value as valid. Function Details Below, you will find a detailed explanation of the syntax and useful applications of each function, allowing you to gain a clear understanding of their usage. String Length #string target - @length(#integer number) Validates that the target string has the length specified by the number. If the length of the target string does not match the value specified by number, a validation error will generate. #string target - @length(#integer minimum, #integer maximum) Validates that the length of the target string satisfies the range requirement specified by the parameters. It checks that the length of the target string is equal to or greater than the minimum length specified and simultaneously less than or equal to the maximum length specified. If not, a validation error will generate. If either the parameter values for minimum or maximum are unspecified or undefined, the undefined symbol ! can be used in place of either of these parameters. The following examples illustrate the various use cases of the @length function of the two variations described above, for the target data type string: Ues Cases Valid Values Invalid Values @length(4) \"ABCD\" \"AB\"; \"ABCDE\" @length(2, 4) \"AB\"; \"ABC\"; \"ABCD\" \"\"; \"A\"; \"ABCDE\" @length(2, !) \"AB\"; \"ABCDEFGH\" \"\"; \"A\" @length(!, 4) \"\"; \"A\"; \"ABC\"; \"ABCD\" \"ABCDE\"; \"ABCDEFGHI\" Array Length #array target - @length(#integer number) Validates that the target array has the length specified by the number. If the length of the target array does not match the value specified by number, a validation error will generate. #array target - @length(#integer minimum, #integer maximum) Validates that the length of the target array satisfies the range requirement specified by the parameters. It checks that the length of the target array is equal to or greater than the minimum length specified and simultaneously less than or equal to the maximum length specified. If not, a validation error will generate. If either the parameter values for minimum or maximum are unspecified or undefined, the undefined symbol ! can be used in place of either of these parameters. The following examples illustrate the various use cases of the @length function of the two variations described above, for the target data type array: Ues Cases Valid Values Invalid Values @length(4) [1, 2, 3, 4] [1, 2, 3]; [1, 2, 3, 4, 5] @length(2, 4) [1, 2]; [1, 2, 3]; [1, 2, 3, 4] []; [1]; [1, 2, 3, 4, 5] @length(2, !) [1, 2]; [1, 2, 3, 4, 5] []; [1] @length(!, 4) []; [1, 2]; [1, 2, 3, 4] [1, 2, 3, 4, 5]; [1, 2, 3, 4, 5, 6] Object Length / Size #object target - @length(#integer number) Validates that the target object has the length or size specified by the number. If the length of the target object does not match the value specified by number, a validation error will generate. #object target - @length(#integer minimum, #integer maximum) Validates that the length or size of the target object satisfies the range requirement specified by the parameters. It checks that the length of the target object is equal to or greater than the minimum length specified and simultaneously less than or equal to the maximum length specified. If not, a validation error will generate. If either the parameter values for minimum or maximum are unspecified or undefined, the undefined symbol ! can be used in place of either of these parameters. The following examples illustrate the various use cases of the @length function of the two variations described above, for the target data type object: Ues Cases Valid Values Invalid Values @length(4) {\"k1\":1, \"k2\":2, \"k3\":3, \"k4\":4} {\"k1\":1, \"k2\":2, \"k3\":3}; {\"k1\":1, \"k2\":2, \"k3\":3, \"k4\":4, \"k5\":5} @length(2, 4) {\"k1\":1, \"k2\":2}; {\"k1\":1, \"k2\":2, \"k3\":3, \"k4\":4} {}; {\"k1\":1}; {\"k1\":1, \"k2\":2, \"k3\":3, \"k4\":4, \"k5\":5} @length(2, !) {\"k1\":1, \"k2\":2}; {\"k1\":1, \"k2\":2, \"k3\":3, \"k4\":4, \"k5\":5} {}; {\"k1\":1} @length(!, 4) {}; {\"k1\":1, \"k2\":2}; {\"k1\":1, \"k2\":2, \"k3\":3, \"k4\":4} {\"k1\":1, \"k2\":2, \"k3\":3, \"k4\":4, \"k5\":5} Number Range #number target - @range(#number minimum, #number maximum) Validates that the target number satisfies the range requirement specified by the parameters. It checks that the target number is greater than or equal to the minimum number specified and simultaneously less than or equal to the maximum number specified. If not, a validation error will generate. If either the parameter values for minimum or maximum are unspecified or undefined, the undefined symbol ! can be used in place of either of these parameters. The following examples illustrate the various use cases of the @range function of the two variations described above, for the target data type number: Ues Cases Valid Values Invalid Values @range(2, 4) 2; 3; 4 0; 1; -100; 100 @range(2, !) 2; 3; 4; 100 0; 1; -100 @range(!, 4) 0; 1; 4; -100 5; 10; 100 Number Minimum #number target - @minimum(#number minimum) #number target - @minimum(#number minimum, #boolean exclusive) Validates that the target number is greater than or equal to the minimum number specified as a parameter, unless the exclusive parameter flag is explicitly set to true, in which case the target number must be exclusively greater than the minimum number. Ues Cases Valid Values Invalid Values minimum(0) 0; 1; 1000 -1; -10; -10000 minimum(10.5) 10.5; 10.6; 1000.1 10.49; 1.0; -100.1 minimum(0, true) 0.001; 1.01; 100.1 0; -0.01; -100.1 Number Maximum #number target - @maximum(#number maximum) #number target - @maximum(#number maximum, #boolean exclusive) Validates that the target number is less than or equal to the maximum number specified as a parameter, unless the exclusive parameter flag is explicitly set to true, in which case the target number must be exclusively less than the maximum number. Ues Cases Valid Values Invalid Values maximum(100) 100; -100; 0 101; 1000; 10000 maximum(10.5) 10.50; 10.49; -1000.1 10.51; 11.0; 1000.1 maximum(0, true) -0.001; -1.01; -1000.1 0; 0.01; 100.1 String Enum #string target - @enum(#string... items) Validates that the target string is equal to one of the strings specified by the items parameter. If not, a validation error will generate. Number Enum #number target - @enum(#number... items) Validates that the target number is equal to one of the numbers specified by the items parameter. If not, a validation error will generate. Array Elements #array target - @elements(#any... items) Validates that the target array contains every JSON value specified by the items parameter. If not, it generates a validation error. Object Keys #object target - @keys(#string... items) Validates that all the strings specified in the items parameter are present as keys in the target object. If any of them is missing, a validation error is generated. Object Values #object target - @values(#any... items) Validates that all the JSON values specified in the items parameter are present as values in the target object. If any of them is missing, a validation error is generated. String Regular Expression (Regex) #string target - @regex(#string pattern) Validates that the target string matches the regular expression pattern specified by the pattern parameter. The regular expression engine used here supports standard syntax from both POSIX (IEEE Portable Operating System Interface) Extended Regular Expressions and Perl-Compatible Regular Expressions (PCRE). For more details, please refer to POSIX Regular Expressions. Email Address #string target - @email Validates whether the target string represents a valid email address. It follows the SMTP protocol RFC 5322 specification for mailbox address format to identify a valid email address. In addition to conforming to this standard, it recognizes all widely used email address formats to ensure compatibility with various systems and user requirements. URL & URI Address #string target - @url(#string scheme) Validates whether the target string is a valid URL (Uniform Resource Locator) or URI (Uniform Resource Identifier) with a specific scheme provided by the scheme parameter. It follows the RFC 3986 URI Generic Syntax to determine the validity of the URL or URI. In addition to conforming to this standard, it recognizes all widely used URL and URI address formats, ensuring compatibility with a wide range of systems and user requirements. #string target - @url Validates whether the target string is a valid URL or URI with HTTP and HTTPS scheme. For more information please check the function #string target - @url(#string scheme). Phone Number #string target - @phone Validates whether the target string is a valid phone number. It follows the ITU-T E.163 and E.164 telephone number notation to determine the validity of the phone number. In addition to conforming to this standard, it recognizes all widely used national and international phone number formats, ensuring compatibility with a wide range of systems and user requirements. Date and Time #string target - @date(pattern) Validates that the target string matches the date and time pattern specified by the pattern parameter. It fully supports the ISO 8601 date and time format. Beyond this standard, it also allows custom date and time formats, ensuring compatibility with various systems and meeting diverse users and businesses requirements. This document provides a comprehensive overview of the date-time custom patterns. #string target - @time(pattern) Both the @date and @time functions support a complete range of date-time patterns, enabling the precise definition of any date and time scenario. Therefore, these functions can be used interchangeably. When the sole consideration is the date or day of the month in a year, employing the @date function is the more convenient choice. In contrast, when it becomes necessary to specify a particular time on a date, the @time function is the more appropriate option. To learn more about date-time patterns, please refer to this page. Number Positive #number target - @positive Validates that the target number is positive. If the target number is zero or negative, it generates a validation error. Number Negative #number target - @negative Validates that the target number is negative. If the target number is zero or positive, it generates a validation error. String Not Empty #string target - @nonempty Validates that the target string is not empty. If the target string is empty, it generates a validation error. Array Not Empty #array target - @nonempty Validates that the target array is not empty. If the target array is empty, it generates a validation error. Object Not Empty #object target - @nonempty Validates that the target object is not empty. If the target object is empty, it generates a validation error."
    +    "keywords": "pre code { font-size: 1.1em; } table th:first-of-type { min-width: 140px; } Constraint Functions This document serves as a brief overview, providing key insights into the built-in constraint functions that are part of the core schema. These functions significantly extend the scope of data and structural validation, going beyond the limits of basic data type restrictions. These functions are designed to enhance the effectiveness of schema validation, ensuring the accuracy, consistency, integrity, and compliance of the JSON data to the schema. The notation below outlines the typical structure of constraint or validation functions applicable to JSON elements or values. In this notation, Target comprises two components: the target type, which specifies the JSON value type under consideration, and the target name, which identifies the specific JSON value to which the validation or constraint function applies. The Constraint-Function refers to the name of the function responsible for the validation. Target - Constraint-Function[(Parameter-Set)] The Parameter-Set contains the parameters that control the validation process provided by the constraint function on the target JSON value. Please note that the Parameter-Set including the opening and closing parentheses are optional. The ellipsis or three dots ... after a parameter type indicates it can accept any number of arguments of that type. When using multiple validation functions, each function validates the target JSON value, and the overall validation succeeds only when every function independently deems the target JSON value as valid. Function Details Below, you will find a detailed explanation of the syntax and useful applications of each function, allowing you to gain a clear understanding of their usage. String Length #string target - @length(#integer number) Validates that the target string has the length specified by the number. If the length of the target string does not match the value specified by number, a validation error will generate. #string target - @length(#integer minimum, #integer maximum) Validates that the length of the target string satisfies the range requirement specified by the parameters. It checks that the length of the target string is equal to or greater than the minimum length specified and simultaneously less than or equal to the maximum length specified. If not, a validation error will generate. If either the parameter values for minimum or maximum are unspecified or undefined, the undefined symbol ! can be used in place of either of these parameters. The following examples illustrate the various use cases of the @length function of the two variations described above, for the target data type string: Ues Cases Valid Values Invalid Values @length(4) \"ABCD\" \"AB\"; \"ABCDE\" @length(2, 4) \"AB\"; \"ABC\"; \"ABCD\" \"\"; \"A\"; \"ABCDE\" @length(2, !) \"AB\"; \"ABCDEFGH\" \"\"; \"A\" @length(!, 4) \"\"; \"A\"; \"ABC\"; \"ABCD\" \"ABCDE\"; \"ABCDEFGHI\" Array Length #array target - @length(#integer number) Validates that the target array has the length specified by the number. If the length of the target array does not match the value specified by number, a validation error will generate. #array target - @length(#integer minimum, #integer maximum) Validates that the length of the target array satisfies the range requirement specified by the parameters. It checks that the length of the target array is equal to or greater than the minimum length specified and simultaneously less than or equal to the maximum length specified. If not, a validation error will generate. If either the parameter values for minimum or maximum are unspecified or undefined, the undefined symbol ! can be used in place of either of these parameters. The following examples illustrate the various use cases of the @length function of the two variations described above, for the target data type array: Ues Cases Valid Values Invalid Values @length(4) [1, 2, 3, 4] [1, 2, 3]; [1, 2, 3, 4, 5] @length(2, 4) [1, 2]; [1, 2, 3]; [1, 2, 3, 4] []; [1]; [1, 2, 3, 4, 5] @length(2, !) [1, 2]; [1, 2, 3, 4, 5] []; [1] @length(!, 4) []; [1, 2]; [1, 2, 3, 4] [1, 2, 3, 4, 5]; [1, 2, 3, 4, 5, 6] Object Length / Size #object target - @length(#integer number) Validates that the target object has the length or size specified by the number. If the length of the target object does not match the value specified by number, a validation error will generate. #object target - @length(#integer minimum, #integer maximum) Validates that the length or size of the target object satisfies the range requirement specified by the parameters. It checks that the length of the target object is equal to or greater than the minimum length specified and simultaneously less than or equal to the maximum length specified. If not, a validation error will generate. If either the parameter values for minimum or maximum are unspecified or undefined, the undefined symbol ! can be used in place of either of these parameters. The following examples illustrate the various use cases of the @length function of the two variations described above, for the target data type object: Ues Cases Valid Values Invalid Values @length(4) {\"k1\":1, \"k2\":2, \"k3\":3, \"k4\":4} {\"k1\":1, \"k2\":2, \"k3\":3}; {\"k1\":1, \"k2\":2, \"k3\":3, \"k4\":4, \"k5\":5} @length(2, 4) {\"k1\":1, \"k2\":2}; {\"k1\":1, \"k2\":2, \"k3\":3, \"k4\":4} {}; {\"k1\":1}; {\"k1\":1, \"k2\":2, \"k3\":3, \"k4\":4, \"k5\":5} @length(2, !) {\"k1\":1, \"k2\":2}; {\"k1\":1, \"k2\":2, \"k3\":3, \"k4\":4, \"k5\":5} {}; {\"k1\":1} @length(!, 4) {}; {\"k1\":1, \"k2\":2}; {\"k1\":1, \"k2\":2, \"k3\":3, \"k4\":4} {\"k1\":1, \"k2\":2, \"k3\":3, \"k4\":4, \"k5\":5} Number Range #number target - @range(#number minimum, #number maximum) Validates that the target number satisfies the range requirement specified by the parameters. It checks that the target number is greater than or equal to the minimum number specified and simultaneously less than or equal to the maximum number specified. If not, a validation error will generate. If either the parameter values for minimum or maximum are unspecified or undefined, the undefined symbol ! can be used in place of either of these parameters. The following examples illustrate the various use cases of the @range function of the two variations described above, for the target data type number: Ues Cases Valid Values Invalid Values @range(2, 4) 2; 3; 4 0; 1; -100; 100 @range(2, !) 2; 3; 4; 100 0; 1; -100 @range(!, 4) 0; 1; 4; -100 5; 10; 100 Number Minimum #number target - @minimum(#number minimum) #number target - @minimum(#number minimum, #boolean exclusive) Validates that the target number is greater than or equal to the minimum number specified as a parameter, unless the exclusive parameter flag is explicitly set to true, in which case the target number must be exclusively greater than the minimum number. Ues Cases Valid Values Invalid Values minimum(0) 0; 1; 1000 -1; -10; -10000 minimum(10.5) 10.5; 10.6; 1000.1 10.49; 1.0; -100.1 minimum(0, true) 0.001; 1.01; 100.1 0; -0.01; -100.1 Number Maximum #number target - @maximum(#number maximum) #number target - @maximum(#number maximum, #boolean exclusive) Validates that the target number is less than or equal to the maximum number specified as a parameter, unless the exclusive parameter flag is explicitly set to true, in which case the target number must be exclusively less than the maximum number. Ues Cases Valid Values Invalid Values maximum(100) 100; -100; 0 101; 1000; 10000 maximum(10.5) 10.50; 10.49; -1000.1 10.51; 11.0; 1000.1 maximum(0, true) -0.001; -1.01; -1000.1 0; 0.01; 100.1 String Enum #string target - @enum(#string... items) Validates that the target string is equal to one of the strings specified by the items parameter. If not, a validation error will generate. Number Enum #number target - @enum(#number... items) Validates that the target number is equal to one of the numbers specified by the items parameter. If not, a validation error will generate. Array Elements #array target - @elements(#any... items) Validates that the target array contains every JSON value specified by the items parameter. If not, it generates a validation error. Object Keys #object target - @keys(#string... items) Validates that all the strings specified in the items parameter are present as keys in the target object. If any of them is missing, a validation error is generated. Object Values #object target - @values(#any... items) Validates that all the JSON values specified in the items parameter are present as values in the target object. If any of them is missing, a validation error is generated. String Regular Expression (Regex) #string target - @regex(#string pattern) Validates that the target string matches the regular expression pattern specified by the pattern parameter. The regular expression engine used here supports standard syntax from both POSIX (IEEE Portable Operating System Interface) Extended Regular Expressions and Perl-Compatible Regular Expressions (PCRE). For more details, please refer to POSIX Regular Expressions. Email Address #string target - @email Validates whether the target string represents a valid email address. It follows the SMTP protocol RFC 5322 specification for mailbox address format to identify a valid email address. In addition to conforming to this standard, it recognizes all widely used email address formats to ensure compatibility with various systems and user requirements. URL & URI Address #string target - @url(#string scheme) Validates whether the target string is a valid URL (Uniform Resource Locator) or URI (Uniform Resource Identifier) with a specific scheme provided by the scheme parameter. It follows the RFC 3986 URI Generic Syntax to determine the validity of the URL or URI. In addition to conforming to this standard, it recognizes all widely used URL and URI address formats, ensuring compatibility with a wide range of systems and user requirements. #string target - @url Validates whether the target string is a valid URL or URI with HTTP and HTTPS scheme. For more information please check the function #string target - @url(#string scheme). Phone Number #string target - @phone Validates whether the target string is a valid phone number. It follows the ITU-T E.163 and E.164 telephone number notation to determine the validity of the phone number. In addition to conforming to this standard, it recognizes all widely used national and international phone number formats, ensuring compatibility with a wide range of systems and user requirements. Date and Time #string target - @date(pattern) Validates that the target string matches the date and time pattern specified by the pattern parameter. It fully supports the ISO 8601 date and time format. Beyond this standard, it also allows custom date and time formats, ensuring compatibility with various systems and meeting diverse users and businesses requirements. This document provides a comprehensive overview of the date-time custom patterns. #string target - @time(pattern) Both the @date and @time functions support a complete range of date-time patterns, enabling the precise definition of any date and time scenario. Therefore, these functions can be used interchangeably. When the sole consideration is the date or day of the month in a year, employing the @date function is the more convenient choice. In contrast, when it becomes necessary to specify a particular time on a date, the @time function is the more appropriate option. To learn more about date-time patterns, please refer to this page. Date and Time Range #datetime target - @range(#string start, #string end) Validates that the target date-time satisfies the range requirement specified by the parameters. It checks that the target date-time is from or after the start date-time specified and simultaneously until and before the end date-time specified. If not, a validation error will generate. The start and end parameters must be the string representation of the target data type, which can either be a #date or #time type. If either the parameter values for start or end are unspecified or undefined, the undefined symbol ! can be used in place of either of these parameters. The following examples illustrate the various use cases of the @range function of the two variations described above, for the target type: Ues Cases Valid Values Invalid Values @range(\"2010-01-01\", \"2010-12-31\") 2010-01-01; 2010-06-30; 2010-12-31 2009-12-31; 2011-01-01; 2030-11-05 @range(\"2010-01-01T00:00:00.000Z\", \"2010-12-31T23:59:59.999Z\") 2010-01-01T00:00:00.000Z; 2010-12-31T23:59:59.999Z 2009-12-31T23:59:59.999Z @range(!, \"2010-12-31\") 1990-01-01; 2010-12-31 2011-01-01; 2030-11-05 @range(\"2010-01-01\", !) 2010-01-01; 2030-11-05 1990-01-01; 2009-12-31 Date and Time Start #datetime target - @start(#string reference) Validates that the target date-time starts from or finds after the specified reference date-time parameter. If the target date-time finds before the reference date-time, a validation error is triggered. The reference parameter must be the string representation of the target data type, which can either be a #date or #time type. Date and Time End #datetime target - @end(#string reference) Validates that the target date-time finds before or ends at the specified reference date-time parameter. If the target date-time finds after the reference date-time, a validation error is triggered. The reference parameter must be the string representation of the target data type, which can either be a #date or #time type. Date and Time Before #datetime target - @before(#string reference) Validates that the target date-time is exclusively before the reference date-time. If the target date-time finds on or after the reference date-time, a validation error is triggered. The reference parameter must be the string representation of the target data type, which can either be a #date or #time type. Date and Time After #datetime target - @after(#string reference) Validates that the target date-time is exclusively after the reference date-time. If the target date-time finds on or before the reference date-time, a validation error is triggered. The reference parameter must be the string representation of the target data type, which can either be a #date or #time type. Number Positive #number target - @positive Validates that the target number is positive. If the target number is zero or negative, it generates a validation error. Number Negative #number target - @negative Validates that the target number is negative. If the target number is zero or positive, it generates a validation error. String Not Empty #string target - @nonempty Validates that the target string is not empty. If the target string is empty, it generates a validation error. Array Not Empty #array target - @nonempty Validates that the target array is not empty. If the target array is empty, it generates a validation error. Object Not Empty #object target - @nonempty Validates that the target object is not empty. If the target object is empty, it generates a validation error."
       },
       "articles/intro.html": {
         "href": "articles/intro.html",
    @@ -412,12 +452,12 @@
       "articles/quickstart.html": {
         "href": "articles/quickstart.html",
         "title": "Getting Started | Json Schema",
    -    "keywords": "Getting Started This guide will walk you through the essential steps to quickly get up and running with New JSON Schema library. It is also assumes a modest familiarity with the .NET SDK and .NET CLI (command-line interface) toolchain including basic familiarity with NuGet packages. Additionally, it considers a certain level of knowledge in C# language. NuGet Library Package To get started, launch your preferred IDE (such as Visual Studio, JetBrains Rider, or VS Code) and open the C# project where you intend to include this library package. Within your IDE, navigate to the NuGet package manager and search for the package by the name 'RelogicLabs.JsonSchema'. Subsequently, proceed to add or install the package to your project. Alternatively, you can use the .NET CLI to add the package to your project. Simply run the following command, replacing 1.x.x with either the latest version or your preferred version: dotnet add package RelogicLabs.JsonSchema --version 1.x.x To verify the successful integration of the library into your project, you may manually inspect your project file, typically named .csproj, using a text editor, and search for the following XML snippet within the file:    For additional information regarding this library package, you can visit the NuGet package repository page of this library here. Write a Sample to Test With all the necessary components in place, you are now ready to create a sample schema and validate a corresponding JSON against the schema. The subsequent example presents a C# class featuring a method designed for validating a sample JSON based on a provided schema. If you are working with C# 11 or above, you can enhance the code further by utilizing new C# language features like raw string literals, file scoped namespaces and others. using RelogicLabs.JsonSchema; namespace CSharpApplication { public class SampleSchema { public bool CheckIsValid() { var schema = @\"%title: \"\"User Profile Response\"\" %version: 1.0.0 %schema: { \"\"user\"\": { \"\"id\"\": @range(1, 10000) #integer, /*username does not allow special characters*/ \"\"username\"\": @regex(\"\"[a-z_]{3,30}\"\") #string, /*currently only one role is allowed by system*/ \"\"role\"\": \"\"user\"\" #string, \"\"isActive\"\": #boolean, //user account current status \"\"registeredAt\"\": #time, \"\"profile\"\": { \"\"firstName\"\": @regex(\"\"[A-Za-z ]{3,50}\"\") #string, \"\"lastName\"\": @regex(\"\"[A-Za-z ]{3,50}\"\") #string, \"\"dateOfBirth\"\": #date, \"\"age\"\": @range(18, 130) #integer, \"\"email\"\": @email #string, \"\"pictureURL\"\": @url #string, \"\"address\"\": { \"\"street\"\": @length(10, 200) #string, \"\"city\"\": @length(3, 50) #string, \"\"country\"\": @regex(\"\"[A-Za-z ]{3,50}\"\") #string } #object #null } } }\"; var json = @\"{ \"\"user\"\": { \"\"id\"\": 9999, \"\"username\"\": \"\"johndoe\"\", \"\"role\"\": \"\"user\"\", \"\"isActive\"\": true, \"\"registeredAt\"\": \"\"2023-09-06T15:10:30.639Z\"\", \"\"profile\"\": { \"\"firstName\"\": \"\"John\"\", \"\"lastName\"\": \"\"Doe\"\", \"\"dateOfBirth\"\": \"\"1993-06-17\"\", \"\"age\"\": 30, \"\"email\"\": \"\"john.doe@example.com\"\", \"\"pictureURL\"\": \"\"https://example.com/picture.jpg\"\", \"\"address\"\": { \"\"street\"\": \"\"123 Some St\"\", \"\"city\"\": \"\"Some town\"\", \"\"country\"\": \"\"Some Country\"\" } } } }\"; JsonSchema jsonSchema = new(schema); return jsonSchema.IsValid(json); } } } Create Validation Errors Let's intentionally introduce a few errors by modifying the previous JSON document and then examine the validation results. To begin, we'll alter the id within the user object to a string type and observe the outcome. Additionally, we'll modify the username by inserting a space into its value, thus creating an invalid username. Below is the revised JSON representation, now containing these purposeful errors. { \"user\": { \"id\": \"not number\", \"username\": \"john doe\", \"role\": \"user\", \"isActive\": true, \"profile\": { \"firstName\": \"John\", \"lastName\": \"Doe\", \"age\": 30, \"email\": \"john.doe@example.com\", \"pictureURL\": \"https://example.com/picture.jpg\", \"address\": { \"street\": \"123 Some St\", \"city\": \"Some town\", \"country\": \"Some Country\" } } } } To achieve the desired outcome, please make the following changes to the preceding code. Specifically, ensure that any schema validation errors are displayed in the console. The modified code snippet that invokes the WriteError method to display the errors if validation fails is as follows: ... JsonSchema jsonSchema = new(schema); if(!jsonSchema.IsValid(json)) jsonSchema.WriteError(); ... Here is the error as displayed in the console. More specific errors will be listed first, followed by more general errors. Consequently, the specific errors will precisely pinpoint the issues within the JSON document, while the generic errors will provide contextual information about where the errors occurred. Schema (Line: 6:47) Json (Line: 3:30) [DTYP04]: Data type mismatch. Data type #integer is expected but found #string inferred by \"not number\". Schema (Line: 6:30) Json (Line: 3:30) [FUNC03]: Function @range(1, 10000) is incompatible with the target data type. Applying to a supported data type such as #number is expected but applied to an unsupported data type #string of \"not number\". Schema (Line: 8:36) Json (Line: 4:36) [REGX01]: Regex pattern does not match. String of pattern \"[a-z_]{3,30}\" is expected but found \"john doe\" that mismatches with pattern. Schema (Line: 5:28) Json (Line: 2:28) [VALD01]: Validation failed. Value {\"id\": @range(1, 10000) #integer, \"username\": @regex(\"[a-z_]{3,30}\") #string, \"role\": \"user\" #string, \"isActive\": #boolean, \"register...ing, \"country\": @regex(\"[A-Za-z ]{3,50}\") #string} #object #null}} is expected but found {\"id\": \"not number\", \"username\": \"john doe\", \"role\": \"user\", \"isActive\": true, \"registeredAt\": \"2023-09-06T15:10:30.639Z\", \"profile\":...: \"123 Some St\", \"city\": \"Some town\", \"country\": \"Some Country\"}}}. Schema (Line: 4:16) Json (Line: 1:0) [VALD01]: Validation failed. Value {\"user\": {\"id\": @range(1, 10000) #integer, \"username\": @regex(\"[a-z_]{3,30}\") #string, \"role\": \"user\" #string, \"isActive\": #boolean, ...ng, \"country\": @regex(\"[A-Za-z ]{3,50}\") #string} #object #null}}} is expected but found {\"user\": {\"id\": \"not number\", \"username\": \"john doe\", \"role\": \"user\", \"isActive\": true, \"registeredAt\": \"2023-09-06T15:10:30.639Z\", \"... \"123 Some St\", \"city\": \"Some town\", \"country\": \"Some Country\"}}}}. Assertion for Validation To utilize this library for test automation and API testing, you can use the following alternative code snippet to perform assertions on input JSON against a specified schema. For instance, let's examine how to assert the JSON, which has been intentionally altered to introduce some errors, against the aforementioned schema. The following demonstrates the adjusted code for asserting the JSON with errors: ... try { JsonAssert.IsValid(schema, json); } catch(Exception e) { Console.Error.WriteLine(e); } ... The following presents the printed stack trace for the preceding example. It's important to note that when using JsonAssert, it throws an exception upon encountering the first error, thus preventing the continuation of processing the rest of the schema: RelogicLabs.JsonSchema.Exceptions.JsonSchemaException: DTYP04: Data type mismatch Expected (Schema Line: 6:47): data type #integer Actual (Json Line: 3:30): found #string inferred by \"not number\" at RelogicLabs.JsonSchema.Tree.RuntimeContext.FailWith(Exception exception) at RelogicLabs.JsonSchema.Types.JNode.FailWith(Exception exception) at RelogicLabs.JsonSchema.Types.JDataType.MatchForReport(JNode node, Boolean nested) at RelogicLabs.JsonSchema.Types.JValidator.<>c__DisplayClass15_0.b__2(JDataType d) at RelogicLabs.JsonSchema.Utilities.CollectionExtensions.ForEach[T](IEnumerable`1 enumeration, Action`1 action) at RelogicLabs.JsonSchema.Types.JValidator.MatchDataType(JNode node) at RelogicLabs.JsonSchema.Types.JValidator.Match(JNode node) at RelogicLabs.JsonSchema.Types.JObject.Match(JNode node) at RelogicLabs.JsonSchema.Types.JValidator.Match(JNode node) at RelogicLabs.JsonSchema.Types.JObject.Match(JNode node) at RelogicLabs.JsonSchema.Types.JValidator.Match(JNode node) at RelogicLabs.JsonSchema.Types.JRoot.Match(JNode node) at RelogicLabs.JsonSchema.JsonAssert.IsValid(String schemaExpected, String jsonActual) at CSharpApplication.SampleSchema.CheckIsValid() in /SampleSchema.cs:line 62 For more information about the schema syntax format and library functionalities, please refer to the reference documentation here."
    +    "keywords": "Getting Started This guide will walk you through the essential steps to quickly get up and running with the New JSON Schema library. It is also assumed a modest familiarity with the C# language, .NET SDK, and .NET CLI (command-line interface), including basic familiarity with NuGet packages. NuGet Library Package To get started, launch your preferred IDE (such as Visual Studio, JetBrains Rider, or VS Code) and open the C# project where you intend to include this library package. Within your IDE, navigate to the NuGet package manager and search for the package by the name 'RelogicLabs.JsonSchema'. Subsequently, proceed to add or install the package to your project. Alternatively, you can use the .NET CLI to add the package to your project. Simply run the following command, replacing 1.x.x with either the latest version or your preferred version: dotnet add package RelogicLabs.JsonSchema --version 1.x.x To verify the successful integration of the library into your project, you may manually inspect your project file, typically named .csproj, using a text editor, and search for the following XML snippet within the file:    For additional information regarding this library package, you can visit the NuGet package repository page of this library here. Write a Sample to Test With all the necessary components in place, you are now ready to create a sample schema and validate a corresponding JSON against the schema. The subsequent example presents a C# class featuring a method designed for validating a sample JSON based on a provided schema. If you are working with C# 11 or above, you can enhance the code further by utilizing new language features like raw string literals, file scoped namespaces and others. using RelogicLabs.JsonSchema; namespace CSharpApplication { public class SampleSchema { public bool CheckIsValid() { var schema = @\"%title: \"\"User Profile Response\"\" %version: 1.0.0 %schema: { \"\"user\"\": { \"\"id\"\": @range(1, 10000) #integer, /*username does not allow special characters*/ \"\"username\"\": @regex(\"\"[a-z_]{3,30}\"\") #string, /*currently only one role is allowed by system*/ \"\"role\"\": \"\"user\"\" #string, \"\"isActive\"\": #boolean, //user account current status \"\"registeredAt\"\": #time, \"\"profile\"\": { \"\"firstName\"\": @regex(\"\"[A-Za-z ]{3,50}\"\") #string, \"\"lastName\"\": @regex(\"\"[A-Za-z ]{3,50}\"\") #string, \"\"dateOfBirth\"\": #date, \"\"age\"\": @range(18, 130) #integer, \"\"email\"\": @email #string, \"\"pictureURL\"\": @url #string, \"\"address\"\": { \"\"street\"\": @length(10, 200) #string, \"\"city\"\": @length(3, 50) #string, \"\"country\"\": @regex(\"\"[A-Za-z ]{3,50}\"\") #string } #object #null } } }\"; var json = @\"{ \"\"user\"\": { \"\"id\"\": 9999, \"\"username\"\": \"\"johndoe\"\", \"\"role\"\": \"\"user\"\", \"\"isActive\"\": true, \"\"registeredAt\"\": \"\"2023-09-06T15:10:30.639Z\"\", \"\"profile\"\": { \"\"firstName\"\": \"\"John\"\", \"\"lastName\"\": \"\"Doe\"\", \"\"dateOfBirth\"\": \"\"1993-06-17\"\", \"\"age\"\": 30, \"\"email\"\": \"\"john.doe@example.com\"\", \"\"pictureURL\"\": \"\"https://example.com/picture.jpg\"\", \"\"address\"\": { \"\"street\"\": \"\"123 Some St\"\", \"\"city\"\": \"\"Some town\"\", \"\"country\"\": \"\"Some Country\"\" } } } }\"; JsonSchema jsonSchema = new(schema); return jsonSchema.IsValid(json); } } } Create Validation Errors Let's intentionally introduce a few errors by modifying the previous JSON document and then examine the validation results. To begin, we'll alter the id within the user object to a string type and observe the outcome. Additionally, we'll modify the username by inserting a space into its value, thus creating an invalid username. Below is the revised JSON representation, now containing these purposeful errors. { \"user\": { \"id\": \"not number\", \"username\": \"john doe\", \"role\": \"user\", \"isActive\": true, \"profile\": { \"firstName\": \"John\", \"lastName\": \"Doe\", \"age\": 30, \"email\": \"john.doe@example.com\", \"pictureURL\": \"https://example.com/picture.jpg\", \"address\": { \"street\": \"123 Some St\", \"city\": \"Some town\", \"country\": \"Some Country\" } } } } To achieve the desired outcome, please make the following changes to the preceding code. Specifically, ensure that any schema validation errors are displayed in the console. The modified code snippet that invokes the WriteError method to display the errors if validation fails is as follows: ... JsonSchema jsonSchema = new(schema); if(!jsonSchema.IsValid(json)) jsonSchema.WriteError(); ... Here is the error as displayed in the console. More specific errors will be listed first, followed by more general errors. Consequently, the specific errors will precisely pinpoint the issues within the JSON document, while the generic errors will provide contextual information about where the errors occurred. Schema (Line: 6:47) Json (Line: 3:30) [DTYP04]: Data type mismatch. Data type #integer is expected but found #string inferred by \"not number\". Schema (Line: 6:30) Json (Line: 3:30) [FUNC03]: Function @range(1, 10000) is incompatible with the target data type. Applying to a supported data type such as #number is expected but applied to an unsupported data type #string of \"not number\". Schema (Line: 8:36) Json (Line: 4:36) [REGX01]: Regex pattern does not match. String of pattern \"[a-z_]{3,30}\" is expected but found \"john doe\" that mismatches with pattern. Schema (Line: 5:28) Json (Line: 2:28) [VALD01]: Validation failed. Value {\"id\": @range(1, 10000) #integer, \"username\": @regex(\"[a-z_]{3,30}\") #string, \"role\": \"user\" #string, \"isActive\": #boolean, \"register...ing, \"country\": @regex(\"[A-Za-z ]{3,50}\") #string} #object #null}} is expected but found {\"id\": \"not number\", \"username\": \"john doe\", \"role\": \"user\", \"isActive\": true, \"registeredAt\": \"2023-09-06T15:10:30.639Z\", \"profile\":...: \"123 Some St\", \"city\": \"Some town\", \"country\": \"Some Country\"}}}. Schema (Line: 4:16) Json (Line: 1:0) [VALD01]: Validation failed. Value {\"user\": {\"id\": @range(1, 10000) #integer, \"username\": @regex(\"[a-z_]{3,30}\") #string, \"role\": \"user\" #string, \"isActive\": #boolean, ...ng, \"country\": @regex(\"[A-Za-z ]{3,50}\") #string} #object #null}}} is expected but found {\"user\": {\"id\": \"not number\", \"username\": \"john doe\", \"role\": \"user\", \"isActive\": true, \"registeredAt\": \"2023-09-06T15:10:30.639Z\", \"... \"123 Some St\", \"city\": \"Some town\", \"country\": \"Some Country\"}}}}. Assertion for Validation To utilize this library for test automation and API testing, you can use the following alternative code snippet to perform assertions on input JSON against a specified schema. For instance, let's examine how to assert the JSON, which has been intentionally altered to introduce some errors, against the aforementioned schema. The following demonstrates the adjusted code for asserting the JSON with errors: ... try { JsonAssert.IsValid(schema, json); } catch(Exception e) { Console.Error.WriteLine(e); } ... The following presents the printed stack trace for the preceding example. It's important to note that when using JsonAssert, it throws an exception upon encountering the first error, thus preventing the continuation of processing the rest of the schema: RelogicLabs.JsonSchema.Exceptions.JsonSchemaException: DTYP04: Data type mismatch Expected (Schema Line: 6:47): data type #integer Actual (Json Line: 3:30): found #string inferred by \"not number\" at RelogicLabs.JsonSchema.Tree.RuntimeContext.FailWith(Exception exception) at RelogicLabs.JsonSchema.Types.JNode.FailWith(Exception exception) at RelogicLabs.JsonSchema.Types.JDataType.MatchForReport(JNode node, Boolean nested) at RelogicLabs.JsonSchema.Types.JValidator.<>c__DisplayClass15_0.b__2(JDataType d) at RelogicLabs.JsonSchema.Utilities.CollectionExtensions.ForEach[T](IEnumerable`1 enumeration, Action`1 action) at RelogicLabs.JsonSchema.Types.JValidator.MatchDataType(JNode node) at RelogicLabs.JsonSchema.Types.JValidator.Match(JNode node) at RelogicLabs.JsonSchema.Types.JObject.Match(JNode node) at RelogicLabs.JsonSchema.Types.JValidator.Match(JNode node) at RelogicLabs.JsonSchema.Types.JObject.Match(JNode node) at RelogicLabs.JsonSchema.Types.JValidator.Match(JNode node) at RelogicLabs.JsonSchema.Types.JRoot.Match(JNode node) at RelogicLabs.JsonSchema.JsonAssert.IsValid(String schemaExpected, String jsonActual) at CSharpApplication.SampleSchema.CheckIsValid() in /SampleSchema.cs:line 62 For more information about the schema syntax format and library functionalities, please refer to the reference documentation here."
       },
       "articles/sourcebuild.html": {
         "href": "articles/sourcebuild.html",
         "title": "Build from Source Code | Json Schema",
    -    "keywords": "Build from Source Code This comprehensive guide illustrates the procedures for retrieving source code from a GitHub repository, compiling the project source code into a library, and seamlessly integrating the compiled library into your project. Within this document, we will navigate through these steps, presenting them clearly and straightforwardly. Build the Library To get started, clone the project from the following URL using your preferred Git client (command line or GUI). You can open a terminal and enter the following Git clone command as shown below: git clone https://github.com/relogiclabs/JsonSchema-DotNet.git Next, use .NET build command dotnet build to build the project and Retrieve the DLL file, RelogicLabs.JsonSchema.dll from the bin folder. Add the Library to Your Project To integrate the library with your project, you can create a libs folder within your project directory and place the retrieved DLL file into the designated folder. Alternatively, if your IDE supports adding references, you can conveniently select the DLL from the libs folder. Alternatively, you can manually modify your project file .csproj using a text editor and include the following XML snippet:   libs\\RelogicLabs.JsonSchema.dll   Additionally, this project has a dependency on ANTLR runtime, which you can integrate by executing the following command: dotnet add package Antlr4.Runtime.Standard --version 4.13.1 Write a Sample to Test With all the necessary components in place, you are now ready to create a sample schema and validate a corresponding JSON against the schema. The subsequent example presents a C# class featuring a method designed for validating a sample JSON based on a provided schema. If you are working with C# 11 or above, you can enhance the code further by utilizing new C# language features like raw string literals, file scoped namespaces and others. using RelogicLabs.JsonSchema; namespace CSharpApplication { public class SampleSchema { public bool CheckIsValid() { var schema = @\"%title: \"\"User Profile Response\"\" %version: 1.0.0 %schema: { \"\"user\"\": { \"\"id\"\": @range(1, 10000) #integer, /*username does not allow special characters*/ \"\"username\"\": @regex(\"\"[a-z_]{3,30}\"\") #string, /*currently only one role is allowed by system*/ \"\"role\"\": \"\"user\"\" #string, \"\"isActive\"\": #boolean, //user account current status \"\"registeredAt\"\": #time, \"\"profile\"\": { \"\"firstName\"\": @regex(\"\"[A-Za-z ]{3,50}\"\") #string, \"\"lastName\"\": @regex(\"\"[A-Za-z ]{3,50}\"\") #string, \"\"dateOfBirth\"\": #date, \"\"age\"\": @range(18, 130) #integer, \"\"email\"\": @email #string, \"\"pictureURL\"\": @url #string, \"\"address\"\": { \"\"street\"\": @length(10, 200) #string, \"\"city\"\": @length(3, 50) #string, \"\"country\"\": @regex(\"\"[A-Za-z ]{3,50}\"\") #string } #object #null } } }\"; var json = @\"{ \"\"user\"\": { \"\"id\"\": 9999, \"\"username\"\": \"\"johndoe\"\", \"\"role\"\": \"\"user\"\", \"\"isActive\"\": true, \"\"registeredAt\"\": \"\"2023-09-06T15:10:30.639Z\"\", \"\"profile\"\": { \"\"firstName\"\": \"\"John\"\", \"\"lastName\"\": \"\"Doe\"\", \"\"dateOfBirth\"\": \"\"1993-06-17\"\", \"\"age\"\": 30, \"\"email\"\": \"\"john.doe@example.com\"\", \"\"pictureURL\"\": \"\"https://example.com/picture.jpg\"\", \"\"address\"\": { \"\"street\"\": \"\"123 Some St\"\", \"\"city\"\": \"\"Some town\"\", \"\"country\"\": \"\"Some Country\"\" } } } }\"; JsonSchema jsonSchema = new(schema); return jsonSchema.IsValid(json); } } } Create Validation Errors Let's intentionally introduce a few errors by modifying the previous JSON document and then examine the validation results. To begin, we'll alter the id within the user object to a string type and observe the outcome. Additionally, we'll modify the username by inserting a space into its value, thus creating an invalid username. Below is the revised JSON representation, now containing these purposeful errors. { \"user\": { \"id\": \"not number\", \"username\": \"john doe\", \"role\": \"user\", \"isActive\": true, \"profile\": { \"firstName\": \"John\", \"lastName\": \"Doe\", \"age\": 30, \"email\": \"john.doe@example.com\", \"pictureURL\": \"https://example.com/picture.jpg\", \"address\": { \"street\": \"123 Some St\", \"city\": \"Some town\", \"country\": \"Some Country\" } } } } To achieve the desired outcome, please make the following changes to the preceding code. Specifically, ensure that any schema validation errors are displayed in the console. The modified code snippet that invokes the WriteError method to display the errors if validation fails is as follows: ... JsonSchema jsonSchema = new(schema); if(!jsonSchema.IsValid(json)) jsonSchema.WriteError(); ... Here is the error as displayed in the console. More specific errors will be listed first, followed by more general errors. Consequently, the specific errors will precisely pinpoint the issues within the JSON document, while the generic errors will provide contextual information about where the errors occurred. Schema (Line: 6:47) Json (Line: 3:30) [DTYP04]: Data type mismatch. Data type #integer is expected but found #string inferred by \"not number\". Schema (Line: 6:30) Json (Line: 3:30) [FUNC03]: Function @range(1, 10000) is incompatible with the target data type. Applying to a supported data type such as #number is expected but applied to an unsupported data type #string of \"not number\". Schema (Line: 8:36) Json (Line: 4:36) [REGX01]: Regex pattern does not match. String of pattern \"[a-z_]{3,30}\" is expected but found \"john doe\" that mismatches with pattern. Schema (Line: 5:28) Json (Line: 2:28) [VALD01]: Validation failed. Value {\"id\": @range(1, 10000) #integer, \"username\": @regex(\"[a-z_]{3,30}\") #string, \"role\": \"user\" #string, \"isActive\": #boolean, \"register...ing, \"country\": @regex(\"[A-Za-z ]{3,50}\") #string} #object #null}} is expected but found {\"id\": \"not number\", \"username\": \"john doe\", \"role\": \"user\", \"isActive\": true, \"registeredAt\": \"2023-09-06T15:10:30.639Z\", \"profile\":...: \"123 Some St\", \"city\": \"Some town\", \"country\": \"Some Country\"}}}. Schema (Line: 4:16) Json (Line: 1:0) [VALD01]: Validation failed. Value {\"user\": {\"id\": @range(1, 10000) #integer, \"username\": @regex(\"[a-z_]{3,30}\") #string, \"role\": \"user\" #string, \"isActive\": #boolean, ...ng, \"country\": @regex(\"[A-Za-z ]{3,50}\") #string} #object #null}}} is expected but found {\"user\": {\"id\": \"not number\", \"username\": \"john doe\", \"role\": \"user\", \"isActive\": true, \"registeredAt\": \"2023-09-06T15:10:30.639Z\", \"... \"123 Some St\", \"city\": \"Some town\", \"country\": \"Some Country\"}}}}. Assertion for Validation To utilize this library for test automation and API testing, you can use the following alternative code snippet to perform assertions on input JSON against a specified schema. For instance, let's examine how to assert the JSON, which has been intentionally altered to introduce some errors, against the aforementioned schema. The following demonstrates the adjusted code for asserting the JSON with errors: ... try { JsonAssert.IsValid(schema, json); } catch(Exception e) { Console.Error.WriteLine(e); } ... The following presents the printed stack trace for the preceding example. It's important to note that when using JsonAssert, it throws an exception upon encountering the first error, thus preventing the continuation of processing the rest of the schema: RelogicLabs.JsonSchema.Exceptions.JsonSchemaException: DTYP04: Data type mismatch Expected (Schema Line: 6:47): data type #integer Actual (Json Line: 3:30): found #string inferred by \"not number\" at RelogicLabs.JsonSchema.Tree.RuntimeContext.FailWith(Exception exception) at RelogicLabs.JsonSchema.Types.JNode.FailWith(Exception exception) at RelogicLabs.JsonSchema.Types.JDataType.MatchForReport(JNode node, Boolean nested) at RelogicLabs.JsonSchema.Types.JValidator.<>c__DisplayClass15_0.b__2(JDataType d) at RelogicLabs.JsonSchema.Utilities.CollectionExtensions.ForEach[T](IEnumerable`1 enumeration, Action`1 action) at RelogicLabs.JsonSchema.Types.JValidator.MatchDataType(JNode node) at RelogicLabs.JsonSchema.Types.JValidator.Match(JNode node) at RelogicLabs.JsonSchema.Types.JObject.Match(JNode node) at RelogicLabs.JsonSchema.Types.JValidator.Match(JNode node) at RelogicLabs.JsonSchema.Types.JObject.Match(JNode node) at RelogicLabs.JsonSchema.Types.JValidator.Match(JNode node) at RelogicLabs.JsonSchema.Types.JRoot.Match(JNode node) at RelogicLabs.JsonSchema.JsonAssert.IsValid(String schemaExpected, String jsonActual) at CSharpApplication.SampleSchema.CheckIsValid() in /SampleSchema.cs:line 62 For more information about the schema syntax format and library functionalities, please refer to the reference documentation here."
    +    "keywords": "Build from Source Code This comprehensive guide illustrates the procedures for retrieving source code from a GitHub repository, compiling the project source code into a library, and seamlessly integrating the compiled library into your project. It is essential to have a foundational understanding of the C# language, as well as a modest level of familiarity with the .NET SDK and CLI. Build the Library To get started, clone the project from the following URL using your preferred Git client (command line or GUI). You can open a terminal and enter the following Git clone command as shown below: git clone https://github.com/relogiclabs/JsonSchema-DotNet.git Next, use .NET build command dotnet build to build the project and Retrieve the DLL file, RelogicLabs.JsonSchema.dll from the bin folder. Add the Library to Your Project To integrate the library with your project, you can create a libs folder within your project directory and place the retrieved DLL file into the designated folder. Alternatively, if your IDE supports adding references, you can conveniently select the DLL from the libs folder. Alternatively, you can manually modify your project file .csproj using a text editor and include the following XML snippet:   libs\\RelogicLabs.JsonSchema.dll   Additionally, this project has a dependency on ANTLR runtime, which you can integrate by executing the following command: dotnet add package Antlr4.Runtime.Standard --version 4.13.1 Write a Sample to Test With all the necessary components in place, you are now ready to create a sample schema and validate a corresponding JSON against the schema. The subsequent example presents a C# class featuring a method designed for validating a sample JSON based on a provided schema. If you are working with C# 11 or above, you can enhance the code further by utilizing new C# language features like raw string literals, file scoped namespaces and others. using RelogicLabs.JsonSchema; namespace CSharpApplication { public class SampleSchema { public bool CheckIsValid() { var schema = @\"%title: \"\"User Profile Response\"\" %version: 1.0.0 %schema: { \"\"user\"\": { \"\"id\"\": @range(1, 10000) #integer, /*username does not allow special characters*/ \"\"username\"\": @regex(\"\"[a-z_]{3,30}\"\") #string, /*currently only one role is allowed by system*/ \"\"role\"\": \"\"user\"\" #string, \"\"isActive\"\": #boolean, //user account current status \"\"registeredAt\"\": #time, \"\"profile\"\": { \"\"firstName\"\": @regex(\"\"[A-Za-z ]{3,50}\"\") #string, \"\"lastName\"\": @regex(\"\"[A-Za-z ]{3,50}\"\") #string, \"\"dateOfBirth\"\": #date, \"\"age\"\": @range(18, 130) #integer, \"\"email\"\": @email #string, \"\"pictureURL\"\": @url #string, \"\"address\"\": { \"\"street\"\": @length(10, 200) #string, \"\"city\"\": @length(3, 50) #string, \"\"country\"\": @regex(\"\"[A-Za-z ]{3,50}\"\") #string } #object #null } } }\"; var json = @\"{ \"\"user\"\": { \"\"id\"\": 9999, \"\"username\"\": \"\"johndoe\"\", \"\"role\"\": \"\"user\"\", \"\"isActive\"\": true, \"\"registeredAt\"\": \"\"2023-09-06T15:10:30.639Z\"\", \"\"profile\"\": { \"\"firstName\"\": \"\"John\"\", \"\"lastName\"\": \"\"Doe\"\", \"\"dateOfBirth\"\": \"\"1993-06-17\"\", \"\"age\"\": 30, \"\"email\"\": \"\"john.doe@example.com\"\", \"\"pictureURL\"\": \"\"https://example.com/picture.jpg\"\", \"\"address\"\": { \"\"street\"\": \"\"123 Some St\"\", \"\"city\"\": \"\"Some town\"\", \"\"country\"\": \"\"Some Country\"\" } } } }\"; JsonSchema jsonSchema = new(schema); return jsonSchema.IsValid(json); } } } Create Validation Errors Let's intentionally introduce a few errors by modifying the previous JSON document and then examine the validation results. To begin, we'll alter the id within the user object to a string type and observe the outcome. Additionally, we'll modify the username by inserting a space into its value, thus creating an invalid username. Below is the revised JSON representation, now containing these purposeful errors. { \"user\": { \"id\": \"not number\", \"username\": \"john doe\", \"role\": \"user\", \"isActive\": true, \"profile\": { \"firstName\": \"John\", \"lastName\": \"Doe\", \"age\": 30, \"email\": \"john.doe@example.com\", \"pictureURL\": \"https://example.com/picture.jpg\", \"address\": { \"street\": \"123 Some St\", \"city\": \"Some town\", \"country\": \"Some Country\" } } } } To achieve the desired outcome, please make the following changes to the preceding code. Specifically, ensure that any schema validation errors are displayed in the console. The modified code snippet that invokes the WriteError method to display the errors if validation fails is as follows: ... JsonSchema jsonSchema = new(schema); if(!jsonSchema.IsValid(json)) jsonSchema.WriteError(); ... Here is the error as displayed in the console. More specific errors will be listed first, followed by more general errors. Consequently, the specific errors will precisely pinpoint the issues within the JSON document, while the generic errors will provide contextual information about where the errors occurred. Schema (Line: 6:47) Json (Line: 3:30) [DTYP04]: Data type mismatch. Data type #integer is expected but found #string inferred by \"not number\". Schema (Line: 6:30) Json (Line: 3:30) [FUNC03]: Function @range(1, 10000) is incompatible with the target data type. Applying to a supported data type such as #number is expected but applied to an unsupported data type #string of \"not number\". Schema (Line: 8:36) Json (Line: 4:36) [REGX01]: Regex pattern does not match. String of pattern \"[a-z_]{3,30}\" is expected but found \"john doe\" that mismatches with pattern. Schema (Line: 5:28) Json (Line: 2:28) [VALD01]: Validation failed. Value {\"id\": @range(1, 10000) #integer, \"username\": @regex(\"[a-z_]{3,30}\") #string, \"role\": \"user\" #string, \"isActive\": #boolean, \"register...ing, \"country\": @regex(\"[A-Za-z ]{3,50}\") #string} #object #null}} is expected but found {\"id\": \"not number\", \"username\": \"john doe\", \"role\": \"user\", \"isActive\": true, \"registeredAt\": \"2023-09-06T15:10:30.639Z\", \"profile\":...: \"123 Some St\", \"city\": \"Some town\", \"country\": \"Some Country\"}}}. Schema (Line: 4:16) Json (Line: 1:0) [VALD01]: Validation failed. Value {\"user\": {\"id\": @range(1, 10000) #integer, \"username\": @regex(\"[a-z_]{3,30}\") #string, \"role\": \"user\" #string, \"isActive\": #boolean, ...ng, \"country\": @regex(\"[A-Za-z ]{3,50}\") #string} #object #null}}} is expected but found {\"user\": {\"id\": \"not number\", \"username\": \"john doe\", \"role\": \"user\", \"isActive\": true, \"registeredAt\": \"2023-09-06T15:10:30.639Z\", \"... \"123 Some St\", \"city\": \"Some town\", \"country\": \"Some Country\"}}}}. Assertion for Validation To utilize this library for test automation and API testing, you can use the following alternative code snippet to perform assertions on input JSON against a specified schema. For instance, let's examine how to assert the JSON, which has been intentionally altered to introduce some errors, against the aforementioned schema. The following demonstrates the adjusted code for asserting the JSON with errors: ... try { JsonAssert.IsValid(schema, json); } catch(Exception e) { Console.Error.WriteLine(e); } ... The following presents the printed stack trace for the preceding example. It's important to note that when using JsonAssert, it throws an exception upon encountering the first error, thus preventing the continuation of processing the rest of the schema: RelogicLabs.JsonSchema.Exceptions.JsonSchemaException: DTYP04: Data type mismatch Expected (Schema Line: 6:47): data type #integer Actual (Json Line: 3:30): found #string inferred by \"not number\" at RelogicLabs.JsonSchema.Tree.RuntimeContext.FailWith(Exception exception) at RelogicLabs.JsonSchema.Types.JNode.FailWith(Exception exception) at RelogicLabs.JsonSchema.Types.JDataType.MatchForReport(JNode node, Boolean nested) at RelogicLabs.JsonSchema.Types.JValidator.<>c__DisplayClass15_0.b__2(JDataType d) at RelogicLabs.JsonSchema.Utilities.CollectionExtensions.ForEach[T](IEnumerable`1 enumeration, Action`1 action) at RelogicLabs.JsonSchema.Types.JValidator.MatchDataType(JNode node) at RelogicLabs.JsonSchema.Types.JValidator.Match(JNode node) at RelogicLabs.JsonSchema.Types.JObject.Match(JNode node) at RelogicLabs.JsonSchema.Types.JValidator.Match(JNode node) at RelogicLabs.JsonSchema.Types.JObject.Match(JNode node) at RelogicLabs.JsonSchema.Types.JValidator.Match(JNode node) at RelogicLabs.JsonSchema.Types.JRoot.Match(JNode node) at RelogicLabs.JsonSchema.JsonAssert.IsValid(String schemaExpected, String jsonActual) at CSharpApplication.SampleSchema.CheckIsValid() in /SampleSchema.cs:line 62 For more information about the schema syntax format and library functionalities, please refer to the reference documentation here."
       },
       "articles/specification.html": {
         "href": "articles/specification.html",
    diff --git a/JsonSchema/doc/manifest.json b/JsonSchema/doc/manifest.json
    index 6e44ac8..23b4a80 100644
    --- a/JsonSchema/doc/manifest.json
    +++ b/JsonSchema/doc/manifest.json
    @@ -381,6 +381,36 @@
           },
           "version": ""
         },
    +    {
    +      "type": "ManagedReference",
    +      "source_relative_path": "api/RelogicLabs.JsonSchema.Time.DateTimeType.yml",
    +      "output": {
    +        ".html": {
    +          "relative_path": "api/RelogicLabs.JsonSchema.Time.DateTimeType.html"
    +        }
    +      },
    +      "version": ""
    +    },
    +    {
    +      "type": "ManagedReference",
    +      "source_relative_path": "api/RelogicLabs.JsonSchema.Time.JsonDateTime.yml",
    +      "output": {
    +        ".html": {
    +          "relative_path": "api/RelogicLabs.JsonSchema.Time.JsonDateTime.html"
    +        }
    +      },
    +      "version": ""
    +    },
    +    {
    +      "type": "ManagedReference",
    +      "source_relative_path": "api/RelogicLabs.JsonSchema.Time.yml",
    +      "output": {
    +        ".html": {
    +          "relative_path": "api/RelogicLabs.JsonSchema.Time.html"
    +        }
    +      },
    +      "version": ""
    +    },
         {
           "type": "ManagedReference",
           "source_relative_path": "api/RelogicLabs.JsonSchema.Tree.Context.yml",
    @@ -391,6 +421,16 @@
           },
           "version": ""
         },
    +    {
    +      "type": "ManagedReference",
    +      "source_relative_path": "api/RelogicLabs.JsonSchema.Tree.FunctionRegistry.yml",
    +      "output": {
    +        ".html": {
    +          "relative_path": "api/RelogicLabs.JsonSchema.Tree.FunctionRegistry.html"
    +        }
    +      },
    +      "version": ""
    +    },
         {
           "type": "ManagedReference",
           "source_relative_path": "api/RelogicLabs.JsonSchema.Tree.JsonTree.yml",
    @@ -411,6 +451,16 @@
           },
           "version": ""
         },
    +    {
    +      "type": "ManagedReference",
    +      "source_relative_path": "api/RelogicLabs.JsonSchema.Tree.PragmaRegistry.yml",
    +      "output": {
    +        ".html": {
    +          "relative_path": "api/RelogicLabs.JsonSchema.Tree.PragmaRegistry.html"
    +        }
    +      },
    +      "version": ""
    +    },
         {
           "type": "ManagedReference",
           "source_relative_path": "api/RelogicLabs.JsonSchema.Tree.RuntimeContext.yml",
    @@ -531,6 +581,26 @@
           },
           "version": ""
         },
    +    {
    +      "type": "ManagedReference",
    +      "source_relative_path": "api/RelogicLabs.JsonSchema.Types.JDate.yml",
    +      "output": {
    +        ".html": {
    +          "relative_path": "api/RelogicLabs.JsonSchema.Types.JDate.html"
    +        }
    +      },
    +      "version": ""
    +    },
    +    {
    +      "type": "ManagedReference",
    +      "source_relative_path": "api/RelogicLabs.JsonSchema.Types.JDateTime.yml",
    +      "output": {
    +        ".html": {
    +          "relative_path": "api/RelogicLabs.JsonSchema.Types.JDateTime.html"
    +        }
    +      },
    +      "version": ""
    +    },
         {
           "type": "ManagedReference",
           "source_relative_path": "api/RelogicLabs.JsonSchema.Types.JDefinition.yml",
    @@ -701,6 +771,16 @@
           },
           "version": ""
         },
    +    {
    +      "type": "ManagedReference",
    +      "source_relative_path": "api/RelogicLabs.JsonSchema.Types.JTime.yml",
    +      "output": {
    +        ".html": {
    +          "relative_path": "api/RelogicLabs.JsonSchema.Types.JTime.html"
    +        }
    +      },
    +      "version": ""
    +    },
         {
           "type": "ManagedReference",
           "source_relative_path": "api/RelogicLabs.JsonSchema.Types.JTitle.yml",
    diff --git a/JsonSchema/doc/xrefmap.yml b/JsonSchema/doc/xrefmap.yml
    index 89267ce..3d56caf 100644
    --- a/JsonSchema/doc/xrefmap.yml
    +++ b/JsonSchema/doc/xrefmap.yml
    @@ -1403,6 +1403,32 @@ references:
       fullName.vb: RelogicLabs.JsonSchema.Functions.CoreFunctions.New
       nameWithType: CoreFunctions.CoreFunctions
       nameWithType.vb: CoreFunctions.New
    +- uid: RelogicLabs.JsonSchema.Functions.CoreFunctions.After(RelogicLabs.JsonSchema.Types.JDateTime,RelogicLabs.JsonSchema.Types.JString)
    +  name: After(JDateTime, JString)
    +  href: api/RelogicLabs.JsonSchema.Functions.CoreFunctions.html#RelogicLabs_JsonSchema_Functions_CoreFunctions_After_RelogicLabs_JsonSchema_Types_JDateTime_RelogicLabs_JsonSchema_Types_JString_
    +  commentId: M:RelogicLabs.JsonSchema.Functions.CoreFunctions.After(RelogicLabs.JsonSchema.Types.JDateTime,RelogicLabs.JsonSchema.Types.JString)
    +  fullName: RelogicLabs.JsonSchema.Functions.CoreFunctions.After(RelogicLabs.JsonSchema.Types.JDateTime, RelogicLabs.JsonSchema.Types.JString)
    +  nameWithType: CoreFunctions.After(JDateTime, JString)
    +- uid: RelogicLabs.JsonSchema.Functions.CoreFunctions.After*
    +  name: After
    +  href: api/RelogicLabs.JsonSchema.Functions.CoreFunctions.html#RelogicLabs_JsonSchema_Functions_CoreFunctions_After_
    +  commentId: Overload:RelogicLabs.JsonSchema.Functions.CoreFunctions.After
    +  isSpec: "True"
    +  fullName: RelogicLabs.JsonSchema.Functions.CoreFunctions.After
    +  nameWithType: CoreFunctions.After
    +- uid: RelogicLabs.JsonSchema.Functions.CoreFunctions.Before(RelogicLabs.JsonSchema.Types.JDateTime,RelogicLabs.JsonSchema.Types.JString)
    +  name: Before(JDateTime, JString)
    +  href: api/RelogicLabs.JsonSchema.Functions.CoreFunctions.html#RelogicLabs_JsonSchema_Functions_CoreFunctions_Before_RelogicLabs_JsonSchema_Types_JDateTime_RelogicLabs_JsonSchema_Types_JString_
    +  commentId: M:RelogicLabs.JsonSchema.Functions.CoreFunctions.Before(RelogicLabs.JsonSchema.Types.JDateTime,RelogicLabs.JsonSchema.Types.JString)
    +  fullName: RelogicLabs.JsonSchema.Functions.CoreFunctions.Before(RelogicLabs.JsonSchema.Types.JDateTime, RelogicLabs.JsonSchema.Types.JString)
    +  nameWithType: CoreFunctions.Before(JDateTime, JString)
    +- uid: RelogicLabs.JsonSchema.Functions.CoreFunctions.Before*
    +  name: Before
    +  href: api/RelogicLabs.JsonSchema.Functions.CoreFunctions.html#RelogicLabs_JsonSchema_Functions_CoreFunctions_Before_
    +  commentId: Overload:RelogicLabs.JsonSchema.Functions.CoreFunctions.Before
    +  isSpec: "True"
    +  fullName: RelogicLabs.JsonSchema.Functions.CoreFunctions.Before
    +  nameWithType: CoreFunctions.Before
     - uid: RelogicLabs.JsonSchema.Functions.CoreFunctions.Date(RelogicLabs.JsonSchema.Types.JString,RelogicLabs.JsonSchema.Types.JString)
       name: Date(JString, JString)
       href: api/RelogicLabs.JsonSchema.Functions.CoreFunctions.html#RelogicLabs_JsonSchema_Functions_CoreFunctions_Date_RelogicLabs_JsonSchema_Types_JString_RelogicLabs_JsonSchema_Types_JString_
    @@ -1445,6 +1471,19 @@ references:
       isSpec: "True"
       fullName: RelogicLabs.JsonSchema.Functions.CoreFunctions.Email
       nameWithType: CoreFunctions.Email
    +- uid: RelogicLabs.JsonSchema.Functions.CoreFunctions.End(RelogicLabs.JsonSchema.Types.JDateTime,RelogicLabs.JsonSchema.Types.JString)
    +  name: End(JDateTime, JString)
    +  href: api/RelogicLabs.JsonSchema.Functions.CoreFunctions.html#RelogicLabs_JsonSchema_Functions_CoreFunctions_End_RelogicLabs_JsonSchema_Types_JDateTime_RelogicLabs_JsonSchema_Types_JString_
    +  commentId: M:RelogicLabs.JsonSchema.Functions.CoreFunctions.End(RelogicLabs.JsonSchema.Types.JDateTime,RelogicLabs.JsonSchema.Types.JString)
    +  fullName: RelogicLabs.JsonSchema.Functions.CoreFunctions.End(RelogicLabs.JsonSchema.Types.JDateTime, RelogicLabs.JsonSchema.Types.JString)
    +  nameWithType: CoreFunctions.End(JDateTime, JString)
    +- uid: RelogicLabs.JsonSchema.Functions.CoreFunctions.End*
    +  name: End
    +  href: api/RelogicLabs.JsonSchema.Functions.CoreFunctions.html#RelogicLabs_JsonSchema_Functions_CoreFunctions_End_
    +  commentId: Overload:RelogicLabs.JsonSchema.Functions.CoreFunctions.End
    +  isSpec: "True"
    +  fullName: RelogicLabs.JsonSchema.Functions.CoreFunctions.End
    +  nameWithType: CoreFunctions.End
     - uid: RelogicLabs.JsonSchema.Functions.CoreFunctions.Enum(RelogicLabs.JsonSchema.Types.JNumber,RelogicLabs.JsonSchema.Types.JNumber[])
       name: Enum(JNumber, params JNumber[])
       href: api/RelogicLabs.JsonSchema.Functions.CoreFunctions.html#RelogicLabs_JsonSchema_Functions_CoreFunctions_Enum_RelogicLabs_JsonSchema_Types_JNumber_RelogicLabs_JsonSchema_Types_JNumber___
    @@ -1667,6 +1706,24 @@ references:
       isSpec: "True"
       fullName: RelogicLabs.JsonSchema.Functions.CoreFunctions.Positive
       nameWithType: CoreFunctions.Positive
    +- uid: RelogicLabs.JsonSchema.Functions.CoreFunctions.Range(RelogicLabs.JsonSchema.Types.JDateTime,RelogicLabs.JsonSchema.Types.JString,RelogicLabs.JsonSchema.Types.JString)
    +  name: Range(JDateTime, JString, JString)
    +  href: api/RelogicLabs.JsonSchema.Functions.CoreFunctions.html#RelogicLabs_JsonSchema_Functions_CoreFunctions_Range_RelogicLabs_JsonSchema_Types_JDateTime_RelogicLabs_JsonSchema_Types_JString_RelogicLabs_JsonSchema_Types_JString_
    +  commentId: M:RelogicLabs.JsonSchema.Functions.CoreFunctions.Range(RelogicLabs.JsonSchema.Types.JDateTime,RelogicLabs.JsonSchema.Types.JString,RelogicLabs.JsonSchema.Types.JString)
    +  fullName: RelogicLabs.JsonSchema.Functions.CoreFunctions.Range(RelogicLabs.JsonSchema.Types.JDateTime, RelogicLabs.JsonSchema.Types.JString, RelogicLabs.JsonSchema.Types.JString)
    +  nameWithType: CoreFunctions.Range(JDateTime, JString, JString)
    +- uid: RelogicLabs.JsonSchema.Functions.CoreFunctions.Range(RelogicLabs.JsonSchema.Types.JDateTime,RelogicLabs.JsonSchema.Types.JString,RelogicLabs.JsonSchema.Types.JUndefined)
    +  name: Range(JDateTime, JString, JUndefined)
    +  href: api/RelogicLabs.JsonSchema.Functions.CoreFunctions.html#RelogicLabs_JsonSchema_Functions_CoreFunctions_Range_RelogicLabs_JsonSchema_Types_JDateTime_RelogicLabs_JsonSchema_Types_JString_RelogicLabs_JsonSchema_Types_JUndefined_
    +  commentId: M:RelogicLabs.JsonSchema.Functions.CoreFunctions.Range(RelogicLabs.JsonSchema.Types.JDateTime,RelogicLabs.JsonSchema.Types.JString,RelogicLabs.JsonSchema.Types.JUndefined)
    +  fullName: RelogicLabs.JsonSchema.Functions.CoreFunctions.Range(RelogicLabs.JsonSchema.Types.JDateTime, RelogicLabs.JsonSchema.Types.JString, RelogicLabs.JsonSchema.Types.JUndefined)
    +  nameWithType: CoreFunctions.Range(JDateTime, JString, JUndefined)
    +- uid: RelogicLabs.JsonSchema.Functions.CoreFunctions.Range(RelogicLabs.JsonSchema.Types.JDateTime,RelogicLabs.JsonSchema.Types.JUndefined,RelogicLabs.JsonSchema.Types.JString)
    +  name: Range(JDateTime, JUndefined, JString)
    +  href: api/RelogicLabs.JsonSchema.Functions.CoreFunctions.html#RelogicLabs_JsonSchema_Functions_CoreFunctions_Range_RelogicLabs_JsonSchema_Types_JDateTime_RelogicLabs_JsonSchema_Types_JUndefined_RelogicLabs_JsonSchema_Types_JString_
    +  commentId: M:RelogicLabs.JsonSchema.Functions.CoreFunctions.Range(RelogicLabs.JsonSchema.Types.JDateTime,RelogicLabs.JsonSchema.Types.JUndefined,RelogicLabs.JsonSchema.Types.JString)
    +  fullName: RelogicLabs.JsonSchema.Functions.CoreFunctions.Range(RelogicLabs.JsonSchema.Types.JDateTime, RelogicLabs.JsonSchema.Types.JUndefined, RelogicLabs.JsonSchema.Types.JString)
    +  nameWithType: CoreFunctions.Range(JDateTime, JUndefined, JString)
     - uid: RelogicLabs.JsonSchema.Functions.CoreFunctions.Range(RelogicLabs.JsonSchema.Types.JNumber,RelogicLabs.JsonSchema.Types.JNumber,RelogicLabs.JsonSchema.Types.JNumber)
       name: Range(JNumber, JNumber, JNumber)
       href: api/RelogicLabs.JsonSchema.Functions.CoreFunctions.html#RelogicLabs_JsonSchema_Functions_CoreFunctions_Range_RelogicLabs_JsonSchema_Types_JNumber_RelogicLabs_JsonSchema_Types_JNumber_RelogicLabs_JsonSchema_Types_JNumber_
    @@ -1705,6 +1762,19 @@ references:
       isSpec: "True"
       fullName: RelogicLabs.JsonSchema.Functions.CoreFunctions.Regex
       nameWithType: CoreFunctions.Regex
    +- uid: RelogicLabs.JsonSchema.Functions.CoreFunctions.Start(RelogicLabs.JsonSchema.Types.JDateTime,RelogicLabs.JsonSchema.Types.JString)
    +  name: Start(JDateTime, JString)
    +  href: api/RelogicLabs.JsonSchema.Functions.CoreFunctions.html#RelogicLabs_JsonSchema_Functions_CoreFunctions_Start_RelogicLabs_JsonSchema_Types_JDateTime_RelogicLabs_JsonSchema_Types_JString_
    +  commentId: M:RelogicLabs.JsonSchema.Functions.CoreFunctions.Start(RelogicLabs.JsonSchema.Types.JDateTime,RelogicLabs.JsonSchema.Types.JString)
    +  fullName: RelogicLabs.JsonSchema.Functions.CoreFunctions.Start(RelogicLabs.JsonSchema.Types.JDateTime, RelogicLabs.JsonSchema.Types.JString)
    +  nameWithType: CoreFunctions.Start(JDateTime, JString)
    +- uid: RelogicLabs.JsonSchema.Functions.CoreFunctions.Start*
    +  name: Start
    +  href: api/RelogicLabs.JsonSchema.Functions.CoreFunctions.html#RelogicLabs_JsonSchema_Functions_CoreFunctions_Start_
    +  commentId: Overload:RelogicLabs.JsonSchema.Functions.CoreFunctions.Start
    +  isSpec: "True"
    +  fullName: RelogicLabs.JsonSchema.Functions.CoreFunctions.Start
    +  nameWithType: CoreFunctions.Start
     - uid: RelogicLabs.JsonSchema.Functions.CoreFunctions.Time(RelogicLabs.JsonSchema.Types.JString,RelogicLabs.JsonSchema.Types.JString)
       name: Time(JString, JString)
       href: api/RelogicLabs.JsonSchema.Functions.CoreFunctions.html#RelogicLabs_JsonSchema_Functions_CoreFunctions_Time_RelogicLabs_JsonSchema_Types_JString_RelogicLabs_JsonSchema_Types_JString_
    @@ -2301,6 +2371,250 @@ references:
       isSpec: "True"
       fullName: RelogicLabs.JsonSchema.Message.MessageFormatter.Summary
       nameWithType: MessageFormatter.Summary
    +- uid: RelogicLabs.JsonSchema.Time
    +  name: RelogicLabs.JsonSchema.Time
    +  href: api/RelogicLabs.JsonSchema.Time.html
    +  commentId: N:RelogicLabs.JsonSchema.Time
    +  fullName: RelogicLabs.JsonSchema.Time
    +  nameWithType: RelogicLabs.JsonSchema.Time
    +- uid: RelogicLabs.JsonSchema.Time.DateTimeType
    +  name: DateTimeType
    +  href: api/RelogicLabs.JsonSchema.Time.DateTimeType.html
    +  commentId: T:RelogicLabs.JsonSchema.Time.DateTimeType
    +  fullName: RelogicLabs.JsonSchema.Time.DateTimeType
    +  nameWithType: DateTimeType
    +- uid: RelogicLabs.JsonSchema.Time.DateTimeType.DATE_TYPE
    +  name: DATE_TYPE
    +  href: api/RelogicLabs.JsonSchema.Time.DateTimeType.html#RelogicLabs_JsonSchema_Time_DateTimeType_DATE_TYPE
    +  commentId: F:RelogicLabs.JsonSchema.Time.DateTimeType.DATE_TYPE
    +  fullName: RelogicLabs.JsonSchema.Time.DateTimeType.DATE_TYPE
    +  nameWithType: DateTimeType.DATE_TYPE
    +- uid: RelogicLabs.JsonSchema.Time.DateTimeType.Name
    +  name: Name
    +  href: api/RelogicLabs.JsonSchema.Time.DateTimeType.html#RelogicLabs_JsonSchema_Time_DateTimeType_Name
    +  commentId: P:RelogicLabs.JsonSchema.Time.DateTimeType.Name
    +  fullName: RelogicLabs.JsonSchema.Time.DateTimeType.Name
    +  nameWithType: DateTimeType.Name
    +- uid: RelogicLabs.JsonSchema.Time.DateTimeType.Name*
    +  name: Name
    +  href: api/RelogicLabs.JsonSchema.Time.DateTimeType.html#RelogicLabs_JsonSchema_Time_DateTimeType_Name_
    +  commentId: Overload:RelogicLabs.JsonSchema.Time.DateTimeType.Name
    +  isSpec: "True"
    +  fullName: RelogicLabs.JsonSchema.Time.DateTimeType.Name
    +  nameWithType: DateTimeType.Name
    +- uid: RelogicLabs.JsonSchema.Time.DateTimeType.TIME_TYPE
    +  name: TIME_TYPE
    +  href: api/RelogicLabs.JsonSchema.Time.DateTimeType.html#RelogicLabs_JsonSchema_Time_DateTimeType_TIME_TYPE
    +  commentId: F:RelogicLabs.JsonSchema.Time.DateTimeType.TIME_TYPE
    +  fullName: RelogicLabs.JsonSchema.Time.DateTimeType.TIME_TYPE
    +  nameWithType: DateTimeType.TIME_TYPE
    +- uid: RelogicLabs.JsonSchema.Time.DateTimeType.ToString
    +  name: ToString()
    +  href: api/RelogicLabs.JsonSchema.Time.DateTimeType.html#RelogicLabs_JsonSchema_Time_DateTimeType_ToString
    +  commentId: M:RelogicLabs.JsonSchema.Time.DateTimeType.ToString
    +  fullName: RelogicLabs.JsonSchema.Time.DateTimeType.ToString()
    +  nameWithType: DateTimeType.ToString()
    +- uid: RelogicLabs.JsonSchema.Time.DateTimeType.ToString*
    +  name: ToString
    +  href: api/RelogicLabs.JsonSchema.Time.DateTimeType.html#RelogicLabs_JsonSchema_Time_DateTimeType_ToString_
    +  commentId: Overload:RelogicLabs.JsonSchema.Time.DateTimeType.ToString
    +  isSpec: "True"
    +  fullName: RelogicLabs.JsonSchema.Time.DateTimeType.ToString
    +  nameWithType: DateTimeType.ToString
    +- uid: RelogicLabs.JsonSchema.Time.DateTimeType.Type
    +  name: Type
    +  href: api/RelogicLabs.JsonSchema.Time.DateTimeType.html#RelogicLabs_JsonSchema_Time_DateTimeType_Type
    +  commentId: P:RelogicLabs.JsonSchema.Time.DateTimeType.Type
    +  fullName: RelogicLabs.JsonSchema.Time.DateTimeType.Type
    +  nameWithType: DateTimeType.Type
    +- uid: RelogicLabs.JsonSchema.Time.DateTimeType.Type*
    +  name: Type
    +  href: api/RelogicLabs.JsonSchema.Time.DateTimeType.html#RelogicLabs_JsonSchema_Time_DateTimeType_Type_
    +  commentId: Overload:RelogicLabs.JsonSchema.Time.DateTimeType.Type
    +  isSpec: "True"
    +  fullName: RelogicLabs.JsonSchema.Time.DateTimeType.Type
    +  nameWithType: DateTimeType.Type
    +- uid: RelogicLabs.JsonSchema.Time.JsonDateTime
    +  name: JsonDateTime
    +  href: api/RelogicLabs.JsonSchema.Time.JsonDateTime.html
    +  commentId: T:RelogicLabs.JsonSchema.Time.JsonDateTime
    +  fullName: RelogicLabs.JsonSchema.Time.JsonDateTime
    +  nameWithType: JsonDateTime
    +- uid: RelogicLabs.JsonSchema.Time.JsonDateTime.Compare(RelogicLabs.JsonSchema.Time.JsonDateTime)
    +  name: Compare(JsonDateTime)
    +  href: api/RelogicLabs.JsonSchema.Time.JsonDateTime.html#RelogicLabs_JsonSchema_Time_JsonDateTime_Compare_RelogicLabs_JsonSchema_Time_JsonDateTime_
    +  commentId: M:RelogicLabs.JsonSchema.Time.JsonDateTime.Compare(RelogicLabs.JsonSchema.Time.JsonDateTime)
    +  fullName: RelogicLabs.JsonSchema.Time.JsonDateTime.Compare(RelogicLabs.JsonSchema.Time.JsonDateTime)
    +  nameWithType: JsonDateTime.Compare(JsonDateTime)
    +- uid: RelogicLabs.JsonSchema.Time.JsonDateTime.Compare*
    +  name: Compare
    +  href: api/RelogicLabs.JsonSchema.Time.JsonDateTime.html#RelogicLabs_JsonSchema_Time_JsonDateTime_Compare_
    +  commentId: Overload:RelogicLabs.JsonSchema.Time.JsonDateTime.Compare
    +  isSpec: "True"
    +  fullName: RelogicLabs.JsonSchema.Time.JsonDateTime.Compare
    +  nameWithType: JsonDateTime.Compare
    +- uid: RelogicLabs.JsonSchema.Time.JsonDateTime.Day
    +  name: Day
    +  href: api/RelogicLabs.JsonSchema.Time.JsonDateTime.html#RelogicLabs_JsonSchema_Time_JsonDateTime_Day
    +  commentId: P:RelogicLabs.JsonSchema.Time.JsonDateTime.Day
    +  fullName: RelogicLabs.JsonSchema.Time.JsonDateTime.Day
    +  nameWithType: JsonDateTime.Day
    +- uid: RelogicLabs.JsonSchema.Time.JsonDateTime.Day*
    +  name: Day
    +  href: api/RelogicLabs.JsonSchema.Time.JsonDateTime.html#RelogicLabs_JsonSchema_Time_JsonDateTime_Day_
    +  commentId: Overload:RelogicLabs.JsonSchema.Time.JsonDateTime.Day
    +  isSpec: "True"
    +  fullName: RelogicLabs.JsonSchema.Time.JsonDateTime.Day
    +  nameWithType: JsonDateTime.Day
    +- uid: RelogicLabs.JsonSchema.Time.JsonDateTime.Fraction
    +  name: Fraction
    +  href: api/RelogicLabs.JsonSchema.Time.JsonDateTime.html#RelogicLabs_JsonSchema_Time_JsonDateTime_Fraction
    +  commentId: P:RelogicLabs.JsonSchema.Time.JsonDateTime.Fraction
    +  fullName: RelogicLabs.JsonSchema.Time.JsonDateTime.Fraction
    +  nameWithType: JsonDateTime.Fraction
    +- uid: RelogicLabs.JsonSchema.Time.JsonDateTime.Fraction*
    +  name: Fraction
    +  href: api/RelogicLabs.JsonSchema.Time.JsonDateTime.html#RelogicLabs_JsonSchema_Time_JsonDateTime_Fraction_
    +  commentId: Overload:RelogicLabs.JsonSchema.Time.JsonDateTime.Fraction
    +  isSpec: "True"
    +  fullName: RelogicLabs.JsonSchema.Time.JsonDateTime.Fraction
    +  nameWithType: JsonDateTime.Fraction
    +- uid: RelogicLabs.JsonSchema.Time.JsonDateTime.GetDayOfWeek
    +  name: GetDayOfWeek()
    +  href: api/RelogicLabs.JsonSchema.Time.JsonDateTime.html#RelogicLabs_JsonSchema_Time_JsonDateTime_GetDayOfWeek
    +  commentId: M:RelogicLabs.JsonSchema.Time.JsonDateTime.GetDayOfWeek
    +  fullName: RelogicLabs.JsonSchema.Time.JsonDateTime.GetDayOfWeek()
    +  nameWithType: JsonDateTime.GetDayOfWeek()
    +- uid: RelogicLabs.JsonSchema.Time.JsonDateTime.GetDayOfWeek*
    +  name: GetDayOfWeek
    +  href: api/RelogicLabs.JsonSchema.Time.JsonDateTime.html#RelogicLabs_JsonSchema_Time_JsonDateTime_GetDayOfWeek_
    +  commentId: Overload:RelogicLabs.JsonSchema.Time.JsonDateTime.GetDayOfWeek
    +  isSpec: "True"
    +  fullName: RelogicLabs.JsonSchema.Time.JsonDateTime.GetDayOfWeek
    +  nameWithType: JsonDateTime.GetDayOfWeek
    +- uid: RelogicLabs.JsonSchema.Time.JsonDateTime.Hour
    +  name: Hour
    +  href: api/RelogicLabs.JsonSchema.Time.JsonDateTime.html#RelogicLabs_JsonSchema_Time_JsonDateTime_Hour
    +  commentId: P:RelogicLabs.JsonSchema.Time.JsonDateTime.Hour
    +  fullName: RelogicLabs.JsonSchema.Time.JsonDateTime.Hour
    +  nameWithType: JsonDateTime.Hour
    +- uid: RelogicLabs.JsonSchema.Time.JsonDateTime.Hour*
    +  name: Hour
    +  href: api/RelogicLabs.JsonSchema.Time.JsonDateTime.html#RelogicLabs_JsonSchema_Time_JsonDateTime_Hour_
    +  commentId: Overload:RelogicLabs.JsonSchema.Time.JsonDateTime.Hour
    +  isSpec: "True"
    +  fullName: RelogicLabs.JsonSchema.Time.JsonDateTime.Hour
    +  nameWithType: JsonDateTime.Hour
    +- uid: RelogicLabs.JsonSchema.Time.JsonDateTime.Minute
    +  name: Minute
    +  href: api/RelogicLabs.JsonSchema.Time.JsonDateTime.html#RelogicLabs_JsonSchema_Time_JsonDateTime_Minute
    +  commentId: P:RelogicLabs.JsonSchema.Time.JsonDateTime.Minute
    +  fullName: RelogicLabs.JsonSchema.Time.JsonDateTime.Minute
    +  nameWithType: JsonDateTime.Minute
    +- uid: RelogicLabs.JsonSchema.Time.JsonDateTime.Minute*
    +  name: Minute
    +  href: api/RelogicLabs.JsonSchema.Time.JsonDateTime.html#RelogicLabs_JsonSchema_Time_JsonDateTime_Minute_
    +  commentId: Overload:RelogicLabs.JsonSchema.Time.JsonDateTime.Minute
    +  isSpec: "True"
    +  fullName: RelogicLabs.JsonSchema.Time.JsonDateTime.Minute
    +  nameWithType: JsonDateTime.Minute
    +- uid: RelogicLabs.JsonSchema.Time.JsonDateTime.Month
    +  name: Month
    +  href: api/RelogicLabs.JsonSchema.Time.JsonDateTime.html#RelogicLabs_JsonSchema_Time_JsonDateTime_Month
    +  commentId: P:RelogicLabs.JsonSchema.Time.JsonDateTime.Month
    +  fullName: RelogicLabs.JsonSchema.Time.JsonDateTime.Month
    +  nameWithType: JsonDateTime.Month
    +- uid: RelogicLabs.JsonSchema.Time.JsonDateTime.Month*
    +  name: Month
    +  href: api/RelogicLabs.JsonSchema.Time.JsonDateTime.html#RelogicLabs_JsonSchema_Time_JsonDateTime_Month_
    +  commentId: Overload:RelogicLabs.JsonSchema.Time.JsonDateTime.Month
    +  isSpec: "True"
    +  fullName: RelogicLabs.JsonSchema.Time.JsonDateTime.Month
    +  nameWithType: JsonDateTime.Month
    +- uid: RelogicLabs.JsonSchema.Time.JsonDateTime.Second
    +  name: Second
    +  href: api/RelogicLabs.JsonSchema.Time.JsonDateTime.html#RelogicLabs_JsonSchema_Time_JsonDateTime_Second
    +  commentId: P:RelogicLabs.JsonSchema.Time.JsonDateTime.Second
    +  fullName: RelogicLabs.JsonSchema.Time.JsonDateTime.Second
    +  nameWithType: JsonDateTime.Second
    +- uid: RelogicLabs.JsonSchema.Time.JsonDateTime.Second*
    +  name: Second
    +  href: api/RelogicLabs.JsonSchema.Time.JsonDateTime.html#RelogicLabs_JsonSchema_Time_JsonDateTime_Second_
    +  commentId: Overload:RelogicLabs.JsonSchema.Time.JsonDateTime.Second
    +  isSpec: "True"
    +  fullName: RelogicLabs.JsonSchema.Time.JsonDateTime.Second
    +  nameWithType: JsonDateTime.Second
    +- uid: RelogicLabs.JsonSchema.Time.JsonDateTime.ToString
    +  name: ToString()
    +  href: api/RelogicLabs.JsonSchema.Time.JsonDateTime.html#RelogicLabs_JsonSchema_Time_JsonDateTime_ToString
    +  commentId: M:RelogicLabs.JsonSchema.Time.JsonDateTime.ToString
    +  fullName: RelogicLabs.JsonSchema.Time.JsonDateTime.ToString()
    +  nameWithType: JsonDateTime.ToString()
    +- uid: RelogicLabs.JsonSchema.Time.JsonDateTime.ToString*
    +  name: ToString
    +  href: api/RelogicLabs.JsonSchema.Time.JsonDateTime.html#RelogicLabs_JsonSchema_Time_JsonDateTime_ToString_
    +  commentId: Overload:RelogicLabs.JsonSchema.Time.JsonDateTime.ToString
    +  isSpec: "True"
    +  fullName: RelogicLabs.JsonSchema.Time.JsonDateTime.ToString
    +  nameWithType: JsonDateTime.ToString
    +- uid: RelogicLabs.JsonSchema.Time.JsonDateTime.Type
    +  name: Type
    +  href: api/RelogicLabs.JsonSchema.Time.JsonDateTime.html#RelogicLabs_JsonSchema_Time_JsonDateTime_Type
    +  commentId: P:RelogicLabs.JsonSchema.Time.JsonDateTime.Type
    +  fullName: RelogicLabs.JsonSchema.Time.JsonDateTime.Type
    +  nameWithType: JsonDateTime.Type
    +- uid: RelogicLabs.JsonSchema.Time.JsonDateTime.Type*
    +  name: Type
    +  href: api/RelogicLabs.JsonSchema.Time.JsonDateTime.html#RelogicLabs_JsonSchema_Time_JsonDateTime_Type_
    +  commentId: Overload:RelogicLabs.JsonSchema.Time.JsonDateTime.Type
    +  isSpec: "True"
    +  fullName: RelogicLabs.JsonSchema.Time.JsonDateTime.Type
    +  nameWithType: JsonDateTime.Type
    +- uid: RelogicLabs.JsonSchema.Time.JsonDateTime.UNSET
    +  name: UNSET
    +  href: api/RelogicLabs.JsonSchema.Time.JsonDateTime.html#RelogicLabs_JsonSchema_Time_JsonDateTime_UNSET
    +  commentId: F:RelogicLabs.JsonSchema.Time.JsonDateTime.UNSET
    +  fullName: RelogicLabs.JsonSchema.Time.JsonDateTime.UNSET
    +  nameWithType: JsonDateTime.UNSET
    +- uid: RelogicLabs.JsonSchema.Time.JsonDateTime.UtcHour
    +  name: UtcHour
    +  href: api/RelogicLabs.JsonSchema.Time.JsonDateTime.html#RelogicLabs_JsonSchema_Time_JsonDateTime_UtcHour
    +  commentId: P:RelogicLabs.JsonSchema.Time.JsonDateTime.UtcHour
    +  fullName: RelogicLabs.JsonSchema.Time.JsonDateTime.UtcHour
    +  nameWithType: JsonDateTime.UtcHour
    +- uid: RelogicLabs.JsonSchema.Time.JsonDateTime.UtcHour*
    +  name: UtcHour
    +  href: api/RelogicLabs.JsonSchema.Time.JsonDateTime.html#RelogicLabs_JsonSchema_Time_JsonDateTime_UtcHour_
    +  commentId: Overload:RelogicLabs.JsonSchema.Time.JsonDateTime.UtcHour
    +  isSpec: "True"
    +  fullName: RelogicLabs.JsonSchema.Time.JsonDateTime.UtcHour
    +  nameWithType: JsonDateTime.UtcHour
    +- uid: RelogicLabs.JsonSchema.Time.JsonDateTime.UtcMinute
    +  name: UtcMinute
    +  href: api/RelogicLabs.JsonSchema.Time.JsonDateTime.html#RelogicLabs_JsonSchema_Time_JsonDateTime_UtcMinute
    +  commentId: P:RelogicLabs.JsonSchema.Time.JsonDateTime.UtcMinute
    +  fullName: RelogicLabs.JsonSchema.Time.JsonDateTime.UtcMinute
    +  nameWithType: JsonDateTime.UtcMinute
    +- uid: RelogicLabs.JsonSchema.Time.JsonDateTime.UtcMinute*
    +  name: UtcMinute
    +  href: api/RelogicLabs.JsonSchema.Time.JsonDateTime.html#RelogicLabs_JsonSchema_Time_JsonDateTime_UtcMinute_
    +  commentId: Overload:RelogicLabs.JsonSchema.Time.JsonDateTime.UtcMinute
    +  isSpec: "True"
    +  fullName: RelogicLabs.JsonSchema.Time.JsonDateTime.UtcMinute
    +  nameWithType: JsonDateTime.UtcMinute
    +- uid: RelogicLabs.JsonSchema.Time.JsonDateTime.Year
    +  name: Year
    +  href: api/RelogicLabs.JsonSchema.Time.JsonDateTime.html#RelogicLabs_JsonSchema_Time_JsonDateTime_Year
    +  commentId: P:RelogicLabs.JsonSchema.Time.JsonDateTime.Year
    +  fullName: RelogicLabs.JsonSchema.Time.JsonDateTime.Year
    +  nameWithType: JsonDateTime.Year
    +- uid: RelogicLabs.JsonSchema.Time.JsonDateTime.Year*
    +  name: Year
    +  href: api/RelogicLabs.JsonSchema.Time.JsonDateTime.html#RelogicLabs_JsonSchema_Time_JsonDateTime_Year_
    +  commentId: Overload:RelogicLabs.JsonSchema.Time.JsonDateTime.Year
    +  isSpec: "True"
    +  fullName: RelogicLabs.JsonSchema.Time.JsonDateTime.Year
    +  nameWithType: JsonDateTime.Year
     - uid: RelogicLabs.JsonSchema.Tree
       name: RelogicLabs.JsonSchema.Tree
       href: api/RelogicLabs.JsonSchema.Tree.html
    @@ -2384,6 +2698,66 @@ references:
       isSpec: "True"
       fullName: RelogicLabs.JsonSchema.Tree.Context.Runtime
       nameWithType: Context.Runtime
    +- uid: RelogicLabs.JsonSchema.Tree.FunctionRegistry
    +  name: FunctionRegistry
    +  href: api/RelogicLabs.JsonSchema.Tree.FunctionRegistry.html
    +  commentId: T:RelogicLabs.JsonSchema.Tree.FunctionRegistry
    +  fullName: RelogicLabs.JsonSchema.Tree.FunctionRegistry
    +  nameWithType: FunctionRegistry
    +- uid: RelogicLabs.JsonSchema.Tree.FunctionRegistry.#ctor(RelogicLabs.JsonSchema.Tree.RuntimeContext)
    +  name: FunctionRegistry(RuntimeContext)
    +  href: api/RelogicLabs.JsonSchema.Tree.FunctionRegistry.html#RelogicLabs_JsonSchema_Tree_FunctionRegistry__ctor_RelogicLabs_JsonSchema_Tree_RuntimeContext_
    +  commentId: M:RelogicLabs.JsonSchema.Tree.FunctionRegistry.#ctor(RelogicLabs.JsonSchema.Tree.RuntimeContext)
    +  name.vb: New(RuntimeContext)
    +  fullName: RelogicLabs.JsonSchema.Tree.FunctionRegistry.FunctionRegistry(RelogicLabs.JsonSchema.Tree.RuntimeContext)
    +  fullName.vb: RelogicLabs.JsonSchema.Tree.FunctionRegistry.New(RelogicLabs.JsonSchema.Tree.RuntimeContext)
    +  nameWithType: FunctionRegistry.FunctionRegistry(RuntimeContext)
    +  nameWithType.vb: FunctionRegistry.New(RuntimeContext)
    +- uid: RelogicLabs.JsonSchema.Tree.FunctionRegistry.#ctor*
    +  name: FunctionRegistry
    +  href: api/RelogicLabs.JsonSchema.Tree.FunctionRegistry.html#RelogicLabs_JsonSchema_Tree_FunctionRegistry__ctor_
    +  commentId: Overload:RelogicLabs.JsonSchema.Tree.FunctionRegistry.#ctor
    +  isSpec: "True"
    +  name.vb: New
    +  fullName: RelogicLabs.JsonSchema.Tree.FunctionRegistry.FunctionRegistry
    +  fullName.vb: RelogicLabs.JsonSchema.Tree.FunctionRegistry.New
    +  nameWithType: FunctionRegistry.FunctionRegistry
    +  nameWithType.vb: FunctionRegistry.New
    +- uid: RelogicLabs.JsonSchema.Tree.FunctionRegistry.AddClass(RelogicLabs.JsonSchema.Types.JInclude)
    +  name: AddClass(JInclude)
    +  href: api/RelogicLabs.JsonSchema.Tree.FunctionRegistry.html#RelogicLabs_JsonSchema_Tree_FunctionRegistry_AddClass_RelogicLabs_JsonSchema_Types_JInclude_
    +  commentId: M:RelogicLabs.JsonSchema.Tree.FunctionRegistry.AddClass(RelogicLabs.JsonSchema.Types.JInclude)
    +  fullName: RelogicLabs.JsonSchema.Tree.FunctionRegistry.AddClass(RelogicLabs.JsonSchema.Types.JInclude)
    +  nameWithType: FunctionRegistry.AddClass(JInclude)
    +- uid: RelogicLabs.JsonSchema.Tree.FunctionRegistry.AddClass(System.String,RelogicLabs.JsonSchema.Tree.Context)
    +  name: AddClass(string, Context?)
    +  href: api/RelogicLabs.JsonSchema.Tree.FunctionRegistry.html#RelogicLabs_JsonSchema_Tree_FunctionRegistry_AddClass_System_String_RelogicLabs_JsonSchema_Tree_Context_
    +  commentId: M:RelogicLabs.JsonSchema.Tree.FunctionRegistry.AddClass(System.String,RelogicLabs.JsonSchema.Tree.Context)
    +  name.vb: AddClass(String, Context)
    +  fullName: RelogicLabs.JsonSchema.Tree.FunctionRegistry.AddClass(string, RelogicLabs.JsonSchema.Tree.Context?)
    +  fullName.vb: RelogicLabs.JsonSchema.Tree.FunctionRegistry.AddClass(String, RelogicLabs.JsonSchema.Tree.Context)
    +  nameWithType: FunctionRegistry.AddClass(string, Context?)
    +  nameWithType.vb: FunctionRegistry.AddClass(String, Context)
    +- uid: RelogicLabs.JsonSchema.Tree.FunctionRegistry.AddClass*
    +  name: AddClass
    +  href: api/RelogicLabs.JsonSchema.Tree.FunctionRegistry.html#RelogicLabs_JsonSchema_Tree_FunctionRegistry_AddClass_
    +  commentId: Overload:RelogicLabs.JsonSchema.Tree.FunctionRegistry.AddClass
    +  isSpec: "True"
    +  fullName: RelogicLabs.JsonSchema.Tree.FunctionRegistry.AddClass
    +  nameWithType: FunctionRegistry.AddClass
    +- uid: RelogicLabs.JsonSchema.Tree.FunctionRegistry.InvokeFunction(RelogicLabs.JsonSchema.Types.JFunction,RelogicLabs.JsonSchema.Types.JNode)
    +  name: InvokeFunction(JFunction, JNode)
    +  href: api/RelogicLabs.JsonSchema.Tree.FunctionRegistry.html#RelogicLabs_JsonSchema_Tree_FunctionRegistry_InvokeFunction_RelogicLabs_JsonSchema_Types_JFunction_RelogicLabs_JsonSchema_Types_JNode_
    +  commentId: M:RelogicLabs.JsonSchema.Tree.FunctionRegistry.InvokeFunction(RelogicLabs.JsonSchema.Types.JFunction,RelogicLabs.JsonSchema.Types.JNode)
    +  fullName: RelogicLabs.JsonSchema.Tree.FunctionRegistry.InvokeFunction(RelogicLabs.JsonSchema.Types.JFunction, RelogicLabs.JsonSchema.Types.JNode)
    +  nameWithType: FunctionRegistry.InvokeFunction(JFunction, JNode)
    +- uid: RelogicLabs.JsonSchema.Tree.FunctionRegistry.InvokeFunction*
    +  name: InvokeFunction
    +  href: api/RelogicLabs.JsonSchema.Tree.FunctionRegistry.html#RelogicLabs_JsonSchema_Tree_FunctionRegistry_InvokeFunction_
    +  commentId: Overload:RelogicLabs.JsonSchema.Tree.FunctionRegistry.InvokeFunction
    +  isSpec: "True"
    +  fullName: RelogicLabs.JsonSchema.Tree.FunctionRegistry.InvokeFunction
    +  nameWithType: FunctionRegistry.InvokeFunction
     - uid: RelogicLabs.JsonSchema.Tree.JsonTree
       name: JsonTree
       href: api/RelogicLabs.JsonSchema.Tree.JsonTree.html
    @@ -2499,34 +2873,147 @@ references:
       isSpec: "True"
       fullName: RelogicLabs.JsonSchema.Tree.Location.ToString
       nameWithType: Location.ToString
    +- uid: RelogicLabs.JsonSchema.Tree.PragmaRegistry
    +  name: PragmaRegistry
    +  href: api/RelogicLabs.JsonSchema.Tree.PragmaRegistry.html
    +  commentId: T:RelogicLabs.JsonSchema.Tree.PragmaRegistry
    +  fullName: RelogicLabs.JsonSchema.Tree.PragmaRegistry
    +  nameWithType: PragmaRegistry
    +- uid: RelogicLabs.JsonSchema.Tree.PragmaRegistry.#ctor
    +  name: PragmaRegistry()
    +  href: api/RelogicLabs.JsonSchema.Tree.PragmaRegistry.html#RelogicLabs_JsonSchema_Tree_PragmaRegistry__ctor
    +  commentId: M:RelogicLabs.JsonSchema.Tree.PragmaRegistry.#ctor
    +  name.vb: New()
    +  fullName: RelogicLabs.JsonSchema.Tree.PragmaRegistry.PragmaRegistry()
    +  fullName.vb: RelogicLabs.JsonSchema.Tree.PragmaRegistry.New()
    +  nameWithType: PragmaRegistry.PragmaRegistry()
    +  nameWithType.vb: PragmaRegistry.New()
    +- uid: RelogicLabs.JsonSchema.Tree.PragmaRegistry.#ctor*
    +  name: PragmaRegistry
    +  href: api/RelogicLabs.JsonSchema.Tree.PragmaRegistry.html#RelogicLabs_JsonSchema_Tree_PragmaRegistry__ctor_
    +  commentId: Overload:RelogicLabs.JsonSchema.Tree.PragmaRegistry.#ctor
    +  isSpec: "True"
    +  name.vb: New
    +  fullName: RelogicLabs.JsonSchema.Tree.PragmaRegistry.PragmaRegistry
    +  fullName.vb: RelogicLabs.JsonSchema.Tree.PragmaRegistry.New
    +  nameWithType: PragmaRegistry.PragmaRegistry
    +  nameWithType.vb: PragmaRegistry.New
    +- uid: RelogicLabs.JsonSchema.Tree.PragmaRegistry.AddPragma(RelogicLabs.JsonSchema.Types.JPragma)
    +  name: AddPragma(JPragma)
    +  href: api/RelogicLabs.JsonSchema.Tree.PragmaRegistry.html#RelogicLabs_JsonSchema_Tree_PragmaRegistry_AddPragma_RelogicLabs_JsonSchema_Types_JPragma_
    +  commentId: M:RelogicLabs.JsonSchema.Tree.PragmaRegistry.AddPragma(RelogicLabs.JsonSchema.Types.JPragma)
    +  fullName: RelogicLabs.JsonSchema.Tree.PragmaRegistry.AddPragma(RelogicLabs.JsonSchema.Types.JPragma)
    +  nameWithType: PragmaRegistry.AddPragma(JPragma)
    +- uid: RelogicLabs.JsonSchema.Tree.PragmaRegistry.AddPragma*
    +  name: AddPragma
    +  href: api/RelogicLabs.JsonSchema.Tree.PragmaRegistry.html#RelogicLabs_JsonSchema_Tree_PragmaRegistry_AddPragma_
    +  commentId: Overload:RelogicLabs.JsonSchema.Tree.PragmaRegistry.AddPragma
    +  isSpec: "True"
    +  fullName: RelogicLabs.JsonSchema.Tree.PragmaRegistry.AddPragma
    +  nameWithType: PragmaRegistry.AddPragma
    +- uid: RelogicLabs.JsonSchema.Tree.PragmaRegistry.DateDataTypeFormat
    +  name: DateDataTypeFormat
    +  href: api/RelogicLabs.JsonSchema.Tree.PragmaRegistry.html#RelogicLabs_JsonSchema_Tree_PragmaRegistry_DateDataTypeFormat
    +  commentId: P:RelogicLabs.JsonSchema.Tree.PragmaRegistry.DateDataTypeFormat
    +  fullName: RelogicLabs.JsonSchema.Tree.PragmaRegistry.DateDataTypeFormat
    +  nameWithType: PragmaRegistry.DateDataTypeFormat
    +- uid: RelogicLabs.JsonSchema.Tree.PragmaRegistry.DateDataTypeFormat*
    +  name: DateDataTypeFormat
    +  href: api/RelogicLabs.JsonSchema.Tree.PragmaRegistry.html#RelogicLabs_JsonSchema_Tree_PragmaRegistry_DateDataTypeFormat_
    +  commentId: Overload:RelogicLabs.JsonSchema.Tree.PragmaRegistry.DateDataTypeFormat
    +  isSpec: "True"
    +  fullName: RelogicLabs.JsonSchema.Tree.PragmaRegistry.DateDataTypeFormat
    +  nameWithType: PragmaRegistry.DateDataTypeFormat
    +- uid: RelogicLabs.JsonSchema.Tree.PragmaRegistry.FloatingPointTolerance
    +  name: FloatingPointTolerance
    +  href: api/RelogicLabs.JsonSchema.Tree.PragmaRegistry.html#RelogicLabs_JsonSchema_Tree_PragmaRegistry_FloatingPointTolerance
    +  commentId: P:RelogicLabs.JsonSchema.Tree.PragmaRegistry.FloatingPointTolerance
    +  fullName: RelogicLabs.JsonSchema.Tree.PragmaRegistry.FloatingPointTolerance
    +  nameWithType: PragmaRegistry.FloatingPointTolerance
    +- uid: RelogicLabs.JsonSchema.Tree.PragmaRegistry.FloatingPointTolerance*
    +  name: FloatingPointTolerance
    +  href: api/RelogicLabs.JsonSchema.Tree.PragmaRegistry.html#RelogicLabs_JsonSchema_Tree_PragmaRegistry_FloatingPointTolerance_
    +  commentId: Overload:RelogicLabs.JsonSchema.Tree.PragmaRegistry.FloatingPointTolerance
    +  isSpec: "True"
    +  fullName: RelogicLabs.JsonSchema.Tree.PragmaRegistry.FloatingPointTolerance
    +  nameWithType: PragmaRegistry.FloatingPointTolerance
    +- uid: RelogicLabs.JsonSchema.Tree.PragmaRegistry.GetPragma(System.String)
    +  name: GetPragma(string)
    +  href: api/RelogicLabs.JsonSchema.Tree.PragmaRegistry.html#RelogicLabs_JsonSchema_Tree_PragmaRegistry_GetPragma_System_String_
    +  commentId: M:RelogicLabs.JsonSchema.Tree.PragmaRegistry.GetPragma(System.String)
    +  name.vb: GetPragma(String)
    +  fullName: RelogicLabs.JsonSchema.Tree.PragmaRegistry.GetPragma(string)
    +  fullName.vb: RelogicLabs.JsonSchema.Tree.PragmaRegistry.GetPragma(String)
    +  nameWithType: PragmaRegistry.GetPragma(string)
    +  nameWithType.vb: PragmaRegistry.GetPragma(String)
    +- uid: RelogicLabs.JsonSchema.Tree.PragmaRegistry.GetPragma*
    +  name: GetPragma
    +  href: api/RelogicLabs.JsonSchema.Tree.PragmaRegistry.html#RelogicLabs_JsonSchema_Tree_PragmaRegistry_GetPragma_
    +  commentId: Overload:RelogicLabs.JsonSchema.Tree.PragmaRegistry.GetPragma
    +  isSpec: "True"
    +  fullName: RelogicLabs.JsonSchema.Tree.PragmaRegistry.GetPragma
    +  nameWithType: PragmaRegistry.GetPragma
    +- uid: RelogicLabs.JsonSchema.Tree.PragmaRegistry.GetPragmaValue*
    +  name: GetPragmaValue
    +  href: api/RelogicLabs.JsonSchema.Tree.PragmaRegistry.html#RelogicLabs_JsonSchema_Tree_PragmaRegistry_GetPragmaValue_
    +  commentId: Overload:RelogicLabs.JsonSchema.Tree.PragmaRegistry.GetPragmaValue
    +  isSpec: "True"
    +  fullName: RelogicLabs.JsonSchema.Tree.PragmaRegistry.GetPragmaValue
    +  nameWithType: PragmaRegistry.GetPragmaValue
    +- uid: RelogicLabs.JsonSchema.Tree.PragmaRegistry.GetPragmaValue``1(System.String)
    +  name: GetPragmaValue(string)
    +  href: api/RelogicLabs.JsonSchema.Tree.PragmaRegistry.html#RelogicLabs_JsonSchema_Tree_PragmaRegistry_GetPragmaValue__1_System_String_
    +  commentId: M:RelogicLabs.JsonSchema.Tree.PragmaRegistry.GetPragmaValue``1(System.String)
    +  name.vb: GetPragmaValue(Of T)(String)
    +  fullName: RelogicLabs.JsonSchema.Tree.PragmaRegistry.GetPragmaValue(string)
    +  fullName.vb: RelogicLabs.JsonSchema.Tree.PragmaRegistry.GetPragmaValue(Of T)(String)
    +  nameWithType: PragmaRegistry.GetPragmaValue(string)
    +  nameWithType.vb: PragmaRegistry.GetPragmaValue(Of T)(String)
    +- uid: RelogicLabs.JsonSchema.Tree.PragmaRegistry.IgnoreObjectPropertyOrder
    +  name: IgnoreObjectPropertyOrder
    +  href: api/RelogicLabs.JsonSchema.Tree.PragmaRegistry.html#RelogicLabs_JsonSchema_Tree_PragmaRegistry_IgnoreObjectPropertyOrder
    +  commentId: P:RelogicLabs.JsonSchema.Tree.PragmaRegistry.IgnoreObjectPropertyOrder
    +  fullName: RelogicLabs.JsonSchema.Tree.PragmaRegistry.IgnoreObjectPropertyOrder
    +  nameWithType: PragmaRegistry.IgnoreObjectPropertyOrder
    +- uid: RelogicLabs.JsonSchema.Tree.PragmaRegistry.IgnoreObjectPropertyOrder*
    +  name: IgnoreObjectPropertyOrder
    +  href: api/RelogicLabs.JsonSchema.Tree.PragmaRegistry.html#RelogicLabs_JsonSchema_Tree_PragmaRegistry_IgnoreObjectPropertyOrder_
    +  commentId: Overload:RelogicLabs.JsonSchema.Tree.PragmaRegistry.IgnoreObjectPropertyOrder
    +  isSpec: "True"
    +  fullName: RelogicLabs.JsonSchema.Tree.PragmaRegistry.IgnoreObjectPropertyOrder
    +  nameWithType: PragmaRegistry.IgnoreObjectPropertyOrder
    +- uid: RelogicLabs.JsonSchema.Tree.PragmaRegistry.IgnoreUndefinedProperties
    +  name: IgnoreUndefinedProperties
    +  href: api/RelogicLabs.JsonSchema.Tree.PragmaRegistry.html#RelogicLabs_JsonSchema_Tree_PragmaRegistry_IgnoreUndefinedProperties
    +  commentId: P:RelogicLabs.JsonSchema.Tree.PragmaRegistry.IgnoreUndefinedProperties
    +  fullName: RelogicLabs.JsonSchema.Tree.PragmaRegistry.IgnoreUndefinedProperties
    +  nameWithType: PragmaRegistry.IgnoreUndefinedProperties
    +- uid: RelogicLabs.JsonSchema.Tree.PragmaRegistry.IgnoreUndefinedProperties*
    +  name: IgnoreUndefinedProperties
    +  href: api/RelogicLabs.JsonSchema.Tree.PragmaRegistry.html#RelogicLabs_JsonSchema_Tree_PragmaRegistry_IgnoreUndefinedProperties_
    +  commentId: Overload:RelogicLabs.JsonSchema.Tree.PragmaRegistry.IgnoreUndefinedProperties
    +  isSpec: "True"
    +  fullName: RelogicLabs.JsonSchema.Tree.PragmaRegistry.IgnoreUndefinedProperties
    +  nameWithType: PragmaRegistry.IgnoreUndefinedProperties
    +- uid: RelogicLabs.JsonSchema.Tree.PragmaRegistry.TimeDataTypeFormat
    +  name: TimeDataTypeFormat
    +  href: api/RelogicLabs.JsonSchema.Tree.PragmaRegistry.html#RelogicLabs_JsonSchema_Tree_PragmaRegistry_TimeDataTypeFormat
    +  commentId: P:RelogicLabs.JsonSchema.Tree.PragmaRegistry.TimeDataTypeFormat
    +  fullName: RelogicLabs.JsonSchema.Tree.PragmaRegistry.TimeDataTypeFormat
    +  nameWithType: PragmaRegistry.TimeDataTypeFormat
    +- uid: RelogicLabs.JsonSchema.Tree.PragmaRegistry.TimeDataTypeFormat*
    +  name: TimeDataTypeFormat
    +  href: api/RelogicLabs.JsonSchema.Tree.PragmaRegistry.html#RelogicLabs_JsonSchema_Tree_PragmaRegistry_TimeDataTypeFormat_
    +  commentId: Overload:RelogicLabs.JsonSchema.Tree.PragmaRegistry.TimeDataTypeFormat
    +  isSpec: "True"
    +  fullName: RelogicLabs.JsonSchema.Tree.PragmaRegistry.TimeDataTypeFormat
    +  nameWithType: PragmaRegistry.TimeDataTypeFormat
     - uid: RelogicLabs.JsonSchema.Tree.RuntimeContext
       name: RuntimeContext
       href: api/RelogicLabs.JsonSchema.Tree.RuntimeContext.html
       commentId: T:RelogicLabs.JsonSchema.Tree.RuntimeContext
       fullName: RelogicLabs.JsonSchema.Tree.RuntimeContext
       nameWithType: RuntimeContext
    -- uid: RelogicLabs.JsonSchema.Tree.RuntimeContext.AddClass(RelogicLabs.JsonSchema.Types.JInclude)
    -  name: AddClass(JInclude)
    -  href: api/RelogicLabs.JsonSchema.Tree.RuntimeContext.html#RelogicLabs_JsonSchema_Tree_RuntimeContext_AddClass_RelogicLabs_JsonSchema_Types_JInclude_
    -  commentId: M:RelogicLabs.JsonSchema.Tree.RuntimeContext.AddClass(RelogicLabs.JsonSchema.Types.JInclude)
    -  fullName: RelogicLabs.JsonSchema.Tree.RuntimeContext.AddClass(RelogicLabs.JsonSchema.Types.JInclude)
    -  nameWithType: RuntimeContext.AddClass(JInclude)
    -- uid: RelogicLabs.JsonSchema.Tree.RuntimeContext.AddClass(System.String,RelogicLabs.JsonSchema.Tree.Context)
    -  name: AddClass(string, Context?)
    -  href: api/RelogicLabs.JsonSchema.Tree.RuntimeContext.html#RelogicLabs_JsonSchema_Tree_RuntimeContext_AddClass_System_String_RelogicLabs_JsonSchema_Tree_Context_
    -  commentId: M:RelogicLabs.JsonSchema.Tree.RuntimeContext.AddClass(System.String,RelogicLabs.JsonSchema.Tree.Context)
    -  name.vb: AddClass(String, Context)
    -  fullName: RelogicLabs.JsonSchema.Tree.RuntimeContext.AddClass(string, RelogicLabs.JsonSchema.Tree.Context?)
    -  fullName.vb: RelogicLabs.JsonSchema.Tree.RuntimeContext.AddClass(String, RelogicLabs.JsonSchema.Tree.Context)
    -  nameWithType: RuntimeContext.AddClass(string, Context?)
    -  nameWithType.vb: RuntimeContext.AddClass(String, Context)
    -- uid: RelogicLabs.JsonSchema.Tree.RuntimeContext.AddClass*
    -  name: AddClass
    -  href: api/RelogicLabs.JsonSchema.Tree.RuntimeContext.html#RelogicLabs_JsonSchema_Tree_RuntimeContext_AddClass_
    -  commentId: Overload:RelogicLabs.JsonSchema.Tree.RuntimeContext.AddClass
    -  isSpec: "True"
    -  fullName: RelogicLabs.JsonSchema.Tree.RuntimeContext.AddClass
    -  nameWithType: RuntimeContext.AddClass
     - uid: RelogicLabs.JsonSchema.Tree.RuntimeContext.AddDefinition(RelogicLabs.JsonSchema.Types.JDefinition)
       name: AddDefinition(JDefinition)
       href: api/RelogicLabs.JsonSchema.Tree.RuntimeContext.html#RelogicLabs_JsonSchema_Tree_RuntimeContext_AddDefinition_RelogicLabs_JsonSchema_Types_JDefinition_
    @@ -2540,19 +3027,6 @@ references:
       isSpec: "True"
       fullName: RelogicLabs.JsonSchema.Tree.RuntimeContext.AddDefinition
       nameWithType: RuntimeContext.AddDefinition
    -- uid: RelogicLabs.JsonSchema.Tree.RuntimeContext.AddPragma(RelogicLabs.JsonSchema.Types.JPragma)
    -  name: AddPragma(JPragma)
    -  href: api/RelogicLabs.JsonSchema.Tree.RuntimeContext.html#RelogicLabs_JsonSchema_Tree_RuntimeContext_AddPragma_RelogicLabs_JsonSchema_Types_JPragma_
    -  commentId: M:RelogicLabs.JsonSchema.Tree.RuntimeContext.AddPragma(RelogicLabs.JsonSchema.Types.JPragma)
    -  fullName: RelogicLabs.JsonSchema.Tree.RuntimeContext.AddPragma(RelogicLabs.JsonSchema.Types.JPragma)
    -  nameWithType: RuntimeContext.AddPragma(JPragma)
    -- uid: RelogicLabs.JsonSchema.Tree.RuntimeContext.AddPragma*
    -  name: AddPragma
    -  href: api/RelogicLabs.JsonSchema.Tree.RuntimeContext.html#RelogicLabs_JsonSchema_Tree_RuntimeContext_AddPragma_
    -  commentId: Overload:RelogicLabs.JsonSchema.Tree.RuntimeContext.AddPragma
    -  isSpec: "True"
    -  fullName: RelogicLabs.JsonSchema.Tree.RuntimeContext.AddPragma
    -  nameWithType: RuntimeContext.AddPragma
     - uid: RelogicLabs.JsonSchema.Tree.RuntimeContext.Definitions
       name: Definitions
       href: api/RelogicLabs.JsonSchema.Tree.RuntimeContext.html#RelogicLabs_JsonSchema_Tree_RuntimeContext_Definitions
    @@ -2579,74 +3053,64 @@ references:
       isSpec: "True"
       fullName: RelogicLabs.JsonSchema.Tree.RuntimeContext.Exceptions
       nameWithType: RuntimeContext.Exceptions
    -- uid: RelogicLabs.JsonSchema.Tree.RuntimeContext.FloatingPointTolerance
    -  name: FloatingPointTolerance
    -  href: api/RelogicLabs.JsonSchema.Tree.RuntimeContext.html#RelogicLabs_JsonSchema_Tree_RuntimeContext_FloatingPointTolerance
    -  commentId: P:RelogicLabs.JsonSchema.Tree.RuntimeContext.FloatingPointTolerance
    -  fullName: RelogicLabs.JsonSchema.Tree.RuntimeContext.FloatingPointTolerance
    -  nameWithType: RuntimeContext.FloatingPointTolerance
    -- uid: RelogicLabs.JsonSchema.Tree.RuntimeContext.FloatingPointTolerance*
    -  name: FloatingPointTolerance
    -  href: api/RelogicLabs.JsonSchema.Tree.RuntimeContext.html#RelogicLabs_JsonSchema_Tree_RuntimeContext_FloatingPointTolerance_
    -  commentId: Overload:RelogicLabs.JsonSchema.Tree.RuntimeContext.FloatingPointTolerance
    -  isSpec: "True"
    -  fullName: RelogicLabs.JsonSchema.Tree.RuntimeContext.FloatingPointTolerance
    -  nameWithType: RuntimeContext.FloatingPointTolerance
    -- uid: RelogicLabs.JsonSchema.Tree.RuntimeContext.GetPragmaValue*
    -  name: GetPragmaValue
    -  href: api/RelogicLabs.JsonSchema.Tree.RuntimeContext.html#RelogicLabs_JsonSchema_Tree_RuntimeContext_GetPragmaValue_
    -  commentId: Overload:RelogicLabs.JsonSchema.Tree.RuntimeContext.GetPragmaValue
    -  isSpec: "True"
    -  fullName: RelogicLabs.JsonSchema.Tree.RuntimeContext.GetPragmaValue
    -  nameWithType: RuntimeContext.GetPragmaValue
    -- uid: RelogicLabs.JsonSchema.Tree.RuntimeContext.GetPragmaValue``1(System.String)
    -  name: GetPragmaValue(string)
    -  href: api/RelogicLabs.JsonSchema.Tree.RuntimeContext.html#RelogicLabs_JsonSchema_Tree_RuntimeContext_GetPragmaValue__1_System_String_
    -  commentId: M:RelogicLabs.JsonSchema.Tree.RuntimeContext.GetPragmaValue``1(System.String)
    -  name.vb: GetPragmaValue(Of T)(String)
    -  fullName: RelogicLabs.JsonSchema.Tree.RuntimeContext.GetPragmaValue(string)
    -  fullName.vb: RelogicLabs.JsonSchema.Tree.RuntimeContext.GetPragmaValue(Of T)(String)
    -  nameWithType: RuntimeContext.GetPragmaValue(string)
    -  nameWithType.vb: RuntimeContext.GetPragmaValue(Of T)(String)
    -- uid: RelogicLabs.JsonSchema.Tree.RuntimeContext.IgnoreObjectPropertyOrder
    -  name: IgnoreObjectPropertyOrder
    -  href: api/RelogicLabs.JsonSchema.Tree.RuntimeContext.html#RelogicLabs_JsonSchema_Tree_RuntimeContext_IgnoreObjectPropertyOrder
    -  commentId: P:RelogicLabs.JsonSchema.Tree.RuntimeContext.IgnoreObjectPropertyOrder
    -  fullName: RelogicLabs.JsonSchema.Tree.RuntimeContext.IgnoreObjectPropertyOrder
    -  nameWithType: RuntimeContext.IgnoreObjectPropertyOrder
    -- uid: RelogicLabs.JsonSchema.Tree.RuntimeContext.IgnoreObjectPropertyOrder*
    -  name: IgnoreObjectPropertyOrder
    -  href: api/RelogicLabs.JsonSchema.Tree.RuntimeContext.html#RelogicLabs_JsonSchema_Tree_RuntimeContext_IgnoreObjectPropertyOrder_
    -  commentId: Overload:RelogicLabs.JsonSchema.Tree.RuntimeContext.IgnoreObjectPropertyOrder
    -  isSpec: "True"
    -  fullName: RelogicLabs.JsonSchema.Tree.RuntimeContext.IgnoreObjectPropertyOrder
    -  nameWithType: RuntimeContext.IgnoreObjectPropertyOrder
    -- uid: RelogicLabs.JsonSchema.Tree.RuntimeContext.IgnoreUndefinedProperties
    -  name: IgnoreUndefinedProperties
    -  href: api/RelogicLabs.JsonSchema.Tree.RuntimeContext.html#RelogicLabs_JsonSchema_Tree_RuntimeContext_IgnoreUndefinedProperties
    -  commentId: P:RelogicLabs.JsonSchema.Tree.RuntimeContext.IgnoreUndefinedProperties
    -  fullName: RelogicLabs.JsonSchema.Tree.RuntimeContext.IgnoreUndefinedProperties
    -  nameWithType: RuntimeContext.IgnoreUndefinedProperties
    -- uid: RelogicLabs.JsonSchema.Tree.RuntimeContext.IgnoreUndefinedProperties*
    -  name: IgnoreUndefinedProperties
    -  href: api/RelogicLabs.JsonSchema.Tree.RuntimeContext.html#RelogicLabs_JsonSchema_Tree_RuntimeContext_IgnoreUndefinedProperties_
    -  commentId: Overload:RelogicLabs.JsonSchema.Tree.RuntimeContext.IgnoreUndefinedProperties
    -  isSpec: "True"
    -  fullName: RelogicLabs.JsonSchema.Tree.RuntimeContext.IgnoreUndefinedProperties
    -  nameWithType: RuntimeContext.IgnoreUndefinedProperties
    -- uid: RelogicLabs.JsonSchema.Tree.RuntimeContext.InvokeFunction(RelogicLabs.JsonSchema.Types.JFunction,RelogicLabs.JsonSchema.Types.JNode)
    -  name: InvokeFunction(JFunction, JNode)
    -  href: api/RelogicLabs.JsonSchema.Tree.RuntimeContext.html#RelogicLabs_JsonSchema_Tree_RuntimeContext_InvokeFunction_RelogicLabs_JsonSchema_Types_JFunction_RelogicLabs_JsonSchema_Types_JNode_
    -  commentId: M:RelogicLabs.JsonSchema.Tree.RuntimeContext.InvokeFunction(RelogicLabs.JsonSchema.Types.JFunction,RelogicLabs.JsonSchema.Types.JNode)
    -  fullName: RelogicLabs.JsonSchema.Tree.RuntimeContext.InvokeFunction(RelogicLabs.JsonSchema.Types.JFunction, RelogicLabs.JsonSchema.Types.JNode)
    -  nameWithType: RuntimeContext.InvokeFunction(JFunction, JNode)
    -- uid: RelogicLabs.JsonSchema.Tree.RuntimeContext.InvokeFunction*
    -  name: InvokeFunction
    -  href: api/RelogicLabs.JsonSchema.Tree.RuntimeContext.html#RelogicLabs_JsonSchema_Tree_RuntimeContext_InvokeFunction_
    -  commentId: Overload:RelogicLabs.JsonSchema.Tree.RuntimeContext.InvokeFunction
    +- uid: RelogicLabs.JsonSchema.Tree.RuntimeContext.Functions
    +  name: Functions
    +  href: api/RelogicLabs.JsonSchema.Tree.RuntimeContext.html#RelogicLabs_JsonSchema_Tree_RuntimeContext_Functions
    +  commentId: P:RelogicLabs.JsonSchema.Tree.RuntimeContext.Functions
    +  fullName: RelogicLabs.JsonSchema.Tree.RuntimeContext.Functions
    +  nameWithType: RuntimeContext.Functions
    +- uid: RelogicLabs.JsonSchema.Tree.RuntimeContext.Functions*
    +  name: Functions
    +  href: api/RelogicLabs.JsonSchema.Tree.RuntimeContext.html#RelogicLabs_JsonSchema_Tree_RuntimeContext_Functions_
    +  commentId: Overload:RelogicLabs.JsonSchema.Tree.RuntimeContext.Functions
       isSpec: "True"
    -  fullName: RelogicLabs.JsonSchema.Tree.RuntimeContext.InvokeFunction
    -  nameWithType: RuntimeContext.InvokeFunction
    +  fullName: RelogicLabs.JsonSchema.Tree.RuntimeContext.Functions
    +  nameWithType: RuntimeContext.Functions
    +- uid: RelogicLabs.JsonSchema.Tree.RuntimeContext.Pragmas
    +  name: Pragmas
    +  href: api/RelogicLabs.JsonSchema.Tree.RuntimeContext.html#RelogicLabs_JsonSchema_Tree_RuntimeContext_Pragmas
    +  commentId: P:RelogicLabs.JsonSchema.Tree.RuntimeContext.Pragmas
    +  fullName: RelogicLabs.JsonSchema.Tree.RuntimeContext.Pragmas
    +  nameWithType: RuntimeContext.Pragmas
    +- uid: RelogicLabs.JsonSchema.Tree.RuntimeContext.Pragmas*
    +  name: Pragmas
    +  href: api/RelogicLabs.JsonSchema.Tree.RuntimeContext.html#RelogicLabs_JsonSchema_Tree_RuntimeContext_Pragmas_
    +  commentId: Overload:RelogicLabs.JsonSchema.Tree.RuntimeContext.Pragmas
    +  isSpec: "True"
    +  fullName: RelogicLabs.JsonSchema.Tree.RuntimeContext.Pragmas
    +  nameWithType: RuntimeContext.Pragmas
    +- uid: RelogicLabs.JsonSchema.Tree.RuntimeContext.Retrieve(System.String)
    +  name: Retrieve(string)
    +  href: api/RelogicLabs.JsonSchema.Tree.RuntimeContext.html#RelogicLabs_JsonSchema_Tree_RuntimeContext_Retrieve_System_String_
    +  commentId: M:RelogicLabs.JsonSchema.Tree.RuntimeContext.Retrieve(System.String)
    +  name.vb: Retrieve(String)
    +  fullName: RelogicLabs.JsonSchema.Tree.RuntimeContext.Retrieve(string)
    +  fullName.vb: RelogicLabs.JsonSchema.Tree.RuntimeContext.Retrieve(String)
    +  nameWithType: RuntimeContext.Retrieve(string)
    +  nameWithType.vb: RuntimeContext.Retrieve(String)
    +- uid: RelogicLabs.JsonSchema.Tree.RuntimeContext.Retrieve*
    +  name: Retrieve
    +  href: api/RelogicLabs.JsonSchema.Tree.RuntimeContext.html#RelogicLabs_JsonSchema_Tree_RuntimeContext_Retrieve_
    +  commentId: Overload:RelogicLabs.JsonSchema.Tree.RuntimeContext.Retrieve
    +  isSpec: "True"
    +  fullName: RelogicLabs.JsonSchema.Tree.RuntimeContext.Retrieve
    +  nameWithType: RuntimeContext.Retrieve
    +- uid: RelogicLabs.JsonSchema.Tree.RuntimeContext.Store(System.String,System.Object)
    +  name: Store(string, object)
    +  href: api/RelogicLabs.JsonSchema.Tree.RuntimeContext.html#RelogicLabs_JsonSchema_Tree_RuntimeContext_Store_System_String_System_Object_
    +  commentId: M:RelogicLabs.JsonSchema.Tree.RuntimeContext.Store(System.String,System.Object)
    +  name.vb: Store(String, Object)
    +  fullName: RelogicLabs.JsonSchema.Tree.RuntimeContext.Store(string, object)
    +  fullName.vb: RelogicLabs.JsonSchema.Tree.RuntimeContext.Store(String, Object)
    +  nameWithType: RuntimeContext.Store(string, object)
    +  nameWithType.vb: RuntimeContext.Store(String, Object)
    +- uid: RelogicLabs.JsonSchema.Tree.RuntimeContext.Store*
    +  name: Store
    +  href: api/RelogicLabs.JsonSchema.Tree.RuntimeContext.html#RelogicLabs_JsonSchema_Tree_RuntimeContext_Store_
    +  commentId: Overload:RelogicLabs.JsonSchema.Tree.RuntimeContext.Store
    +  isSpec: "True"
    +  fullName: RelogicLabs.JsonSchema.Tree.RuntimeContext.Store
    +  nameWithType: RuntimeContext.Store
     - uid: RelogicLabs.JsonSchema.Tree.RuntimeContext.ThrowException
       name: ThrowException
       href: api/RelogicLabs.JsonSchema.Tree.RuntimeContext.html#RelogicLabs_JsonSchema_Tree_RuntimeContext_ThrowException
    @@ -3211,6 +3675,57 @@ references:
       isSpec: "True"
       fullName: RelogicLabs.JsonSchema.Types.JDataType.ToString
       nameWithType: JDataType.ToString
    +- uid: RelogicLabs.JsonSchema.Types.JDate
    +  name: JDate
    +  href: api/RelogicLabs.JsonSchema.Types.JDate.html
    +  commentId: T:RelogicLabs.JsonSchema.Types.JDate
    +  fullName: RelogicLabs.JsonSchema.Types.JDate
    +  nameWithType: JDate
    +- uid: RelogicLabs.JsonSchema.Types.JDate.Type
    +  name: Type
    +  href: api/RelogicLabs.JsonSchema.Types.JDate.html#RelogicLabs_JsonSchema_Types_JDate_Type
    +  commentId: P:RelogicLabs.JsonSchema.Types.JDate.Type
    +  fullName: RelogicLabs.JsonSchema.Types.JDate.Type
    +  nameWithType: JDate.Type
    +- uid: RelogicLabs.JsonSchema.Types.JDate.Type*
    +  name: Type
    +  href: api/RelogicLabs.JsonSchema.Types.JDate.html#RelogicLabs_JsonSchema_Types_JDate_Type_
    +  commentId: Overload:RelogicLabs.JsonSchema.Types.JDate.Type
    +  isSpec: "True"
    +  fullName: RelogicLabs.JsonSchema.Types.JDate.Type
    +  nameWithType: JDate.Type
    +- uid: RelogicLabs.JsonSchema.Types.JDateTime
    +  name: JDateTime
    +  href: api/RelogicLabs.JsonSchema.Types.JDateTime.html
    +  commentId: T:RelogicLabs.JsonSchema.Types.JDateTime
    +  fullName: RelogicLabs.JsonSchema.Types.JDateTime
    +  nameWithType: JDateTime
    +- uid: RelogicLabs.JsonSchema.Types.JDateTime.DateTime
    +  name: DateTime
    +  href: api/RelogicLabs.JsonSchema.Types.JDateTime.html#RelogicLabs_JsonSchema_Types_JDateTime_DateTime
    +  commentId: P:RelogicLabs.JsonSchema.Types.JDateTime.DateTime
    +  fullName: RelogicLabs.JsonSchema.Types.JDateTime.DateTime
    +  nameWithType: JDateTime.DateTime
    +- uid: RelogicLabs.JsonSchema.Types.JDateTime.DateTime*
    +  name: DateTime
    +  href: api/RelogicLabs.JsonSchema.Types.JDateTime.html#RelogicLabs_JsonSchema_Types_JDateTime_DateTime_
    +  commentId: Overload:RelogicLabs.JsonSchema.Types.JDateTime.DateTime
    +  isSpec: "True"
    +  fullName: RelogicLabs.JsonSchema.Types.JDateTime.DateTime
    +  nameWithType: JDateTime.DateTime
    +- uid: RelogicLabs.JsonSchema.Types.JDateTime.Type
    +  name: Type
    +  href: api/RelogicLabs.JsonSchema.Types.JDateTime.html#RelogicLabs_JsonSchema_Types_JDateTime_Type
    +  commentId: P:RelogicLabs.JsonSchema.Types.JDateTime.Type
    +  fullName: RelogicLabs.JsonSchema.Types.JDateTime.Type
    +  nameWithType: JDateTime.Type
    +- uid: RelogicLabs.JsonSchema.Types.JDateTime.Type*
    +  name: Type
    +  href: api/RelogicLabs.JsonSchema.Types.JDateTime.html#RelogicLabs_JsonSchema_Types_JDateTime_Type_
    +  commentId: Overload:RelogicLabs.JsonSchema.Types.JDateTime.Type
    +  isSpec: "True"
    +  fullName: RelogicLabs.JsonSchema.Types.JDateTime.Type
    +  nameWithType: JDateTime.Type
     - uid: RelogicLabs.JsonSchema.Types.JDefinition
       name: JDefinition
       href: api/RelogicLabs.JsonSchema.Types.JDefinition.html
    @@ -4596,6 +5111,12 @@ references:
       commentId: F:RelogicLabs.JsonSchema.Types.JsonType.DATE
       fullName: RelogicLabs.JsonSchema.Types.JsonType.DATE
       nameWithType: JsonType.DATE
    +- uid: RelogicLabs.JsonSchema.Types.JsonType.DATETIME
    +  name: DATETIME
    +  href: api/RelogicLabs.JsonSchema.Types.JsonType.html#RelogicLabs_JsonSchema_Types_JsonType_DATETIME
    +  commentId: F:RelogicLabs.JsonSchema.Types.JsonType.DATETIME
    +  fullName: RelogicLabs.JsonSchema.Types.JsonType.DATETIME
    +  nameWithType: JsonType.DATETIME
     - uid: RelogicLabs.JsonSchema.Types.JsonType.DOUBLE
       name: DOUBLE
       href: api/RelogicLabs.JsonSchema.Types.JsonType.html#RelogicLabs_JsonSchema_Types_JsonType_DOUBLE
    @@ -4811,6 +5332,25 @@ references:
       isSpec: "True"
       fullName: RelogicLabs.JsonSchema.Types.JString.Value
       nameWithType: JString.Value
    +- uid: RelogicLabs.JsonSchema.Types.JTime
    +  name: JTime
    +  href: api/RelogicLabs.JsonSchema.Types.JTime.html
    +  commentId: T:RelogicLabs.JsonSchema.Types.JTime
    +  fullName: RelogicLabs.JsonSchema.Types.JTime
    +  nameWithType: JTime
    +- uid: RelogicLabs.JsonSchema.Types.JTime.Type
    +  name: Type
    +  href: api/RelogicLabs.JsonSchema.Types.JTime.html#RelogicLabs_JsonSchema_Types_JTime_Type
    +  commentId: P:RelogicLabs.JsonSchema.Types.JTime.Type
    +  fullName: RelogicLabs.JsonSchema.Types.JTime.Type
    +  nameWithType: JTime.Type
    +- uid: RelogicLabs.JsonSchema.Types.JTime.Type*
    +  name: Type
    +  href: api/RelogicLabs.JsonSchema.Types.JTime.html#RelogicLabs_JsonSchema_Types_JTime_Type_
    +  commentId: Overload:RelogicLabs.JsonSchema.Types.JTime.Type
    +  isSpec: "True"
    +  fullName: RelogicLabs.JsonSchema.Types.JTime.Type
    +  nameWithType: JTime.Type
     - uid: RelogicLabs.JsonSchema.Types.JTitle
       name: JTitle
       href: api/RelogicLabs.JsonSchema.Types.JTitle.html