Open malavvvakharia opened 6 months ago
What is metrics
and where does it come from? The library is just there to serialize / deserialize data to / from Protobuf and to conveniently work with Sparkplug / Protobuf logic, but isn't optimized for JSON serialization (And I guess with the current model, this isn't even possible)...
In my opinion, this shouldn't be part of the library as e.g. Annotations for System.Text.Json / Newtonsoft.Json would pollute the data models while the use case in the library is only Protobuf, not JSON...
I might try something though. (Maybe extension packages).
For example below is the one example of JSON which I need to deserialize to List:
Example:
C# code:
var metric = JsonConvert.DeserializeObject<List<Metric>>(metrics); var metric = System.Text.Json.JsonSerializer.Deserialize<List<Metric>>(metrics);
Now after deserialize, it will give value as null.