SimpleJSON.JSONNode.SaveToBase64 C# (CSharp) Method

SaveToBase64() public method

public SaveToBase64 ( ) : string
return string
		public string SaveToBase64()
		{
			using (var stream = new System.IO.MemoryStream())
			{
				SaveToStream(stream);
				stream.Position = 0;
				return System.Convert.ToBase64String(stream.ToArray());
			}
		}

Usage Example

Example #1
0
 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);
     }
 }
All Usage Examples Of SimpleJSON.JSONNode::SaveToBase64