Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Discussion Newtonsoft.Json

Discussion in '2023.1 Beta' started by VOTRUBEC, Nov 4, 2022.

  1. VOTRUBEC

    VOTRUBEC

    Joined:
    Dec 17, 2014
    Posts:
    106
    It looks like the devs are doubling down on Newtonsoft.Json? I'm seeing Newtonsoft.Json frequently pop up in my Packages list as a dependency.

    This is simply a request because of my preference and 2023 is still in Alpha. And I'm sure that there's as many, if not more, reasons to stick with Newtonsoft.Json. But I've really been having very little friction using System.Text.Json. That's across Editor, WebGL builds, IOS apps, and Android games. The thing just works. That is, after I shoehorn the thing into the Plugins folder.

    One of the big reasons for me is that it's easy for me to focus on the same serialsier and code for both my Unity client and Azure servers. My code works between the two, my DTOs are the same, and there's no need to create two separate sets of code.

    One feature I really like with ASP NET Core was the ability to choose your serialiser and use either System.Text.Json or Newtonsoft.Json. Now, if Unity could do the same, that'd be pretty cool. Just a thought.
     
  2. GoshawkMachinist

    GoshawkMachinist

    Joined:
    Oct 28, 2020
    Posts:
    13
    I would also like to see option to use System.Text.Json instead of Newtonsoft.Json
     
    VOTRUBEC likes this.