SaveToBase64() публичный Метод

public SaveToBase64 ( ) : string
Результат string
Пример #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);
     }
 }
Пример #2
0
    void SaveMapData(JSONNode data)
    {
        #if !UNITY_WEBPLAYER
        if (File.Exists("Assets/Resources/Maps/" + LevelName + ".map"))
        {
            Debug.Log(LevelName + " already exist.");
            return;
        }

        // encode later
        var file = File.CreateText("Assets/Resources/Maps/" + LevelName + ".map");
        file.Write(data.SaveToBase64());
        file.Close();
        #endif
    }