public string SaveToBase64() { using (var stream = new System.IO.MemoryStream()) { SaveToStream(stream); stream.Position = 0; return System.Convert.ToBase64String(stream.ToArray()); } }
public static string jsonToBase64(string paramJson) { try { SimpleJSON.JSONNode node = SimpleJSON.JSON.Parse(paramJson); return(node.SaveToBase64()); } catch (Exception ex) { DebugLogError(ex.Message); return(paramJson); } }