79226162

Date: 2024-11-26 10:02:52
Score: 0.5
Natty:
Report link

Why don't you use context.Schema directly ?

It skips re-parsing but still validates against the original schema.

And you won't even need to convert into the string

public override void Validate(JToken value, JsonValidatorContext context)
{
    if (value.IsValid(context.Schema))
    {
        ValidateInternal(value, context);
    }
}
Reasons:
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): Why don't you use
Posted by: AVTUNEY