JSON فارمیٹر

اپنا JSON ڈیٹا فارمیٹ کریں، اس کی جانچ کریں اور اسے منیفائی کریں

JSON ویوور
پہلے سے بند ہے۔ نہ کچھ محفوظ ہوتا ہے، نہ کہیں بھیجا جاتا ہے۔

یہ پوری طرح آپ کے براؤزر میں چلتا ہے۔ آپ جو کچھ ٹائپ یا اپ لوڈ کرتے ہیں وہ نہ ہمیں بھیجا جاتا ہے اور نہ کہیں محفوظ ہوتا ہے۔

یہ نتائج عام رہنمائی کے لیے ہیں۔ کسی اہم بات پر بھروسا کرنے سے پہلے براہ کرم اسے جانچ لیں۔ استعمال کی شرائط

نیچے دی گئی گائیڈ ترجمہ تیار ہونے تک انگریزی میں ہے۔

استعمال کا طریقہ

  1. اپنا خام JSON ان پٹ والے خانے میں پیسٹ کریں، یا .json فائل لوڈ کرنے کے لیے فائل کھولیں پر کلک کریں۔ نمونہ ایک مثال لوڈ کر دیتا ہے۔
  2. ٹائپ کرتے ہی اس کی جانچ ہوتی ہے۔ کچھ غلط ہو تو آپ کو سطر اور کالم نظر آئے گا، غلطی والی سطر بھی جس میں مسئلے کے نیچے ^ کا نشان ہوگا، اور سادہ الفاظ میں وضاحت، جیسے کوئی کاما چھوٹ گیا ہے یا فالتو ہے۔
  3. اسے صاف ستھرے انڈینٹ کے ساتھ ترتیب دینے کے لیے فارمیٹ کریں پر کلک کریں (یا Ctrl+Enter دبائیں)۔ 2 اسپیس، 4 اسپیس یا ٹیب منتخب کریں، اور کلیدوں کو A سے Z ترتیب دینے کے لیے کلیدیں ترتیب دیں آن کریں۔ منیفائی کریں (Ctrl+Shift+Enter) اسے ایک سطر میں سمیٹ دیتا ہے۔
  4. JSON ویوور میں ڈیٹا دیکھیں۔ سب کھولیں اور سب سمیٹیں سے ہر سطح ایک ساتھ کھلتی یا بند ہوتی ہے۔
  5. کاپی کریں پر کلک کریں، یا .json فائل محفوظ کرنے کے لیے ڈاؤن لوڈ کریں پر۔ "اگلی بار کے لیے میرا JSON اس ڈیوائس پر یاد رکھیں" صرف تب آن کریں جب آپ چاہتے ہوں کہ یہ اگلی بار کے لیے اسی براؤزر میں محفوظ رہے۔

What is JSON?

JSON (JavaScript Object Notation) is the standard format for sending data between web APIs, and it's everywhere in config files and databases too. People can read it, and every modern programming language supports it out of the box. Nearly every REST API, from payment gateways to social media, sends and receives JSON. This JSON formatter makes it readable, checks it for errors and shows it as a tree you can expand and collapse.

Where it comes in handy

  • API debugging: copy a response from Postman or your browser's DevTools and format it so you can actually read it.
  • Config files: tidy up package.json, appsettings.json or tsconfig.json.
  • Data pipelines: validate JSON before it goes into a database or message queue.
  • Log analysis: many logging systems write minified JSON. Format it to find the problem faster.

JSON syntax rules

  • Keys must be strings in double quotes: "name", not name.
  • A value can be a string, number, boolean, null, array or object.
  • Trailing commas aren't allowed, unlike in JavaScript objects.
  • Comments aren't allowed either. If you need them in config files, use a JSON5 parser.

So {'name': 'Asha',} fails twice, once for the single quotes and once for the trailing comma. The valid version is {"name": "Asha"}.

اکثر پوچھے جانے والے سوالات

The usual ones: missing commas between elements, unclosed brackets or braces, trailing commas (not allowed in JSON), unquoted keys, single-quoted strings, and control characters inside strings. It also tells you if the input is empty or isn't JSON at all.

No. Formatting and validation happen in your browser, using JavaScript's built-in JSON.parse() and JSON.stringify(). Your data never leaves your device, so it's safe to paste sensitive API responses.

JSON5 is a looser superset of JSON. It allows comments (//, /* */), trailing commas, single-quoted strings and unquoted keys. Some config files use it, such as VS Code's settings.json. Standard JSON parsers reject JSON5, so use a dedicated JSON5 parser for those files.