Hi, I am trying to send data from Nakma server using Lua like this
local test_data =
{
[‘ThisIsNumber’] = 1577999999,
[‘ThisIsString’] = “Hello World”,
[‘ThisIsUnixTime’] = nk.time()
}dispatcher.broadcast_message(120, nk.json_encode(test_data))
The problem is that when I receive the data on unity the values will be like this
1577999999 —> 1577800000
and nk.time() —> will not be correct
When I received the data on Socket.OnMatchState
I did like this
string string_data_json = System.Text.Encoding.UTF8.GetString(matchState.State);
TestDataClass = tdc = JsonParser.FromJson(string_data_json);
Note 1 → I printed the string_data_json and the data were correct, the problem is with JsonParser.FromJson.
Note 2 → In my TestDataClass
ThisIsNumber is Int
ThisIsUnixTime is float
ThisIsString is string