- Home /
Is it possible to use this DLL in Webplayer?
I really need a way to deseralize JSON in a Webplayer Build. Only thing I could find was this DLL:
System.Web.Script.Serialization.JavaScriptSerializer
But it doesn't seem to be in the Unity Framework. How do I go about this?
Thanks!
Answer by Graham-Dunnett · Jun 26, 2014 at 09:35 PM
If you know that the code in that DLL is pure c# code, so is an assembly, in other words, then simply copying it (and any dependencies it has) into your Plugins folder should work. If there is any native code in that DLL, then the build process will reject it.
Well I've tried importing the following DLL which should have the JavaScriptSerializer class, but I just get an error saying it could not load that DLL. The DLL is System.Web.Extensions.dll
You may not have looked closely to my problem. I am building to Webplayer and not Standalone.
Answer by Dustin-Horne · Jul 03, 2014 at 05:44 PM
How complex is the Json that you're looking to deserialize? You probably don't want to use the JavaScriptSerializer anyway as even Microsoft has forgone it for MVC and WebAPI. There are a lot of options. I have a port of JSON .NET for Unity in the Asset Store that works fine in Web Player. https://www.assetstore.unity3d.com/en/#!/content/11347
However, if you have some simple Json that you want to deserialize there are some free alternatives which would work great for you. Take a look at JsonObject for example: https://www.assetstore.unity3d.com/en/#!/content/710
Your answer
![](https://koobas.hobune.stream/wayback/20220613152557im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
JsonUtility doesn't serialize nested mixed var 1 Answer
ExpManagement problems 1 Answer
Illuminating a 3D object's edges OnMouseOver (script in c#)? 1 Answer