Skip to content

fix(funds): decode "NULL" entityOrgType as absent - #399

Merged
benbenbang merged 1 commit into
mainfrom
fix/380-entity-org-type
Sep 30, 2026
Merged

benbenbang merged 1 commit into
mainfrom
fix/380-entity-org-type

Conversation

@benbenbang

Copy link
Copy Markdown
Member

The provider sends the text "NULL" on entityOrgType for the same live
rows that send a null address, so the required NumericString failed to
decode. Add a codecs::null_text deserializer that maps the exact text
"NULL" and JSON null to None and parses any other string as a
NumericString, so "", "null", or a padded " NULL" remain decode
errors that never echo the value.

FundDisclosureSearchResult.entity_org_type becomes optional across the
stack: Option<NumericString> in libfmp, *string in the Go SDK (with a
jsontext.Value shadow and a matching Codec::NullTextString in gen_go),
and Optional[str] in the Python bindings. Document the codec in ADR 0033
and cover the new behaviour in the Rust, Go, and Python tests.

BREAKING CHANGE: FundDisclosureSearchResult.entity_org_type is now optional
(Option / *string / Optional[str]); the provider's "NULL"
text and null decode as None, so handle None.

close #380

The provider sends the text `"NULL"` on `entityOrgType` for the same live
rows that send a null `address`, so the required `NumericString` failed to
decode. Add a `codecs::null_text` deserializer that maps the exact text
`"NULL"` and JSON null to `None` and parses any other string as a
`NumericString`, so `""`, `"null"`, or a padded `" NULL"` remain decode
errors that never echo the value.

`FundDisclosureSearchResult.entity_org_type` becomes optional across the
stack: `Option<NumericString>` in libfmp, `*string` in the Go SDK (with a
`jsontext.Value` shadow and a matching `Codec::NullTextString` in gen_go),
and `Optional[str]` in the Python bindings. Document the codec in ADR 0033
and cover the new behaviour in the Rust, Go, and Python tests.

BREAKING CHANGE: FundDisclosureSearchResult.entity_org_type is now optional
(Option<NumericString> / *string / Optional[str]); the provider's "NULL"
text and null decode as None, so handle None.

close #380
@benbenbang
benbenbang enabled auto-merge (rebase) September 30, 2026 15:35
@github-actions github-actions Bot added documentation Improvements or additions to documentation enhancement New feature or request labels Sep 30, 2026
@benbenbang
benbenbang merged commit 2e07672 into main Sep 30, 2026
9 checks passed
@benbenbang
benbenbang deleted the fix/380-entity-org-type branch September 30, 2026 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix!: FundDisclosureSearchResult.entityOrgType receives the string NULL

1 participant