tests fixes and some product advisories tunes ups
This commit is contained in:
@@ -111,12 +111,30 @@ public static class CanonicalJsonAssert
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!current.TryGetProperty(part, out var next))
|
||||
// Try exact match first
|
||||
if (current.TryGetProperty(part, out var next))
|
||||
{
|
||||
current = next;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Try case-insensitive match (canonical JSON may use different casing)
|
||||
JsonElement? found = null;
|
||||
foreach (var prop in current.EnumerateObject())
|
||||
{
|
||||
if (string.Equals(prop.Name, part, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
found = prop.Value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (found is null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
current = next;
|
||||
current = found.Value;
|
||||
}
|
||||
|
||||
return current;
|
||||
|
||||
Reference in New Issue
Block a user