From 94f4f68566ca0ddbddf2ebeb6725aa8e5a144129 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kaarlo=20R=C3=A4ih=C3=A4?= Date: Sat, 25 Aug 2018 18:47:11 +0300 Subject: [PATCH] Implement one Stringify overload This plus fix-iteration-mutation branch should make FunctionTest much better --- Json5/Json5.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Json5/Json5.cs b/Json5/Json5.cs index 00a8f48..a6d7142 100644 --- a/Json5/Json5.cs +++ b/Json5/Json5.cs @@ -50,7 +50,11 @@ public static string Stringify(Json5Value value, Func replacer, string space = null) { - throw new NotImplementedException(); + Func finalReplacer = null; + if (replacer != null) + finalReplacer = (t, k, v) => replacer(k, v); + + return Stringify(value, finalReplacer, space); } public static string Stringify(Json5Value value, Func replacer, int space)