Source/NFX/Serialization/SerializationUtils.cs
/// <summary>
/// Navigates through JSON datamap by subsequent node names.
/// </summary>
/// <returns>
/// null if navigation path is not exists.
/// JSONDataMap if navigation ends up with non-leaf node.
/// object if navigation ends up with leaf node.</returns>
Navigates through JSON datamap by subsequent node names.
Navigates through JSON datamap by subsequent node names .
public static object GetNodeByPath(this JSONDataMap json, params string[] nodeNames)
        {
            object node = null;
            for (int i=0; i<nodeNames.Length; i++)
            {
                if (json == null || !json.TryGetValue(nodeNames[i], out node))
                    return null;
                if (i == nodeNames.Length - 1)
                    return node;
                json = node as JSONDataMap;
            }
            return null;
        }
public static object GetNodeByPath ( this JSONDataMap json , params string [ ] nodeNames ) { object node = null ; for ( int i = 0 ; i < nodeNames . Length ; i ++ ) { if ( json == null || ! json . TryGetValue ( nodeNames [ i ] , out node ) ) return null ; if ( i == nodeNames . Length - 1 ) return node ; json = node as JSONDataMap ; } return null ; }
Navigates through JSON datamap by subsequent node names.
Navigates through JSON datamap by subsequent node names .
null if navigation path is not exists.
JSONDataMap if navigation ends up with non-leaf node.
object if navigation ends up with leaf node.
null if navigation path is not exists . JSONDataMap if navigation ends up with non - leaf node . object if navigation ends up with leaf node .
JSONDataMap
this