Repository navigation
fix(funds): decode "NULL" entityOrgType as absent - #399
Merged
Merged
Conversation
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
enabled auto-merge (rebase)
September 30, 2026 15:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The provider sends the text
"NULL"onentityOrgTypefor the same liverows that send a null
address, so the requiredNumericStringfailed todecode. Add a
codecs::null_textdeserializer that maps the exact text"NULL"and JSON null toNoneand parses any other string as aNumericString, so"","null", or a padded" NULL"remain decodeerrors that never echo the value.
FundDisclosureSearchResult.entity_org_typebecomes optional across thestack:
Option<NumericString>in libfmp,*stringin the Go SDK (with ajsontext.Valueshadow and a matchingCodec::NullTextStringin gen_go),and
Optional[str]in the Python bindings. Document the codec in ADR 0033and 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