JSON मिनिफ़ायर
Example
Input:
{
"name": "Ali",
"age": 30
}Output:
{"name":"Ali","age":30}इस converter के बारे में
Text tool से whitespace delete करके minifying करना जोखिम भरा है — strings के अंदर की spaces डेटा हैं। यह minifier पहले JSON को parse करता है (parser की position के साथ invalid input को reject करते हुए), फिर इसे compactly दोबारा serialise करता है, जो guarantee करता है कि output वही document है जिसमें सिर्फ़ formatting हटी है। Number formatting parsed value का पालन करती है (1e3 1000 बन जाता है, trailing zeros गिर जाते हैं), और key order parsed के रूप में सुरक्षित रहता है। परिणाम वही है जो आप JSON को size-sensitive जगहों में embed करने के लिए चाहते हैं: tokens, config blobs, cache keys और compact API fixtures।
अक्सर पूछे जाने वाले सवाल
क्या minified JSON हमेशा छोटा होता है?
उसी document के लिए, हाँ — whitespace यहाँ शुद्ध overhead है। Pretty-printing इंसानों के लिए है; minifying machines और storage के लिए है।
क्या यह मेरी strings के अंदर spaces हटाएगा?
कभी नहीं — parsing string contents की रक्षा करती है; सिर्फ़ tokens के बीच की structural whitespace हटाई जाती है।