From abacf704d89bbe2622aefa2a12bdabc08f7c7c3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kaarlo=20R=C3=A4ih=C3=A4?= Date: Sat, 25 Aug 2018 18:04:10 +0300 Subject: [PATCH] Make KeysTest work better C# does not allow modifications for collections while they are iterated, so get copy of keys and run with that. There is now special case for top level holdering ("" as key), otherwise transformer is also executed for it (yes, this is ugly and needs fixing). --- Json5/Json5.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Json5/Json5.cs b/Json5/Json5.cs index 00a8f48..81a742d 100644 --- a/Json5/Json5.cs +++ b/Json5/Json5.cs @@ -105,7 +105,8 @@ private static Json5Value Walk(Json5Container holder, string key, Func