Loona Automation logoLoona Developer Tools
Home › कोड जनरेटर

JSON से JSON Schema जनरेटर

संक्षेप में: JSON sample paste करें और इसे describe करने वाला draft JSON Schema पाएँ — inferred types, nested properties, array items और required keys।
🔒 Design से निजी: सब कुछ इस device पर आपके browser में चलता है। आपका input कभी server पर upload नहीं होता।

Example

Input:

{"name": "Ali", "age": 30}

Output:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "age": {
      "type": "integer"
    }
  },
  "required": [
    "name",
    "age"
  ]
}

इस converter के बारे में

एक sample से inferred schema ज्ञात blind spots वाला एक starting point है, और यह generator उनके बारे में ईमानदार है: मौजूद हर key required बन जाती है (दूसरा sample कुछ को optional साबित कर सकता है), numbers sample की shape से integer या number बनते हैं, और एक single value से कोई constraints (minLength, pattern, enum) inferred नहीं हो सकते। आपको जो मिलता है वह structural skeleton है — types, nesting, array item shapes — जो किसी API को document करने या validation setup करने में typing का 90% है, आपके लिए तैयार कि आप required lists को ढीला करें और वे constraints जोड़ें जो सिर्फ़ इंसान जानता है।

अक्सर पूछे जाने वाले सवाल

हर property required क्यों है?

एक sample से inference यह नहीं जान सकता कि कोई key optional है। Merge करने वाले tools को varied samples की array दें, या required list को हाथ से trim करें।

कौन सा draft generated होता है?

JSON Schema 2020-12, वर्तमान release; structure इन basic keywords के लिए draft-07 consumers के साथ भी compatible है।

संबंधित Developer Tools

इस tool को अपनी website पर embed करें — मुफ़्त

इस tool को अपनी website या blog पर जोड़ें — यह पूरी तरह मुफ़्त है, कोई साइन-अप नहीं चाहिए, और हमेशा latest version दिखाता है। नीचे का code copy करें और अपनी page पर वहाँ paste करें जहाँ आप tool को दिखाना चाहते हैं। Embed के नीचे छोटी “Powered by Loona Automation” credit line रखना इस tool को मुफ़्त रखने में मदद करता है — लेकिन आप इसे style या remove करने के लिए स्वतंत्र हैं; tool किसी भी तरह काम करता है।