Skip to content

Add Builder::emit_struct_field_null to output null#142

Open
yangjian wants to merge 1 commit intoinfluxdata:mainfrom
yangjian:main
Open

Add Builder::emit_struct_field_null to output null#142
yangjian wants to merge 1 commit intoinfluxdata:mainfrom
yangjian:main

Conversation

@yangjian
Copy link

@yangjian yangjian commented Jul 4, 2025

Motivation: in some typescript schema libraries, null and undefined are different type. If field type is defined as null, missed field breaks schema validation.

This PR adds flag emit_struct_field_null to control whether to emit null for None value of optional fields.

@crepererum
Copy link
Contributor

this needs a test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants