private static Dictionary <string, object> DeserializeDataObject(string bytes)
    {
        var m_Data = Json.Deserialize(bytes) as Dictionary <string, object>;

        if (m_Data == null)
        {
            return(new Dictionary <string, object>());
        }
        return(m_Data);
    }
Beispiel #2
0
    private void DeserializeDataObject(byte[] bytes)
    {
        var m_Data = Json.Deserialize(_encoding.GetString(bytes)) as Dictionary <string, object>;

        if (m_Data != null && m_Data.Count > 0)
        {
            Data = new Dictionary <string, string>(m_Data.Count);
            foreach (var data in m_Data)
            {
                Data.Add(data.Key, data.Value.ToString());
            }
        }
    }