SecSIGSecurity Special Interest Group of US MensaCuriosity. Perspective. Security.

Research Library · Idea

Parser differentials

A parser differential occurs when components reading the same data disagree about whether it is valid or what it represents. The disagreement can cause inconsistent records when independent services process the same message. It also matters when one component validates a message and another acts on it, because the validation decision applies to the first component's interpretation. 1

JSON illustrates the interoperability issue. RFC 8259 recommends unique member names within each object and documents differences in how implementations handle repeated names. Its companion profile, I-JSON, requires unique member names and UTF-8 encoding. That tighter contract gives producers and consumers a common set of acceptance rules. 1 2

For a system that controls its data format, choose a profile that each component can enforce and validate it at the first point of entry. Where practical, pass the validated structure to downstream code so consumers share the same interpretation. During parser upgrades, use compatibility tests to confirm that supported implementations agree on acceptance and on the values produced. 1 2

Source · RFC 8259, The JavaScript Object Notation (JSON) Data Interchange Format (opens in a new tab) · IETF

References

  1. RFC 8259, The JavaScript Object Notation (JSON) Data Interchange Format (opens in a new tab) · IETF ↩ ↩ ↩
  2. RFC 7493, The I-JSON Message Format (opens in a new tab) · IETF ↩ ↩

Research articles

In the news

See what connects to it on the map of ideas →

See also