1,802 questions
3
votes
1
answer
97
views
Serialization of nullable immutable array
I seem to be having trouble serializing a Nullable, ImmutableArray which I had thought would work out of the box.
e.g.,
void Main()
{
var x = new Test() { Field = null };
var stream = new ...
1
vote
1
answer
109
views
Callback methods with ProtoBeforeSerialization/ProtoAfterDeserialization donot work in protobuf-net 3.2.26, even when assigned explicitly to MetaType
I'm upgrading from protobuf-net 2.2.1.0 to 3.2.26, and I've noticed that callback methods decorated with [ProtoBeforeSerialization] and [ProtoAfterDeserialization] are no longer invoked during ...
1
vote
1
answer
87
views
How do I set up automatic class generation from a contract using protobuf-net?
I configured the .csproj file as follows:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>...
1
vote
1
answer
147
views
ASP.NET Core 8 grpc Import "annotations.proto" not found
I have an ASP.NET Core 8 project and followed this article:
https://learn.microsoft.com/en-us/aspnet/core/grpc/json-transcoding-binding?view=aspnetcore-8.0
import "google/api/annotations.proto&...
0
votes
1
answer
50
views
Conditional Merge in Protobuf-Net
I have some very specific requirements for a serialization C# library: I need it be able to handle circular references or multiple references to the same object, be capable of deserializing into an ...
1
vote
0
answers
88
views
Serialization/deserialization by reference
I'm using Protobuf-net version 3.2.52
Classes B, C and D below contain a field of type Wplane, all of which have the same instance.
In the WPlane class, I transform the Plane property (this type comes ...
0
votes
0
answers
55
views
Protobuf-net unexpected method call
I'm using Protobuf-net version 3.2.52
During deserialization, a method call occurs unexpectedly.
How can Protobuf call this method when it's only referenced 15 times in the entire solution and I've ...
0
votes
1
answer
88
views
Protobuf-net recursion exception
I'm using Protobuf-net version 3.2.52
While serializing, I get this exception:
Possible recursion detected (offset: 3 level(s)): Loop_Protobuf.Core_E.Part
I've read all the posts about this error on ...
0
votes
1
answer
44
views
ProtoInclude on derived classes that inherit from class libraries
I have the following inheritance structure:
[ProtoContract]
public class User : UserCommon<User, Database.User>
[ProtoContract]
public abstract partial class UserCommon<T, T2> : ...
0
votes
0
answers
37
views
WPF acces to namespace protobuf-net libraries from a library which using protobuf-net libraries
I have a WPF library (myLibrary) that uses the protobuf-net libraries. The protobuf-net libraries are in a subfolder.
I'm doing this because another nuget package references protobuf-net but with an ...
0
votes
0
answers
38
views
Serialize an object that implements IEnumerable<T> with Protobuf.net [duplicate]
I am trying to serialize the following class with the latest version of Protobuf.net:
[ProtoContract(SkipConstructor = true)]
public class ObservableList<T> : IEnumerable<T>
{
[...
0
votes
0
answers
62
views
protobuf-net serialize object array when it only contains known types (int, string, decimal, etc.)
Maybe this is a nobrainer.
I have a tabular data structure where each row is represented by an object[]. The data structure implements ITypedList so I can even tell the exact type of each object in ...
0
votes
1
answer
71
views
Azure PubSub with protobuf data not working
I am using generic WebSocket client (System.Net.WebSockets) to connect to Azure Web PubSub service and communicate between two parties.
I referred this official document. I was able to communicate ...
1
vote
1
answer
83
views
DynamicData doesn't populate correctly test data when using grpc objects
I use Visual Studio 2022 and MS Test. To generate code from proto file I use Grpc.Tools (2.69.0) and Google.Protobuf (3.29.3) nugets.
I don't know how DynamicData feature works under the hood, but it ...
0
votes
0
answers
110
views
Converting FHIR Json to Google proto generated model
We have the FHIR JSON model which needs to be serialized using protobuf but we are not able to serialize it as the JSON is not getting parsed to the generated google fhir models.
https://github.com/...