Skip to content

Commit a149833

Browse files
committed
Merge branch 'blubbfish-patch-1' into develop
* blubbfish-patch-1: Create method for checking of key
2 parents 3ee6363 + fb2278a commit a149833

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/LitJson/JsonData.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,16 @@ public bool IsString {
7373
public ICollection<string> Keys {
7474
get { EnsureDictionary (); return inst_object.Keys; }
7575
}
76+
77+
/// <summary>
78+
/// Determines whether the json contains an element that has the specified key.
79+
/// </summary>
80+
/// <param name="key">The key to locate in the json.</param>
81+
/// <returns>true if the json contains an element that has the specified key; otherwise, false.</returns>
82+
public Boolean ContainsKey(String key) {
83+
EnsureDictionary();
84+
return this.inst_object.Keys.Contains(key);
85+
}
7686
#endregion
7787

7888

0 commit comments

Comments
 (0)