question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Eliminate Newtonsoft.Json

See original GitHub issue

Your dependency on Newtonsoft.Json and use of Stream goes counter to everyone’s use of System.Text.Json and IBufferWriter<>

Describe the solution you’d like Now that System.Text.Json is netstandard2.0 you should get rid of Newtonsoft.Json

Additional context it creates dangling references that I do not want to carry around

The core cosmos API should limit itself to IBufferWriter<> and Span<T> and expose typed serialization as extensions

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:19
  • Comments:17 (12 by maintainers)

github_iconTop GitHub Comments

18reactions
DanielLarsenNZcommented, Oct 30, 2019

When using the Cosmos SDK in ASP.NET Core 3.0 and .NET Core 3.0 today, we have to use Newtonsoft.Json, for its JsonPropertyAttribute to rename Id to id. Using System.Text.Json.Serialization attributes does not work. For example:

[Newtonsoft.Json.JsonProperty(PropertyName = "id")]
public string Id { get; set; }

IMO we should be able to use the native System.Text.Json.Serialization.JsonPropertyNameAttribute to rename properties for serialization. Same goes for Ignore, etc.

9reactions
ealsurcommented, Jun 13, 2020

The goal is for V4 not to have any Newtonsoft.Json dependency.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Remove dependency on Newtonsoft.Json · Issue #1060
I've tested/used this with Mono.Cecil and Castle.Core, but haven't used the above file more than simply checking that it compiles. You will need ......
Read more >
[DOTS] Why are you constantly adding and removing ...
json file is located under the Project folder\Packages. Then you can safely delete the Newtonsoft.Json.dll from your Assets folder and use the ...
Read more >
ASP.NET - How to remove Newtonsoft.Json dependency
I found the solution. The project requires "Newtonsoft.Json, Version=4.5.0.0", But I realized that I load the "Newtonsoft.
Read more >
Migrate from Newtonsoft.Json to System.Text.Json - .NET
Newtonsoft.Json can serialize or deserialize numbers represented by JSON strings (surrounded by quotes). For example, it can accept: {" ...
Read more >
JObject.Remove Method (String)
Removes the property with the specified name. Namespace: Newtonsoft.Json.Linq Assembly: Newtonsoft.Json (in Newtonsoft.Json.dll) Version: 12.0.1+ ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found