コード例 #1
0
    public static string getCustomValue(CustomValue customValue)
    {
        //if(customValue == null)
        //{
        //    return "";
        //}
        Dictionary <string, object> dictionary = new Dictionary <string, object>();

        dictionary.Add("mvt1", customValue.getValue1() ?? string.Empty);
        dictionary.Add("mvt2", customValue.getValue2() ?? string.Empty);
        dictionary.Add("mvt3", customValue.getValue3() ?? string.Empty);
        dictionary.Add("mvt4", customValue.getValue4() ?? string.Empty);
        dictionary.Add("mvt5", customValue.getValue5() ?? string.Empty);
        dictionary.Add("mvt6", customValue.getValue6() ?? string.Empty);
        dictionary.Add("mvt7", customValue.getValue7() ?? string.Empty);
        dictionary.Add("mvt8", customValue.getValue8() ?? string.Empty);
        dictionary.Add("mvt9", customValue.getValue9() ?? string.Empty);
        dictionary.Add("mvt10", customValue.getValue10() ?? string.Empty);
        string jsonString = Serializer.Serialize(dictionary);

        Debug.Log("custom value string : " + jsonString);
        return(jsonString);
    }