Calling Nakama.TinyJson.JsonWriter.ToJson on an object with a DateTime will crash

TinyJson is intended to be a compact and resource-efficient JSON encoder/decoder so it doesn’t quite handle every type.

It’s probably easiest to just convert your DateTime type to a string notation like ISO 8601 or an integer representing UTC seconds/milliseconds before passing it to be encoded as JSON.

1 Like