IRule to validate JSON “schema” (similar to XML va…

I was very disappointed to learn that ASM can only validate the if a JSON is well-formed or not, but cannot validate the actual paylod, like check for mandatory parameters, permitted values, parameter types (Int,String,Array,etc.)

 

F5 support confirmed this is a missing functionality and opened an RFE, but there is no telling when this will be added, if at all.

 

 

I was thinking if this would be possible to achieve with IRules using regex matching of the payload. I know there will be a performance impact for this, but I need to check this route since this is a mandatory requirement.

 

Can someone please suggest a way this can be accomplished with IRules? Of course, if there are other ideas – I’m open to any suggestion.

 

 

Cheers,

 

Avshalom.

 

Read more here: Source link