Serialize object to json and back

Hi!

I need to serialize object to json format and back.

I’m trying to find some build in function but it looks like I’ve hot to use external library. That’s a problem because this should works in WebPlayer.

Is there is any solution?

As long as you use a .NET library I think it can be integrated into the webplayer no problem. There are even some open source .NET Json projects that you could probably include in your your game without much trouble. Here’s what a quick google brought up: Json.NET - Newtonsoft

If I get this right Unity - Manual: Plug-ins

it will be disabled in webplayer

That’s only for plugins that are built using native C or C++ code, you should be fine using a .NET assembly. With the project I’ve linked to you could even just include the source code directly, and that would definitely work.

for webplayer, litjson will work for sure.
for iphone, jsonfx is the only option (with .NET 2.1 enabled)

as for definitely working: not needfully, if a library relies on namespaces forbidden in the webplayer it wouldn’t work for example.