0

Exception:

Newtonsoft.Json.JsonSerializationException: Error getting value from 'XXX' on 'xxxxxx'. ---> System.NullReferenceException: Object reference not set to an instance of an object.

but it works in editor mode

here is my code:

Dictionary<string, object> sendMsgDic = new Dictionary<string, object>();
.......
sendMsg = JsonConvert.SerializeObject(sendMsgDic)
eglease
  • 2,445
  • 11
  • 18
  • 28
Cary
  • 11
  • 1
    I'm not able to reproduce your issue with the code and information you've provided https://dotnetfiddle.net/7NZwqQ. Please post a [mre]. – gunr2171 Mar 02 '22 at 15:47
  • There is also the generic advice for dealing with Null Reference Exceptions: https://stackoverflow.com/questions/4660142/what-is-a-nullreferenceexception-and-how-do-i-fix-it – gunr2171 Mar 02 '22 at 15:53

0 Answers0