mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-08 11:59:26 -05:00
Migration
This commit is contained in:
@@ -66,6 +66,27 @@ namespace UniJSON
|
||||
return self.ContainsKey(ukey);
|
||||
}
|
||||
|
||||
public static bool TryGet(this JsonNode self, Utf8String key, out JsonNode found)
|
||||
{
|
||||
foreach (var kv in self.ObjectItems())
|
||||
{
|
||||
if (kv.Key.GetUtf8String() == key)
|
||||
{
|
||||
found = kv.Value;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
found = default;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool TryGet(this JsonNode self, String key, out JsonNode found)
|
||||
{
|
||||
var ukey = Utf8String.From(key);
|
||||
return self.TryGet(ukey, out found);
|
||||
}
|
||||
|
||||
public static Utf8String KeyOf(this JsonNode self, JsonNode node)
|
||||
{
|
||||
foreach (var kv in self.ObjectItems())
|
||||
|
||||
Reference in New Issue
Block a user