casting intger JToken always return 1
ammariqais opened this issue · 0 comments
ammariqais commented
I am using Newtonsoft.Json and when i patched the method and casting JToken object to integer its always return 1
code
[Patch]
void ConvertToInt(){
JToken num = 500;
Debug.Log((int)num) // always logging 1
}
without patch its working fine
so I fix this issue by parsing variable
like
JToken num = 500;
Debug.Log(int.Parse(num.ToString())) // its print 500
I am using Newton.Json v13