medium
JSON Schema Validator
A function to validate JSON data against a schema
📝 Contenu du Prompt
Write a function that validates JSON data against a provided schema. The function should take two parameters: the JSON data to validate and a schema object that defines the expected structure and types. Return true if the data matches the schema, or an object with details about validation failures if it doesn't.