List of Questions

Questions Topic Wise
MCQ & Explanation
Topic:Basics
-
1.What does JSON stand for?
2.Which programming languages commonly use JSON for data interchange?
3.What is the purpose of the backslash \ in a JSON string?
4.What is a common format for representing dates in JSON?
5.What is the primary benefit of using JSON over XML?
6.Which of the following is NOT a valid JSON data type?
7.In JSON, what does the 'undefined' value represent?
8.In the context of JSON, what does 'JSON Lines' (newline-delimited JSON) refer to?
9.In JavaScript, what method is commonly used to parse a JSON string into a JavaScript object?
10.In JSON, what is the significance of the 'null' value?
11.Which JavaScript method is commonly used for formatting and indenting JSON strings for better readability?
12.In JSON, what does the 'Infinity' value represent for a numeric property?
13.In JSON, what does the 'NaN' value represent?
14.What is the recommended approach for handling time zones in JSON data?
Topic:Schema and Validation
-
1.What is the purpose of JSON Schema?
2.Which method is used in JSON Schema to specify multiple schemas in an array, where at least one must match?
3.In which data type can you represent a set of unique values in JSON Schema?
4.In JSON Schema, what is the 'default' keyword used for?
5.Which of the following is a JSON Schema validation keyword for defining a maximum value for a number?
6.What is the purpose of the 'if' and 'then' keywords in JSON Schema?
7.Which keyword in JSON Schema is used to define exclusive minimum and maximum values for a number?
8.Which JSON Schema keyword is used for adding comments to a schema?
9.In JSON Schema, what does the 'exclusiveRange' keyword indicate?
10.In JSON Schema, how can you define a property that can have multiple types?
11.What is the purpose of the 'uniqueItems' keyword in JSON Schema?
12.In JSON Schema, how can you express dependencies between properties?
13.Which keyword in JSON Schema is used to express an exclusive minimum value for a number?
Topic:Parsing and Serialization
-
1.What is the purpose of the JSON.stringify() method in JavaScript?
2.Which JavaScript method is commonly used for parsing a JSON string?
Topic:AJAX and JSON
-
1.In AJAX, what does JSON represent?
2.What is the purpose of the XMLHttpRequest object in AJAX?
3.What is the role of the HTTP header 'Content-Type: application/json' in AJAX requests?
4.What is the purpose of the 'dataType' option in jQuery AJAX requests?
5.What is the role of the 'HEAD' request method in AJAX?
6.What is the purpose of the 'dataType' option in jQuery AJAX requests?
7.What is the role of the 'HEAD' request method in AJAX?
8.In the context of AJAX, what does the term 'serialization' refer to?
9.What is the purpose of the 'timeout' option in AJAX requests?
10.What is the purpose of the 'beforeSend' callback function in jQuery AJAX requests?
11.What is the purpose of the 'overrideMimeType' method in AJAX?
12.What is the purpose of the 'reject' option in jQuery AJAX requests?
13.Which of the following is a benefit of using the 'fetch' API for AJAX requests in modern web development?
14.What is the purpose of the 'async' attribute in a script tag when loading JSON data?
Topic:Working with APIs
-
1.Which method is commonly used to send asynchronous requests to a server using JSON in JavaScript?
2.What does API stand for?
3.What is the purpose of the 'PATCH' HTTP method in JSON API design?
4.In the context of JSON APIs, what is HATEOAS?
5.In JSON-RPC, what is the purpose of the 'params' property in the request object?
6.In JSON-RPC, what is the role of the 'error' property in the response object?
7.Which HTTP header is commonly used to control caching behavior for JSON responses?
8.When working with JSON APIs, what does versioning help prevent?
9.What is the primary purpose of JSONP (JSON with Padding) in web development?
10.Which HTTP method is commonly used for retrieving data from a server using JSON?
Topic:Advanced JSON Concepts
-
1.Which of the following is an advanced JSON concept?
2.Which of the following is an advanced concept in JSON-RPC (Remote Procedure Call)?
Topic:Security and JSON
-
1.How can you prevent JSON injection attacks?
2.What is a common technique for securing JSON data stored on the client side?
3.What is the role of the 'Access-Control-Allow-Origin' header in CORS?
4.In the context of JSON, what does CSRF stand for?
5.What is the purpose of the 'JSON vulnerability' and how can it be mitigated?
6.When using JSON Web Tokens (JWT) for authentication, what does the 'exp' claim represent?
7.Which of the following is a best practice for securing JSON data in transit?
8.What is the significance of the 'pre-flight request' in the context of CORS?
9.Which of the following is a security consideration when using JSONP (JSON with Padding)?
10.What is the role of the 'iat' claim in a JSON Web Token (JWT)?
11.Which of the following is a common security practice for preventing JSON injection?
12.How can you handle JSON data that may contain sensitive information, such as passwords?
13.What is the purpose of the 'Sec-Fetch-Site' header in JSON API requests?
14.What is a common approach for improving the security of JSON data stored on the client side?
15.What is the significance of the 'SameSite' attribute in cookies related to JSON APIs?
16.Which of the following is a security consideration when working with JSON data in client-side scripts?
17.In JSON Web Tokens (JWT), what is the 'aud' claim used for?
18.How can you prevent security issues related to JSONP (JSON with Padding) requests?
19.What is a recommended practice for securely transmitting sensitive JSON data over the network?
20.What is the purpose of the 'rev' claim in JSON Web Tokens (JWT)?
21.What is the main advantage of JSON-P (JSON with Padding) in cross-domain requests?
22.What is the recommended practice for securing JSON data during transmission?
23.What does CORS stand for in the context of JSON and web development?
24.In a JSON Web Token (JWT), what is the purpose of the 'payload'?
25.Which of the following is NOT a common security consideration when working with JSON data?
26.What is the role of the 'same-origin policy' in browser security?
27.What is the purpose of the 'no-store' directive in the 'Cache-Control' header?
Topic:Performance Optimization with JSON
-
1.What is a common approach for optimizing JSON performance?
2.Which of the following is a technique for reducing the size of JSON data during transmission?
3.How can you optimize the performance of JSON.stringify() in JavaScript?
4.What is a benefit of using a content delivery network (CDN) for JSON data?
5.What is a common approach to improving the performance of JSON parsing in browsers?
6.How can you optimize the performance of JSON parsing in JavaScript?
7.Which of the following is a common mistake to avoid for better JSON performance?
Topic:Real-world JSON Applications
-
1.In real-world applications, JSON is commonly used for:
2.In a real-world application, how can you handle large JSON datasets efficiently?
3.Which of the following is a real-world application of JSON in IoT (Internet of Things)?
4.What is the primary purpose of JSONB in PostgreSQL?
5.Which of the following is a benefit of using a CDN (Content Delivery Network) for JSON data?
6.Which of the following is a role of JSON in microservices architecture?
Topic:Tools and Libraries
-
1.What is the primary purpose of JSONLint?
Topic:Tips and Best Practices
-
1.What is a tip for efficient JSON usage in web development?
2.Which of the following is a common best practice for designing JSON APIs?
3.What is a good practice when designing JSON APIs?