Skip to content

History / XML and JSON Binding

Revisions

  • XML and JSON Binding: say what the JSON-B visibility strategy is for The page said a default Jsonb "both serializes and deserializes binding types correctly because" of the package @JsonbVisibility. Measured against Yasson 3.0.4 with a type carrying the same accessor shape in a package with no strategy, that overstates it: toJson works unaided because the getters are public, and only fromJson fails, returning an instance with every property null because no setter is visible. The strategy is therefore for deserialization only, and only because the setters are not public. Instantiation is not its doing either - PropertyVisibilityStrategy governs fields and methods, and the provider reaches the protected constructor on its own. Adds the direction of causation, which is the part most easily read backwards: the read-only accessor shape obliges this configuration, not the reverse. Also records that the failure mode is silent - removing the annotation breaks no compilation and no serialization.

    @onacit onacit committed Aug 29, 2026
  • wip

    @onacit onacit committed Aug 17, 2026