Can anyone help me understand how to check if a key exists in a json file and if is does exist, then add that key to a dictionary?
Corbin Ordel
@corbinyo
anyone here to chat?
Mattias Karlsson
@devlead
Now and then 😎
JaxSaunders
@JaxSaunders
Hey all! Just curious as to whether or not there is an easy way to upgrade from one version of LitJSON to another. I'm upgrading Unity engines and it's suddenly thrown some fun new errors
Great, thanks! Have you heard any issues of it not working in Unity 2019? I'm getting "does not implement interface member" errors.
JaxSaunders
@JaxSaunders
Hello! So after updating, I'm now getting "JsonException: Max allowed object depth reached while trying to export from type System.Single", which I wasn't getting on Unity 5.6-2018 for some reason. Any advice you could give?
Mattias Karlsson
@devlead
Are you on Unity 2020.3? Could you raise an issue with a minimal data structure that can reproduce the error?
JaxSaunders
@JaxSaunders
Right now I'm using 2019.4.22f1, and I've actually been trying, but I recently took over this project at my company so I'm still very new to these systems.
Afeijia
@Afeijia
I'm using Unity2019.4.0f1 , and it work better in Editor,but while build WenGL, log errors JsonException: Can't assign value '0' (type System.Int32) to type LitJson.JsonData
at LitJson.JsonMapper.ReadValue . what should I do?
Mattias Karlsson
@devlead
Well '0' is a string and not a number
Lotus
@MokhtarKhorshid
Hi. On GitHub it's mentioned that LitJSON supports .NET Standard 2.0 however, when trying to use it in Unity 2019 (which uses 2.0) it won't build. In particular, there are lots of errors regarding IDictionary either begin ambiguous or not implemented fully in the code.
Example: IJsonWrapper.cs(33, 44): [CS0433] The type 'IOrderedDictionary' exists in both 'System.Collections.Specialized, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
and JsonData.cs(111, 14): [CS0540] 'JsonData.IDictionary.IsFixedSize': containing type does not implement interface 'IDictionary'
Do I need to roll back to older versions of LitJson to get it to work in Unity 2019?
Sorry if this is a dumb question, but how may I download the .dll file of LitJson? I have tried installing it with "Install-Package LitJson -Version 0.18.0" in Visual Studio package manager console, but I still cannot find its .dll file.
_
weierstrass1
@weierstrass1
hi, i have a question, how can i lnow if a JsonData contains a key?
Raistlin Wolfe
@LupusInferni315
I'm attempting to write an object to a json string, but the string returns empty, Is using auto-implemented properties required?