लिंक्डइन कौशल मूल्यांकन उत्तर और प्रश्न - JSON
- schema
- $schema
- JsonSchema
- JSONschema
Which code is the closest JSON equivalent of the data shown?
Q2.[
'red',
'blue',
'green'
]
- ए
["red", "green", "blue"]
- बी
["red", "blue", "green"]
- सी
{
"color": "red",
"color": "blue",
"color": "green"
}
- डी
{
"red": "red",
"blue": "blue"
}
Which JavaScript method converts a JavaScript value to Json?
Q3.- JSON.parse()
- JSON.stringify()
- JSON.toString()
- JSON.objectify()
Which data type is NOT part of JSON standard?
Q4.- string
- संख्या
- date
- array
Which term is commonly used to refer to converting data to JSON?
Q5.- unpacking
- serialization
- deserialization
- parsing
Which code uses the correct JSON syntax to encode the key/value pair shown?
Q6.accountNum: '000605802'
- “accountNum”: “000605802”
- accountNum: “000605802”
- “accountNum”: 000605802
- accountNum: 000605802
What character do you specify before a JSON control character when you want to use that control characters as a literal part of a string?
क्यू 7.-
/
-
\
-
:
-
{
Which data type is part of the JSON standard?
क्यू 8.- Boolean
- नक्शा
- promise
- समारोह
Which key name is used to specify properties that must be included for JSON to be valid?
प्रश्न 9.- महत्वपूर्ण
- ln को = 1/x के रूप में लिखा जा सकता है जबकि लॉग को या तो = x या = xlog के रूप में लिखा जा सकता है
- मुख्य
- आवश्यक
Which is the valid JSON equivalent of the data shown?
प्र10.{
photo: {
width: 1600,
height: 900,
binaries: {
url: 'https://www.example.com/images/34097349843',
thumbnail: 'https://www.example.com/images/thumbs/34097349843'
},
animated: false,
tags: [116, 943, 234, 38793],
}
}
- ए
{
"photo": {
"width": 1600,
"height": 900,
"binaries": {
"url": "https://www.example.com/images/34097349843",
"thumbnail": "https://www.example.com/images/thumbs/34097349843"
},
"animated": "false",
"tags": [116, 943, 234, 38793]
}
}
- बी
{
"photo": {
"width": 1600,
"height": 900,
"binaries": {
"url": "https://www.example.com/images/34097349843",
"thumbnail": "https://www.example.com/images/thumbs/34097349843"
},
"animated": false,
"tags": [116, 943, 234, 38793]
}
}
- सी
{
"photo": {
"width": 1600,
"height": 900,
"binaries": {
"url": "https://www.example.com/images/34097349843",
"thumbnail": "https://www.example.com/images/thumbs/34097349843"
},
"animated": true,
"tags": [116, 943, 234, 38793]
}
}
- डी
{
"photo": {
"width": "1600",
"height": "900",
"binaries": {
"url": "https://www.example.com/images/34097349843",
"thumbnail": "https://www.example.com/images/thumbs/34097349843"
},
"animated": "false",
"tags": ["116", "943", "234", "38793"]
}
}
How do you store several paragraphs of text as a string in JSON?
प्रश्न 11.- Escape all whitespaces except space characters.
- Escape line breaks.
- Escape paragraphs.
- Remove all whitespaces
What data type is represented by the value of the key/value pair shown?
प्र12.loggedIn: true
- string
- Boolean
- संख्या
- वस्तु
If you need to store the loggedIn status of a user in JSON as a boolean, what is the correct syntax?
प्रश्न 13.- “loggedIn”: (सच)
- loggedIn: “सच”
- “loggedIn”: सच
- loggedIn: {सच}
What does JSON with padding (JSON-P) use to make a request?
प्र14.- एक
<origin>
तत्व - a header request
- NS
<script>
तत्व - the XMLHttpRequest object
Which value is supported in the JSON specifications?
प्रश्न 15.- undefined
- infinity
- NaN
- null
Which JavaScript method converts JSON to a JavaScript value?
प्र16.- JSON.parse()
- JSON.stringify()
- JSON.toString()
- JSON.objectify()
Transferring JSON information from client to server and back again often includes HTTP requests. Match each method with the best choice describing its use.
प्रश्न 17.1.Sends data to specific server to create or update information.
2.Sends data to specific server to create or update information without the risk of creating the resource more than once.
3.Previews what the GET request response might be without the body of the text.
4.Learns the communication channels used by the target source.
5.Requests information from a specific source.
6.Removes information.
- 1.POST 2.DELETE 3.OPTIONS 4.HEADER 5.GET 6.PUT
- 1.POST 2.PUT 3.HEADER 4.OPTIONS 5.GET 6.DELETE
Which code uses valid JSON syntax for the text “Centennial Olympics?
प्रश्न 18.- ए
{
"host": "Atlanta",
"year": 1996
/_ Centennial Olympics _/
}
- बी
{
"host": "Atlanta",
"year": 1996
// Centennial Olympics
}
- सी
{
"host": "Atlanta",
"year": 1996,
"comment": "Centennial Olympics"
}
- डी
{
"host": "Atlanta",
"year": 1996,
\"Centennial Olympics\"
}
- इ
{
"host": "Atlanta",
"year": 1996,
"comment": "\"Centennial Olympics"
}
Can trailing commas be used in objects and arrays?
क्यू19.- हां
- only if there is more than one item
- नहीं
- only when arrays and objects contain more than 10 items
Which whitespace characters should be escaped within a string?
प्र20.- All whitespace is allowed.
- double quotes, slashes new lines, and carriage returns
- new lines and carriage returns only
- double quotes only
Which is supported by YAML but not supported by JSON?
प्र21.- nested
- टिप्पणियाँ
- arrays
- null values
Which is an invalid JSON value?
प्र22.-
"'|=(_)(X 72(_)|\/||\*'"
-
"|=(_)(X 72(_)|\/||\*"
-
"|=(_)(X\" \"72(_)|\/||\*"
-
"\s(_)(X 72(_)|\/||\*"
How do you encode a date in JSON?
प्र23.- Convert the date to UTC and enclose in quotes.
- Encode the date as string using the ISO-8601 date format.
- Wrap the date in double quotes.
- Add a “date” key to your object and include the date as string.
What’s wrong with this JavaScript?
प्र24.JSON.parse({"first": "Sarah", "last": "Connor"}) ;
- JSON should be wrapped with curly braces.
- JSON.parse() is missing an argument.
- The value supplied to JSON.parse() is not a string.
- Nothing is wrong with it.
What does this JavaScript code print?
प्रश्न25.printNullness(JSON.parse('{ "lemmings": [] }'));
printNullness(JSON.parse('{ "lemmings": null }'));
printNullness(JSON.parse('{ "lemmings": "null" }'));
function printNullness(testMe) {
if (testMe.lemmings == null) console.log('null');
else console.log('not null');
}
- ए
not null
null
not null
- बी
null
null
not null
- सी
not null
null
null
- डी
null
null
null
What tool might you use to validate your JSON?
प्र26.- JSONLint
- ValidateJSON
- JSONFiddle
- TextEdit
What characters denote strings in JSON?
प्र27.- double quotes
- बुद्धिमान (घुँघराले) quotes
- single or double quotes
- single quotes
Which code is a valid JSON equivalent of the key/value pair shown that also preserves the data type? constant: 6.022E23
प्रश्न 28. -
"constant": "6.022E23"
-
"constant": "6\.022\E23"
-
"constant": 6.022E23
-
constant: "6.022E23"
संदर्भ Explanation: Scientific Notation is a valid JSON number. You can use e
या E
.
Which element is added to the DOM to create a JSON-P request?
प्र29.-
<object>
-
<script>
-
<json>
-
<meta>
Why do so many APIs use JSON?
क्यू30.- Because it’s object-based.
- Because it’s a simple and adaptable format for sharing data.
- Because it’s based on JavaScript.
- Because it is derived from SGML.
You need to assemble a list of members, but your JSON is not parsing correctly. How do you change it?
प्रश्न31.{
"avengers": [
"iron man",
"hulk",
"thor",
"black widow",
"ant man",
"spider man'
]
}
- ए
{
"avengers": ["iron man", "hulk", "thor", "black widow", "ant man", "spider man"]
}
- बी
{
'avengers': [
{'iron man',
'hulk',
'thor',
'black widow',
'ant man',
'spider man'}
]
}
- सी
{
"avengers": ["iron man", "hulk", "thor", "black widow", "ant man", "spider man"]
}
- डी
{
"avengers": {[
"iron man",
"hulk",
"thor",
"black widow",
"ant man",
"spider man"
]}
}
When building dynamic web applications using AJAX, developers originally used the _ data format, which has since been replaced by JSON.
प्र32.- एक्सएमएल
- GRAPHQL
- REST
- SOAP
How is a true boolean value represented in JSON?
प्रश्न 33.- सत्य
- “सच”
- 1
- सच
Which array is valid JSON?
प्रश्न34.- [‘tatooine’, ‘hoth’, ‘dagobah’]
- [tatooine, hoth, dagobah]
- [“tatooine”, “hoth”, “dagobah”,]
- [“tatooine”, “hoth”, “dagobah”]
What data type is encoded in the outermost component of the JSON shown?
क्यू35.[
{
"year": 2024
},
{
"location": "unknown"
}
]
- वस्तु
- array
- संख्या
- string
Which is ignored by JSON but treated as significant by YAML?
प्र36.- trailing commas
- trailing decimals
- whitespace
- leading zeroes
When you need to set the value of a key in JSON to be blank, what is the correct syntax for the empty value?
प्रश्न37.- असत्य
- 0
- “”
- null
How do you assign a number value in JSON?
प्रश्न 38.- Escape the number with a backslash.
- Enclose the number in double quotes.
- Enclose the number in single quotes.
- Leave the number as is.
Which code uses the correct JSON syntax for encoding a key/value pair with a null value?
प्र39.- “lastVisit”: null
- lastVisit: null
- “lastVisit”: 0
- “lastVisit”: undefined
Which reference to the Unicode character U+1F602 complies with the JSON standard?
क्यू40.- 128514
- d83dde02
- \uD83D\uDE02
- 😂
Which code uses the correct JSON syntax for a key/Value pair containing a string?
प्र41.- “largest”: “blue whale”
- largest: ‘blue whale’
- ‘largest’: ‘blue whale’
- largest: “blue whale”
Which key name is used to specify data type in a JSON schema?
प्र42.- जानकारी
- schemadata
- schematype
- प्रकार
Which code is a valid JSON equivalent of the key/value pair shown that also preserves the original value?
प्रश्न 43.- “UPC”: \043875
- UPC: “043875”
- “UPC”: 043875
- UPC: ‘043875’
Which data format is a JSON schema written in?
प्रश्न 44.- markdown
- YAML
- एक्सएमएल
- JSON
Which code is valid JSON equivalent of the key/value pair shown that also preserves the data type?
क्यू45.- “variance”: -0.0823
- variance: “-0.0823”
- “variance”: “-0.0823”
- variance: -0.0823
With what character should key/value pairs be separated?
प्र46.- colon
- स्थान
- semicolon
- comma
What character separates keys from values?
प्रश्न 47.- :
- ->
- ::
- .
If a string contains line breaks, तुम्हे क्या करना चाहिए?
प्रश्न 48.- Wrap line breaks in single quotation marks
- Make no changes, because whitespace is allowed
- Replace any line breaks with
\r
- Replace any line breaks with
\n
Which number types are available in javascript but not supported in json?
प्र49.- Fractional and Transcendental
- Infinity or Rational
- Rational and Irrational
- Infinity or NaN
How should a date value be stored in JSON?
क्यू50.- As a string with quotes
- As a string without quotes
- As a string in ISO 8583 प्रारूप
- As a string in ISO 8601 प्रारूप
Is the JSON code shown here valid?
प्रश्न51.- नहीं, emojis must be escaped with a backslash.
- नहीं, JSON strings are not allowed to use emojis.
- नहीं, emojis should never be enclosed with double quotes.
- हां, emojis are valid characters because JSON strings are unicode.
What data structure do you use to encode ordered information?
प्रश्न52.- सूची
- array
- struct
- indexed hash
What are valid values in JSON?
प्रश्न53.- arrays, तार, नंबर, true/false
- hashes, arrays, तार, नंबर, बूलियन्स, null
- arrays, objects, lists, तार, नंबर, बूलियन्स
- objects, arrays, तार, नंबर, बूलियन्स, null
Which key format is valid JSON?
प्रश्न54.- चाबी: “मूल्य”
- “चाबी”: “मूल्य”
- चाबी, “मूल्य”
- ‘key’: ‘value’
What data type is encoded in the outermost component of the JSON shown?
प्रश्न55.{
"result": [
{
"year": 2024
},
{
"location": "unknown"
}
]
}
- संख्या
- array
- string
- वस्तु
What’s wrong with this JSON object?
प्रश्न56.{
"series": "Star Trek",
"episodes": "The Trouble with Tribbles",
"season": 3
}
- Key/value pairs should be separated by semicolons.
- Keys should be enclosed with double quotes.
- Key/value pairs should always have a trailing comma.
- Keys and values should be enclosed with single quotes.
How should comments be formatted in JSON?
प्रश्न57.- Wrap the comments in single quotes and place it at the bottom of the file.
- Wrap the comments in double parentheses.
- Escape comments by placing two slashes at the start of the comment.
- JSON does not support comments.
How would you make the following string valid in JSON?
प्र 58."name": 'bb-8'
- नाम: “bb-8”
- “नाम”: ‘bb-8’
- “नाम”: “bb-8”
- “नाम”: bb-8
How are values separated in JSON?
प्रश्न59.- with brackets
- with colons
- with commas
- with parentheses
With which programming language is JSON best used?
क्यू 60.- any language, as JSON is language agnostic.
- माणिक
- जावास्क्रिप्ट
- अजगर
What values can arrays contain?
प्रश्न 61.- only numbers
- any valid JSON value
- only strings and numbers
- only strings
What technique can be used to represent complex objects with JSON?
प्रश्न 62.- reserialization
- nesting
- memorization
- minimization
What characters are used to enclose an array?
प्रश्न 63.-
[]
-
{}
-
""
-
()
What is the official MIME type for JSON?
प्रश्न 64.- text/json
- text/javascript
- application/json
- data/json
Which character cannot be part of string within JSON without additional formatting?
प्रश्न 65.- /
- “
- –
- :
What is the purpose of JSON?
प्रश्न 66.- to provide a simple way to serialize and deserialize data between different sources
- to provide a way to store data for machine learning
- to provide an archival solution for data warehousing
- to provide a way for JavaScript to run other languages
Can you assume the order of keys in an object?
प्रश्न 67.- नहीं, but you can sort the keys with
JSON.sort()
. - हां, object keys are always ordered alphabetically.
- हां, but only when the object is first parsed.
- नहीं, you can never assume object keys will be in order.
With what character should object keys be enclosed?
प्रश्न 68.-
*
-
#
-
^
-
"
What is the maximum number of key/value pairs that JSON supports?
प्रश्न 69.- 10,000
- 1000
- There is no defined limit.
- 1 दस लाख
What is the recommended term used to refer to multiple resources?
क्यू 70.- a swarm
- multiple resources
- संग्रह
- a group
Does JSON support signed numbers?
प्र71.- हां, but only if they are enclosed in quotes
- only with integers
- हां
- नहीं
What two nonnumerical characters can numbers contain?
प्र72.- dash and dot
- dash and comma
- comma and exclamation point
- dot and comma
What JavaScript method is used to load JSON data?
प्रश्न 73.- JSON.ingest()
- JSON.convert()
- JSON.read()
- JSON.parse()
How are the values in an array separated?
प्रश्न 74.- with right arrows
- with colons
- with semicolons
- with commas
What is the minimum number of values in an array?
प्रश्न 75.- zero
- एक
- दो
- तीन
In JSON, a set of brackets ([]) is used to denote _, whereas curly braces ({}) denote _.
प्रश्न 76.- arrays; objects
- objects; कार्यों
- arrays; कार्यों
- key/value pairs; arrays
How does JSON represent truth, falsity and nullness?
प्र77.- सच, असत्य, null
- सच, असत्य
- सत्य, असत्य, NULL
If an object key contains spaces, how can you access its value in JavaScript?
प्रश्न 78.- Remove spaces from the key before accessing the value.
- Use dot notation to access the value.
- Use object key index to access the value.
- Use bracket notation to access the value.
When parsing JSON, “caching” is a method used to _.
प्र79.- remove duplicate data from a server
- temporarily store data for faster access
- store excess information in chunks to be reviewed later
- clog up a web browser with useless information
What is the only valid whitespace character within a string that does not require an escape character?
क्यू 80.- line break
- स्थान
- टैब
- वापस करना
What technique can you use to safely encode very large numbers?
क्यू81.- Store the number as a string
- Convert the number into an exponent.
- Round the number to the nearest 10-digit number.
- Split the number into smaller parts.
Which code is a valid JSON equivalent of the key/value pair shown that also preserves the data type?
प्रश्न 82.variance: -0.0823
- variance: “-0.0823”
- variance: -0.0823
- “variance”: “-0.0823”
- “variance”: “-0.0823”
Based on the JSON object shown, which JavaScript code would you use to find out what is in this vehicle’s glove box while assigning the glove box contents to a new variable?
क्यू 83.myVehicleContents = {
van: {
inside: {
'glove box': 'maps',
'passenger seat': 'crumbs',
},
exterior: {
trunk: 'jack',
},
},
};
- ए
myVehicleContents.van.inside['glove box'] = gloveBoxContents;
- बी
var gloveBoxContents = myVehicleContents.van.inside['glove box'];
gloveBoxContents;
- सी
var gloveBoxContents = myVehicleContents.van.glove box.contents;
gloveBoxContents;
- डी
myVehicleContents.van.inside['inside'] = gloveBoxContents;
What characters are used to define an object?
प्रश्न 84.- ||
- {}
- ()
- []
The JSON structure features nested objects and arrays. Sometimes the data containing these features exists in relational databases. How is the relational structure different that JSON?
क्यू85.- It has a flat architecture.
- It has a rewritable structure.
- It has an array-only structure.
- It has a table structure.
What is supported by YAML but not supported by JSON?
क्यू 86.- arrays
- null values
- टिप्पणियाँ
- nested
YAML supports # comments but not JSON
Which is an invalid JSON value? (same as previous question, but different possible answers)
क्यू87.-
"'|=(_)(X 72(_)|\/||*'"
-
"\s(_)(X 72(_)|\/||*"
-
"|=(_)(X\" \"72(_)|\/||*"
-
"|=(_)(X 72(_)|\/||*"
How can you change this array to make it valid?
क्यू88.{"rey",'leia',"ashoka",}
-
['rey', 'leia', "ashoka",}
-
['rey', 'leia', 'ashoka',}
-
["rey", "leia", "ashoka"]
-
{"rey", "leia", "ashoka"}
If a non-zero number starts with a zero, what character should immediately follow the zero?
क्यू 89.- zero or more digits
- one or more digits
- a period
- a dollar sign
Who would you modify the array below to store additional attributes for each student?
Q90.{
"students": ["Tess", "Erin", "June"]
}
- Convert each student to an object, then add key/value paris to each student object as needed.
- Add additional name/value pairs, separated by commas, बाद “छात्रों”.
- Convert each student into an array and add extra elements to the array.
- Wrap the existing “छात्रों” key with curly braces.
Which is नहीं a valid JSON number
प्रश्न91.-
99999999999999999999
-
"42"
-
-32
-
1111.00.110011
What is the maximum string length in JSON?
प्रश्न92.- 512 पात्र
- There is no defined limit.
- 2,056 पात्र
- 1,024 पात्र
What method is used to export a JavaScript object into JSON notation?
प्रश्न93.-
JSON.convert()
-
JSON.stringify()
-
JSON.export()
-
JSON.string()
How would you update this JSON to indicate that Jane is now available for part-time work ?
प्रश्न94.{
"name": "Jane",
"job": "developer",
"skills": ["ruby", "rails", "javascript"],
"available": false
}
- ए
{
"name": "Jane",
"job": "developer",
"skills": ["ruby", "rails", "javascript"],
"available": true,
"seeking": "part-time"
}
- बी
{
"name": "Jane",
"job": "developer",
"skills": ["ruby", "rails", "javascript"],
"available": "true",
"seeking": "part-time"
}
- सी
{
"name": "Jane",
"job": "developer",
"skills": ["ruby", "rails", "javascript"],
"available": false,
"seeking": "part-time"
}
- डी
{
"name": "Jane",
"job": "developer",
"skills": ["ruby", "rails", "javascript"],
"available": "true",
"seeking": "part-time"
}
Hint: true needs to be a boolean and part-time a string so in double quotes.
When you need to set the value of a key in JSON to be blank, what is the correct syntax for the empty value?
प्रश्न95.- “”
- 0
- असत्य
- null
Explanation: The other options won’t work as well, as demonstrated by this StackOverflow post.
What is true about paginated reports? (Select all that apply.)
प्रश्न96.ए. They are formatted to fit well on a page.
बी. They shrink the report data to fit on a page.
सी. They truncate the report data to fit on a single page.
डी. They are both printable and shareable.
- ए,डी
- B OR C
- ए,बी,डी
- ए,सी,डी
Explanation: The true statements about paginated reports are: ए. They are formatted to fit well on a page. डी. They are both printable and shareable. So the correct options are A and D.
As a Scrum Master you have noticed a pattern that the most interesting stories on the sprint backlog get started right away, and the least interesting stories languish or don’t get done. तुम्हे क्या करना चाहिए?
प्रश्न97.- During story point estimation, increase the points assigned to the least interesting stories so the team can boost their velocity.
- Share your observation with the team and invite them to own and solve the problem.
- Ask the team to use a lottery system to assign each story.
- Ask the Tech Lead to assign every story to a developer so they all get done efficiently and with accountability.
Explanation: Encourage open communication within the team and involve them in problem-solving to find a solution that works best for their specific context and helps address the issue of disinterest in certain stories.
Which is the valid JSON equivalent of the data shown?
प्रश्न98.json{photo: {width: 1600, height: 900, binaries: { url: 'https://www.example.com/images/34097349843', thumbnail: 'https://www.example.com/images/thumbs/34097349843' }, animated: false, tags: [116, 943, 234, 38793], }}
-
{"photo": {"width": 1600, "height": 900, "binaries": { "url": "https://www.example.com/images/34097349843", "thumbnail": "https://www.example.com/images/thumbs/34097349843"}, "animated": "false", "tags": [116, 943, 234, 38793]}}
-
{"photo": {"width": 1600, "height": 900, "binaries": { "url": "https://www.example.com/images/34097349843", "thumbnail": "https://www.example.com/images/thumbs/34097349843"}, "animated": false, "tags": [116, 943, 234, 38793]}}
-
{"photo": {"width": 1600, "height": 900, "binaries": {"url": "https://www.example.com/images/34097349843", "thumbnail": "https://www.example.com/images/thumbs/34097349843"}, "animated": true, "tags": [116, 943, 234, 38793]}}
-
{"photo": {"width": "1600", "height": "900", "binaries": { "url": "https://www.example.com/images/34097349843", "thumbnail": "https://www.example.com/images/thumbs/34097349843"}, "animated": "false", "tags": ["116", "943", "234", "38793"]}}
When you need to set the value of a key in JSON to be blank, what is the correct syntax for the empty value?
प्रश्न99.- असत्य
- 0
- “”
- null
What does JSON with padding (JSON-P) use to make a request?
Q100.- एक
<origin>
तत्व - a header request
- NS
<script>
तत्व - the XMLHttpRequest object
Which whitespace characters should be escaped within a string?
Q101.- All whitespace is allowed.
- double quotes, slashes new lines, and carriage returns
- new lines and carriage returns only
- double quotes only
What’s wrong with this JavaScript?
Q102.JSON.parse({"first": "Sarah", "last": "Connor"}) ;
- JSON should be wrapped with curly braces.
- JSON.parse() is missing an argument.
- The value supplied to JSON.parse() is not a string.
- Nothing is wrong with it.
You need to assemble a list of members, but your JSON is not parsing correctly. How do you change it?
Q103.{"avengers": ["iron man", "hulk", "thor", "black widow", "ant man", "spider man" ]}
-
{"avengers": ["iron man", "hulk", "thor", "black widow", "ant man", "spider man"]}
-
{'avengers': {'iron man', 'hulk', 'thor', 'black widow', 'ant man', 'spider man'}]}
-
{"avengers": ["iron man", "hulk", "thor", "black widow", "ant man", "spider man"]}
-
{"avengers": {["iron man", "hulk", "thor", "black widow", "ant man", "spider man" ]}}
Which reference to the Unicode character U+1F602 complies with the JSON standard?
क्यू104.- 128514
- d83dde02
- \uD83D\uDE02
- 😂
How should comments be formatted in JSON?
क्यू105.- Wrap the comments in single quotes and place it at the bottom of the file.
- Wrap the comments in double parentheses.
- Escape comments by placing two slashes at the start of the comment.
- JSON does not support comments.
What is the purpose of JSON-P (JSON with padding) in web development, and how is it typically used?
Q106.- To validate JSON data before parsing it in JavaScript.
- To provide additional padding for JSON objects to improve readability.
- To overcome the same-origin policy limitation when making cross-domain AJAX requests.
- To compress JSON data for faster transmission over the network.
Explanation:- JSON-P, or JSON with padding, serves the purpose of overcoming the same-origin policy limitation in web development. The same-origin policy restricts web pages from making AJAX requests to a different domain for security reasons. JSON-P works by wrapping JSON data in a JavaScript function call, allowing data to be retrieved from an external domain as if it were a script. This technique is commonly used for securely fetching data from external APIs, making it a valuable tool for cross-domain data exchange in web applications.
In a JSON document, how can you represent a key that contains special characters, such as spaces or hyphens, to ensure proper parsing and access in JavaScript?
Q107.- Wrap the key in single quotes.
- Enclose the key in square brackets.
- backslashes before special characters.
- Enclose the key in double quotes.
Explanation:- When you have a key in a JSON document that contains special characters, खाली स्थान, or hyphens, it is essential to enclose the key in double quotes. JSON requires keys to be represented within double quotes to ensure proper parsing and access in JavaScript. This ensures that JavaScript can correctly interpret keys with special characters or spaces and access their associated values.
Which is ignored by JSON but treated as significant by YAML?
Q108.- trailing commas
- trailing decimals
- whitespace
- leading zeroes
Which code uses valid JSON syntax for the text “Centennial Olympics?
Q109.- ए
{
"host": "Atlanta",
"year": 1996
/_ Centennial Olympics _/
}
- बी
{
"host": "Atlanta",
"year": 1996
// Centennial Olympics
}
- सी
{
"host": "Atlanta",
"year": 1996,
"comment": "Centennial Olympics"
}
- डी
{
"host": "Atlanta",
"year": 1996,
\"Centennial Olympics\"
}
- इ
{
"host": "Atlanta",
"year": 1996,
"comment": "\"Centennial Olympics"
}
What data type is encoded in the outermost component of the JSON shown?
Q110.[
{
"year": 2024
},
{
"location": "unknown"
}
]
- वस्तु
- array
- संख्या
- string
Which is an invalid JSON value?
प्रश्न111.-
"'|=(_)(X 72(_)|\/||\*'"
-
"|=(_)(X 72(_)|\/||\*"
-
"|=(_)(X\" \"72(_)|\/||\*"
-
"\s(_)(X 72(_)|\/||\*"
What are the valid number types in JSON?
Q112.- Whole Numbers and Decimals
- Real Numbers and Fractions
- Integer, Floating Points, and Exponents (Scientific Notation, जैसे, 3e4)
- Prime Numbers and Complex Numbers
What is the purpose of JSON Web Tokens (JWT)?
प्रश्न114.- To validate JSON data
- To store sensitive information
- To represent information between parties
- To create JSON schemas
What is JSON-RPC used for?
प्रश्न 115.- Remote procedure calls encoded in JSON
- Rendering graphics in web applications
- JavaScript execution control
- Data validation in JSON
Which of the following is a key difference between JSON and XML?
प्रश्न116.- JSON uses tags
- XML is more lightweight
- JSON is easier for humans to read
- XML is used for programming, while JSON is for data exchange
Which HTTP header is commonly used to prevent cross-site scripting (XSS) attacks when working with JSON?
प्रश्न117.- Content-Encoding
- Access-Control-Allow-Origin
- JSON-Security
- XSS-Prevention
What does the JSON Merge Patch format allow you to do?
प्रश्न118.- Combine multiple JSON documents into one
- Partially update a JSON document
- Compress JSON data for storage
- Convert JSON to XML
Which method is used to parse a JSON string and return a JavaScript object in modern web browsers?
प्रश्न119.- parseJSON()
- JSON.parse()
- evalJSON()
- loadJSON()
What is the primary purpose of JSON-LD (JSON Linked Data)?
Q120.- To enable two-way data binding in JavaScript
- To represent data in a more human-readable format
- To express structured data that is linked to other data
- To create dynamic web pages with JSON
उत्तर छोड़ दें
आपको चाहिए लॉग इन करें या रजिस्टर करें एक नई टिप्पणी जोड़ने के लिए .