Support round-trip CRD (de)serialization (#1034)
* Support round-trip CRD (de)serialization * Add a floating point emitter to fix UT * Unused using * Stylecop * Reduce warnings
This commit is contained in:
@@ -21,6 +21,7 @@ namespace k8s
|
||||
.WithTypeConverter(new IntOrStringYamlConverter())
|
||||
.WithTypeConverter(new ByteArrayStringYamlConverter())
|
||||
.WithTypeConverter(new ResourceQuantityYamlConverter())
|
||||
.WithAttemptingUnquotedStringTypeDeserialization()
|
||||
.WithOverridesFromJsonPropertyAttributes()
|
||||
.IgnoreUnmatchedProperties()
|
||||
.Build();
|
||||
@@ -33,6 +34,7 @@ namespace k8s
|
||||
.WithTypeConverter(new ByteArrayStringYamlConverter())
|
||||
.WithTypeConverter(new ResourceQuantityYamlConverter())
|
||||
.WithEventEmitter(e => new StringQuotingEmitter(e))
|
||||
.WithEventEmitter(e => new FloatEmitter(e))
|
||||
.ConfigureDefaultValuesHandling(DefaultValuesHandling.OmitNull)
|
||||
.WithOverridesFromJsonPropertyAttributes()
|
||||
.BuildValueSerializer();
|
||||
|
||||
Reference in New Issue
Block a user