JSON validation - how does it work and is it configurable?


#1

Hello there. I would like to know how exactly JSON validation works, particularly - what tool or library is being used and is there any chance to configure it?

Best regards


#3

Hello @desper4do,

On high level we use our homegrown technology, called Iglu (particularly self-describing JSON schemas and self-describing JSONs). It allows us to couple arbitrary JSON instance (like event or context) with its JSON schema. It is extremely flexible and allows you to create very strict (or loose if you want) schemas.

On lower level, in most of our apps/services we use Java JSON Schema Validator (previously known as fge’s). It is written in Java and embedded in most our JVM services like Stream Enrich or Scala Hadoop Enrich via Iglu Scala Client. Validator library Itself doesn’t provide lot of configuring options. I’d say we cannot configure it because we don’t need it - Iglu and JSON schemas provide us everything we need.

I hope provided links can give you enough information about how to configure JSON validation. If you have more questions - please ask.


#4

Thanks @anton, you really helped much :slight_smile: