JSON
JSON Schema Validator
JSON डेटा को JSON Schema (draft-07 स्टाइल) के अनुसार जांचना — हर उल्लंघन के सटीक पाथ और स्पष्टीकरण के साथ।
JSON Schema describes the expected structure of a JSON document — which fields are required, what type they are, and what constraints apply to their values. This tool checks actual data against a schema and shows the exact path to every violation.
How to use it
- Paste a JSON Schema into one field and the data to validate into the other.
- The result lists each violation separately: the exact path to the problem field and a plain-language explanation of why it doesn't match the schema.
- Valid data is immediately flagged as fully compliant with the schema.
Common uses
- Checking a third-party API response against its documented schema before integrating with it.
- Debugging your own JSON Schema — figuring out why seemingly valid data gets rejected.
- Validating a configuration file against a schema before deploying.
Things to keep in mind
JSON Schema has several versions (draft-07, 2019-09, 2020-12) with small syntax differences — check which version your production validator actually expects.
required only checks that a field is present, not its value — an empty string or null still counts as "present" if the type allows it.
इस टूल के बारे में लेख: JSON Schema: JSON की संरचना कैसे बताएँ और जाँचें
अक्सर पूछे जाने वाले प्रश्न
JSON Schema के विरुद्ध वैलिडेट करना वास्तव में क्या जांचता है?
यह जांचता है कि आपका JSON डेटा स्कीमा में परिभाषित नियमों से मेल खाता है — आवश्यक फ़ील्ड्स, डेटा टाइप्स, वैल्यू रेंज, स्ट्रिंग पैटर्न्स और अधिक — न कि सिर्फ यह कि JSON खुद सिंटैक्टिकली वैध है।
यह टूल किस JSON Schema ड्राफ्ट का समर्थन करता है?
यह टूल draft-07 के विरुद्ध वैलिडेट करता है, जो सबसे व्यापक रूप से अपनाए गए वर्शन्स में से एक है — अन्य ड्राफ्ट्स के लिए लिखे गए स्कीमा ऐसे कीवर्ड्स इस्तेमाल कर सकते हैं जो यहां पहचाने नहीं जाते।
क्या मेरा स्कीमा या डेटा वैलिडेशन के लिए कहीं भेजा जाता है?
नहीं। वैलिडेशन पूरी तरह आपके ब्राउज़र में JavaScript लाइब्रेरी का उपयोग करके होता है — कुछ भी सर्वर पर नहीं भेजा जाता।
additionalProperties: false क्या करता है?
डिफ़ॉल्ट रूप से किसी ऑब्जेक्ट में properties में बताई गई फ़ील्ड से अलग भी कोई भी फ़ील्ड हो सकती है। additionalProperties: false अतिरिक्त फ़ील्ड को रोकता है — यह कुंजी के नाम में हुई टाइपो या ग़लती से रह गई debug फ़ील्ड पकड़ने के लिए उपयोगी है।
क्या ऐसी फ़ील्ड बनाई जा सकती है जो कई टाइप स्वीकार करे?
हां, type में एक ऐरे देकर, जैसे "type": ["string", "null"], अगर फ़ील्ड स्ट्रिंग या null दोनों हो सकती है। ज़्यादा जटिल मामलों के लिए oneOf, anyOf या allOf कीवर्ड इस्तेमाल किए जाते हैं।