mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-11 21:38:56 -05:00
MigrateExpression
This commit is contained in:
@@ -28,6 +28,19 @@ namespace UniJSON
|
||||
return self.Children.Count() / 2;
|
||||
}
|
||||
|
||||
public static string GetObjectValueOrDefault<T>(this ListTreeNode<T> self, String key, string defualtValue)
|
||||
where T : IListTreeItem, IValue<T>
|
||||
{
|
||||
try
|
||||
{
|
||||
return self[key].GetString();
|
||||
}
|
||||
catch (KeyNotFoundException)
|
||||
{
|
||||
return defualtValue;
|
||||
}
|
||||
}
|
||||
|
||||
public static ListTreeNode<T> GetObjectItem<T>(this ListTreeNode<T> self, String key)
|
||||
where T : IListTreeItem, IValue<T>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user