JSON से Code
JSON samples से typed Go, Python, Java, Rust, C#, Kotlin और Swift models बनाएँ।
इस्तेमाल कैसे करें
Representative JSON object या array पेस्ट करें, root type name डालें और target language चुनें। Objects की arrays merge होती हैं, इसलिए कुछ elements से गायब fields optional बनते हैं; integer और decimal samples एक numeric type share करते हैं।
Go tags और nullable pointers, Python model style, Java records या getters और C# JSON attributes के लिए target-specific controls इस्तेमाल करें। Nested shapes named types बनती हैं और identical shapes deduplicate होती हैं। Array में incompatible values हों तो commented fallback types जाँचें।
आम सवाल
Optional और nullable fields कैसे पहचाने जाते हैं?
किसी sampled array element में गायब field optional होती है। स्पष्ट रूप से null रखने वाली field nullable होती है; हर target इन states को अपने idiomatic optional type में map करता है।
Array में mixed types हों तो क्या होता है?
Incompatible elements target-specific fallback जैसे interface{}, Any, JsonElement, serde_json::Value या JSONValue इस्तेमाल करते हैं और generated field के पास comment जुड़ता है।
क्या पेस्ट किया JSON upload या save होता है?
नहीं। Inference पूरी तरह ब्राउज़र में चलता है और JSON input केवल memory में रहता है। टूल sample data नहीं, सिर्फ output options persist करता है।