Parse boundary¶
The JSON boundary is strict by design. External text is not trusted until it
has been decoded into a full Configuration, and failures do not partially
mutate the live namespace.
What is guaranteed¶
Namespace.fromJson(json) has two outcomes.
ParseResult.Successwith a fully decoded configuration that is then loaded into the namespaceParseResult.Failurewith a typedParseError
There is no success path that applies only some of the payload.
Failure classes¶
The current parse boundary can surface failure types such as:
ParseError.InvalidJsonParseError.FeatureNotFoundParseError.InvalidSnapshotParseError.UnknownFieldParseError.MissingRequiredParseError.InvalidValue
These errors make the failure mode explicit without requiring callers to decode ad hoc exception text.
Evidence in the repo¶
The JSON tests prove that malformed JSON, unknown feature keys, and invalid custom values are rejected while the previous namespace state remains intact.
NamespaceJsonTestConfigurationCodecTestParseResultTest
Next steps¶
If you want the exact APIs and JSON fields involved, the reference section collects them in one place.