7 Basic data validation

A solemn gift

This chapter covers

  • The importance of validating data at system boundaries
  • Validating data using the JSON Schema language
  • Integrating data validation into an existing code base
  • Getting detailed information about data validation failures

At first glance, it may seem that embracing DOP means accessing data without validating it and engaging in wishful thinking, where data is always valid. In fact, data validation is not only possible but recommended when we follow data-oriented principles.

This chapter illustrates how to validate data when data is represented with generic data structures. It focuses on data validation occurring at the boundaries of the system, while in part 3, we will deal with validating ...

Get Data-Oriented Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.