CSV से JSON
CSV डेटा को JSON arrays में बदलें। Header detection, custom delimiters, quoted fields और embedded newlines संभाले जाते हैं।
परिणाम देखने के लिए ऊपर इनपुट डालें।
JXXR1 द्वारा बनाया गया · ♥ स्पॉन्सर करें · ☕ मुझे coffee दिलाएं
यह किसके लिए है?
CSV spreadsheet exports की lingua franca है; JSON APIs और config की lingua franca है। यह converter properly-quoted CSV (RFC 4180-compatible) लेता है और JSON array निकालता है — या तो objects का array (जब header row हो) या arrays का array। उपयोगी जब आपने sheet export किया है और इसे किसी ऐसी चीज़ में feed करना है जो JSON बोलती है।
कब इस्तेमाल करें
- Google Sheets / Excel के एक बार के export को API mock या test fixture के लिए seed data में बदलना।
- Reference tables (देश, currency codes, lookup data) को JSON-consuming frontend में load करना।
- एक CSV को inspect करना जिसमें embedded commas / newlines हों जो हर जगह गलत render होते हैं सिवाय असली RFC 4180 parser के।
आम गलतियाँ
- Delimiter detection जादू नहीं है। यदि आपकी file semicolons (EU locales में आम) या tabs (TSV) उपयोग करती है, तो delimiter dropdown switch करें — auto-detection अनुमान लगाता है लेकिन गलत character वाले data से बेवकूफ बनाया जा सकता है।
- Type coercion opinionated है। Numeric strings,
true,false, और literalnullJSON types में convert होते हैं। जो चीज़ें numeric दिखती हैं लेकिन हैं नहीं (zip codes, leading zeros वाले ISBNs, phone numbers) leading zeros खो देती हैं — coercion disable करें या post-process करें। - खाली cells empty strings बन जाती हैं,
nullनहीं। अधिकांश APIs दोनों को अलग तरह से treat करते हैं। - जंगली में BOMs। Excel अक्सर Windows पर UTF-8 को byte-order mark के साथ save करता है; parser इसे tolerate करता है लेकिन अन्य consumers शायद न करें।