Skip to content
This repository was archived by the owner on Apr 28, 2020. It is now read-only.

Implement one Stringify overload #15

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Json5/Json5.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ public static string Stringify(Json5Value value, Func<Json5Container, string, Js

public static string Stringify(Json5Value value, Func<string, Json5Value, Json5Value> replacer, string space = null)
{
throw new NotImplementedException();
Func<Json5Container, string, Json5Value, Json5Value> finalReplacer = null;
if (replacer != null)
finalReplacer = (t, k, v) => replacer(k, v);

return Stringify(value, finalReplacer, space);
}

public static string Stringify(Json5Value value, Func<string, Json5Value, Json5Value> replacer, int space)
Expand Down