Json.NET
Protobuf
Our great sponsors
Json.NET | Protobuf | |
---|---|---|
53 | 171 | |
10,504 | 63,586 | |
- | 1.0% | |
3.1 | 10.0 | |
7 days ago | 4 days ago | |
C# | C++ | |
MIT License | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Json.NET
- stopDoingJson
-
Should you use Newtonsoft.Json or System.Text.Json in 2023?
This bug and many others related to time: https://github.com/JamesNK/Newtonsoft.Json/issues/862 And they will never get fixes, because the project is kind of dead. Edit: and actually, the creator claim to have made it like this on purpose, so I don't trust it anymore.
-
Removing default values while serializing using Newtonsoft.Json
There's a related discussion on the GitHub repo:
-
React developer to NET
Nuget is where you'll get 3rd party libraries (such as Newtonsoft.Json for JSON processing)
- what library do i need to include for this json deserializer? (or how do i find what libs i need to include in general?)
- How do you normally store large raw json string into a variable in your code in C#?
-
Best practice for organizing multiple classes (new to programming)
Common convention (with rare exceptions) is to name your project the same as your assembly name and default namespace. For example, Newtonsoft.Json.csproj makes an assembly called Newtonsoft.Json.dll with the default namespace of Newtonsoft.Json. Inside that project directory (which usually also has the same name), subdirectories would match namespaces nested inside the default, like in that example there is a folder named Serialization which contains classes that are all in the namespace Newtonsoft.Json.Serialization. Classes in this nested namespace can automatically access classes defined in parent namespaces without extra using statements, like how JsonProperty.cs can reference JsonConverter from the Newtonsoft.Json namespace, but it needs a using statement at the top of the file in order to access classes from the sibling namespace Newtonsoft.Json.Utilities
-
market data GET HttpClient json requests vs net sdk wrapper functions
As I said, I'm not familiar with C# but on a quick Google it seems there isn't one idiomatic way to handle JSON in C# - instead a multitude of different libraries/packages for doing so. This seems... ...irritating. json.NET (https://www.newtonsoft.com/json) seems to be one of the best (but again, I don't know C#).
-
How easy is Monogame for a beginner coming from game engines?
MonoGame abstracts a lot of the rendering work and is easy to use for 2D games (I haven't tested its 3D support so far). It also provides you with a content pipeline plus audio and input handlers. All that's left for you to do is roll your own Entity Component System, physics, and game logic. If you're not interested in writing your own physics, there are libraries out there already. Additionally, if you don't want to get caught up in the details of data serialization, Json.NET is a great package for serializing data in JSON format. That makes it perfect when paired with a map editor such as Tiled, which can export to JSON.
-
Does SerializeObject from NewtonSoftJson translate property names based on the environment language?
Also file an issue report with Newtonsoft because IMO that should not be happening.
Protobuf
-
Reverse Engineering Protobuf Definitions from Compiled Binaries
For at least 4 years protobuf has had decent support for self-describing messages (very similar to avro) as well as reflection
https://github.com/protocolbuffers/protobuf/blob/main/src/go...
Xgooglers trying to make do on the cheap will just create a Union of all their messages and include the message def in a self-describing message pattern. Super-sensitive network I/O can elide the message def (empty buffer) and any for RecordIO clone well file compression takes care of the definition.
Definitely useful to be able to dig out old defs but protobuf maintainers have surprisingly added useful features so you don’t have to.
Bonus points tho for extracting the protobuf defs that e.g. Apple bakes into their binaries.
- Show HN: AuthWin – Authenticator App for Windows
-
Create Production-Ready SDKs With gRPC Gateway
gRPC Gateway is a protoc plugin that reads gRPC service definitions and generates a reverse proxy server that translates a RESTful JSON API into gRPC.
-
Create Production-Ready SDKs with Goa
To use more recent versions of protoc in future applications, you can download them from the Protobuf repository.
-
Roll your own auth with Rust and Protobuf
Use the Protobuf CLI protoc and the plugin protoc-gen-tonic.
-
Add extra stuff to a “standard” encoding? Sure, why not
> didn’t find any standard for separating protobuf messages
The fact that protobufs are not self-delimiting is an endless source of frustration, but I know of 2 standards:
- SerializeDelimited* is part of the protobuf library: https://github.com/protocolbuffers/protobuf/blob/main/src/go...
- Riegeli is "a file format for storing a sequence of string records, typically serialized protocol buffers. It supports dense compression, fast decoding, seeking, detection and optional skipping of data corruption, filtering of proto message fields for even faster decoding, and parallel encoding": https://github.com/google/riegeli
-
Block YouTube Ads on AppleTV by Decrypting and Stripping Ads from Profobuf
It looks like it is in fact universal. Just glancing at the code here, it looks like the tool searches any arbitrary file for bytes that look like encoded protobuf descriptors, specifically looking for bytes that are plausibly the beginning of a FileDescriptorProto message defined here:
https://github.com/protocolbuffers/protobuf/blob/main/src/go...
This takes advantage of the fact that such descriptors are commonly compiled into programs that use protobuf. The descriptors are usually embedded as constant byte arrays. That said, not all protobuf implementations embed the descriptors and those that do often have an option to inhibit such embedding (at the expense of losing some dynamic introspection features).
- How to learn to use protoc in 21 easily infuriating steps
-
What's involved in protobuf encoding?
Not much. You can check the source code in https://github.com/protocolbuffers/protobuf. For example, for serializing a boolean in C#: https://github.com/protocolbuffers/protobuf/blob/main/csharp/src/Google.Protobuf/WritingPrimitives.cs#L165. Strings and objects are a bit more complicated, but it is all about turning the data into its byte representation.
-
Trying To Solve The Confusion of Choice Between gRPC vs REST🕵
One of the key feature of gRPC is protobuf .proto file(nothing but just a contract for me between two communicator code components) This file and protobuff compiler is so mature, then it generates a direct client implementation using protoccompiler. ref
What are some alternatives?
Utf8Json - Definitely Fastest and Zero Allocation JSON Serializer for C#(NET, .NET Core, Unity, Xamarin).
FlatBuffers - FlatBuffers: Memory Efficient Serialization Library
MessagePack for C# (.NET, .NET Core, Unity, Xamarin) - Extremely Fast MessagePack Serializer for C#(.NET, .NET Core, Unity, Xamarin). / msgpack.org[C#]
SBE - Simple Binary Encoding (SBE) - High Performance Message Codec
Protobuf.NET - Protocol Buffers library for idiomatic .NET
MessagePack - MessagePack implementation for C and C++ / msgpack.org[C/C++]
LitJSON - JSON library for the .Net framework
cereal - A C++11 library for serialization
Jil - Fast .NET JSON (De)Serializer, Built On Sigil
Apache Parquet - Apache Parquet
ProtoBuf - C# code generator for reading and writing the protocol buffers format
Bond - Bond is a cross-platform framework for working with schematized data. It supports cross-language de/serialization and powerful generic mechanisms for efficiently manipulating data. Bond is broadly used at Microsoft in high scale services.