Skip to content

Commit 26f1c15

Browse files
committed
🚧 Passes all Json Flattening Tests except "NullInArray"
semver: chore
1 parent 97493a4 commit 26f1c15

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

EliteAPI.Tests/Flattening.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,9 @@ private static List<JsonPath> FlattenJson(string json)
550550
var jToken = JToken.Parse(json);
551551
foreach (var jValue in jToken.GetLeafValues())
552552
{
553-
temp.Add(jValue.ToCustomJsonPath());
553+
var jpath = jValue.ToCustomJsonPath();
554+
// Skips values that are null
555+
if (!(string.IsNullOrWhiteSpace(jpath.Path) || string.IsNullOrWhiteSpace(jpath.Path))) temp.Add(jpath);
554556
}
555557

556558
return temp;

0 commit comments

Comments
 (0)