ಪಠ್ಯ ಟೂಲ್ಗಳು
ಆರಂಭಿಕರಿಗಾಗಿ JSON: ನಿಯಮಗಳು ಮತ್ತು 6 ಅತ್ಯಂತ ಸಾಮಾನ್ಯ ತಪ್ಪುಗಳು
By Prasad · Quick Work Studio · ಪ್ರಕಟಿತ: 1 ಅಕ್ಟೋಬರ್ 2026 · ಅಪ್ಡೇಟ್ ಮಾಡಿದ: 29 ಅಕ್ಟೋಬರ್ 2026 · ನಾವು ಸತ್ಯಾಸತ್ಯತೆಯನ್ನು ಹೇಗೆ ಪರಿಶೀಲಿಸುತ್ತೇವೆ
JSON (JavaScript Object Notation) is the most common format for sending data between apps and websites. It's easy to read, but it's also strict, and a single misplaced character makes the whole thing invalid.
What JSON looks like
JSON is built from two structures: objects, which are sets of "key": value pairs inside curly braces { }, and arrays, which are ordered lists inside square brackets [ ]. For example, a person might be written as {"name": "Asha", "age": 29, "skills": ["excel", "sql"], "active": true}.
The six value types
A JSON value can only be one of: a string in double quotes, a number, true ಅಥವಾ false, null, an object or an array. There are no dates, functions or "undefined": dates are usually stored as strings like "2026-10-01".
The 6 most common errors
- Trailing commas. {"a": 1, "b": 2,} is invalid. The last item in an object or array must not be followed by a comma.
- Single quotes. {'name': 'Asha'} is invalid. Keys and strings must use double quotes.
- Unquoted keys. {name: "Asha"} works in JavaScript but not in JSON. Every key needs double quotes.
- Comments. JSON has no comment syntax, so // notes and /* blocks */ make it invalid.
- Unescaped characters in strings. A double quote inside a string must be written as \", a backslash as \\, and a line break as \n.
- Invalid numbers. Leading zeros (007), NaN and Infinity aren't allowed, and decimals need a digit before the point (0.5, not .5).
Pretty-printed vs minified
The same JSON can be written with indentation and line breaks to make it readable ("pretty-printed"), or with all whitespace removed to make it smaller ("minified"). Both contain exactly the same data, whitespace outside strings doesn't matter.
How to find an error quickly
Validators report the line and position where parsing failed. The real mistake is often just before that point, a missing comma on the previous line, or an unclosed quote or bracket earlier on.
Fixing a broken example step by step
Here is a piece of JSON with four mistakes:
{name: 'Asha', "age": 029, "skills": ["excel", "sql",], // employee }
- The key
nameneeds double quotes:"name". - The value
'Asha'uses single quotes: change it to"Asha". - The number
029has a leading zero: write29. - The array ends with a trailing comma, and there's a comment. Remove both.
The valid version: {"name": "Asha", "age": 29, "skills": ["excel", "sql"]}. A validator would have stopped at the first error, so fix one problem, validate again, and repeat.
JSON vs a JavaScript object
JSON looks like JavaScript, and that's where many errors come from. JavaScript allows unquoted keys, single quotes, trailing commas, comments and values like undefined. JSON allows none of these. If you copy an object from JavaScript code into a JSON file or an API request, run it through a validator first.
Where you'll meet JSON
- APIs: most web services send and receive data as JSON.
- Settings files: apps and code editors store settings in files like
package.jsonಅಥವಾsettings.json. - Data exports: many apps let you download your data as JSON.
In all of these, one stray character stops the whole file from loading, which is why checking it before you save is worth the few seconds.
Try it: paste your data into the JSON ಫಾರ್ಮ್ಯಾಟರ್ & ವ್ಯಾಲಿಡೇಟರ್ to check it, pretty-print it or minify it. For sending JSON in a web address, the URL Encoder / Decoder can encode it safely.
About the author
Prasad writes Quick Work Studio's guides on everyday money, tax, documents and study tasks for readers in India. Every guide follows our ಸಂಪಾದಕೀಯ ನೀತಿ: rules and rates are checked against official sources, and every sum is worked out with our own calculators.
ಹೊಸ ಟೂಲ್ಗಳು, ಹೊಸ ಗೈಡ್ಗಳು ಮತ್ತು ಹಣದ ಸಲಹೆಗಳು ಇಮೇಲ್ನಲ್ಲಿ. ಸ್ಪ್ಯಾಮ್ ಇಲ್ಲ, ಯಾವಾಗ ಬೇಕಾದರೂ ಬಿಡಬಹುದು.
ಉಚಿತ. ನಿಮ್ಮ ಇಮೇಲ್ ಅನ್ನು ನಾವು ಯಾರೊಂದಿಗೂ ಹಂಚಿಕೊಳ್ಳುವುದಿಲ್ಲ.