You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Resolve merge conflicts with main: integrate OmitNullFields into With* PR
Main merged the OmitNullFields PR (#1638) after this branch was created.
Resolving conflicts by integrating both sets of changes:
- JsonGenerator.fs: add OmitNullFields param + keep With* method generation
- JsonProvider.fs: accept new OmitNullFields static parameter
- JsonRuntime.fs: add both WithRecordProperty and CreateRecordOmitNulls
- TypeProviderInstantiation.fs: update test struct with OmitNullFields
- JsonProvider tests: include OmitNullFields tests alongside With* tests
Build: 0 errors. Tests: 268/268 passed.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
"""<summary>Typed representation of a JSON document.</summary>
@@ -192,7 +195,8 @@ type public JsonProvider(cfg: TypeProviderConfig) as this =
192
195
</param>
193
196
<param name='Schema'>Location of a JSON Schema file or a string containing a JSON Schema document. When specified, Sample and SampleIsList must not be used.</param>
194
197
<param name='PreferDateOnly'>When true on .NET 6+, date-only strings (e.g. "2023-01-15") are inferred as DateOnly and time-only strings as TimeOnly. Defaults to false for backward compatibility.</param>
195
-
<param name='UseOriginalNames'>When true, JSON property names are used as-is for generated property names instead of being normalized to PascalCase. Defaults to false.</param>"""
198
+
<param name='UseOriginalNames'>When true, JSON property names are used as-is for generated property names instead of being normalized to PascalCase. Defaults to false.</param>
199
+
<param name='OmitNullFields'>When true, optional fields with value None are omitted from the generated JSON rather than serialized as null. Defaults to false.</param>"""
196
200
197
201
do jsonProvTy.AddXmlDoc helpText
198
202
do jsonProvTy.DefineStaticParameters(parameters, buildTypes)
0 commit comments