Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetPath() [2/2]

override void System.Text.Json.Nodes.JsonObject.GetPath ( List< string > path,
JsonNode child )
inlinepackage

Definition at line 185 of file JsonObject.cs.

186 {
187 if (child != null)
188 {
190 string key = _dictionary.FindValue(child).Value.Key;
191 if (key.IndexOfAny(ReadStack.SpecialCharacters) != -1)
192 {
193 path.Add("['" + key + "']");
194 }
195 else
196 {
197 path.Add("." + key);
198 }
199 }
200 if (base.Parent != null)
201 {
202 base.Parent.GetPath(path, this);
203 }
204 }
void Add(TKey key, TValue value)
JsonPropertyDictionary< JsonNode > _dictionary
Definition JsonObject.cs:80

References System.Text.Json.Nodes.JsonObject._dictionary, System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Collections.Generic.Dictionary< TKey, TValue >.FindValue(), System.Text.Json.Nodes.JsonObject.InitializeIfRequired(), System.key, and System.Text.Json.ReadStack.SpecialCharacters.