public static string ConvertToJson(PMap map) { var writer = new CompactSettingWriter(); writer.Visit(map); return(writer.outputBuilder.ToString()); }
protected internal override bool ShouldSave(IReadOnlyList <SettingCopy> updates, out string textToSave) { SettingCopy latestUpdate = updates[updates.Count - 1]; if (!latestUpdate.EqualTo(RemoteSettings)) { RemoteSettings = latestUpdate.Commit(); textToSave = CompactSettingWriter.ConvertToJson(RemoteSettings.Map); return(true); } textToSave = default; return(false); }