I have a .NETCore Console App and I am serializing/deserializing using the following option
var serializeOptions = new JsonSerializerOptions
{
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
WriteIndented = true
};
Is there any way that I can inject services.AddJsonOptions()
and use Json.Text.Serializer
without passing all the time my serializeOptions? Do I need to create my own SerializerWrapper
for this?