SaladLab / Json.Net.Unity3D

Forked Newtonsoft.Json to support Unity3D
MIT License
918 stars 169 forks source link

SerializationBinder and BindToName with Unity 2017 #22

Open cchafer opened 7 years ago

cchafer commented 7 years ago

Hi,

I just updated my Unity to the 2017 version, in order to use a more recent (read not so old) version on the mono framework (version 4).

When working with custom SerializationBinder, one should be able to override both BindToName and BindToType methods.

But the fact is that BindToName seems not to be ever called. Did I miss something, is it due to Json.Net.Unity3D assuming an 'old' version of mono, or is it a bug ?

ghost commented 6 years ago

Any solution?

MikeL1300 commented 6 years ago

Same issue here. Both BindToName and BindToType are never called when using a custom Binder on Unity 2017 with Mono 4.6.

dfraska commented 6 years ago

Could really use a fix or workaround for this.

SugoiDev commented 6 years ago

There's a supported JSON.NET package on the asset store. It used to be paid, but the developer made it free after a deal.

The developer from SaladLab (of this integration) has been missing for a long time now, so I don't recommend using it for new projects and, if possible, use the json solution from the asset store.

PARENTELEMENT, LLC JSON .NET For Unity

dfraska commented 6 years ago

Ah, ya that's actually what I'm using, and the bug is in their version. Sorry, I should have been more careful about looking at the owner of this branch.

SugoiDev commented 6 years ago

Ah, I see!

Try sending an email to the developer (dustin at parentelement.com) or posting a reply in the asset's forum thread. Dev seems very responsive. He might even have a fix already, if others got the same issue before you.