🏠 Strona Główna
Benchmarki
📊 Wszystkie benchmarki 🦖 Dinozaur v1 🦖 Dinozaur v2 ✅ Aplikacje To-Do List 🎨 Kreatywne wolne strony 🎯 FSACB - Ostateczny pokaz 🌍 Benchmark tłumaczeń
Modele
🏆 Top 10 modeli 🆓 Darmowe modele 📋 Wszystkie modele ⚙️ Kilo Code
Zasoby
💬 Biblioteka promptów 📖 Słownik AI 🔗 Przydatne linki
Advanced

JSON Schema Validation of Empty Strings

#json #validation #schema-design

Design patterns for validating empty strings in JSON schemas.

Construct a complex JSON Schema that validates an object containing a string field which must be non-empty under certain conditions but allows empty strings under others. Discuss the interaction between the 'minLength', 'pattern', and 'enum' keywords when the value is an empty string, and explain how to write a schema that strictly rejects an empty string ('') while accepting whitespace-only strings.