가장 많이 묻는 면접 질문과 답변 & 온라인 테스트
면접 준비, 온라인 테스트, 튜토리얼, 라이브 연습을 위한 학습 플랫폼

집중 학습 경로, 모의고사, 면접 준비 콘텐츠로 실력을 키우세요.

WithoutBook은 주제별 면접 질문, 온라인 연습 테스트, 튜토리얼, 비교 가이드를 하나의 반응형 학습 공간으로 제공합니다.

Prepare Interview

JSON 면접 질문과 답변

관련 차이점

JSON vs XML

Ques 6. Explain JSON Structures.

A collection of name/value pairs
> In various languages, this is realized as an object, record, struct, dictionary, hash table, keyed list, or associative array
An ordered list of values
> In most languages, this is realized as an array, vector, list, or sequence
These are universal data structures supported
A JSON object is an unordered set of name/value pairs
A JSON object begins with { (left brace) and ends with } (right brace)
Each name is followed by : (colon) and the name/value pairs are separated by , (comma)

도움이 되었나요? Add Comment View Comments
 

Ques 7. Compare JSON with JavaScript.

JSON is a subset of the object literal notation of JavaScript
> JSON can be used in the JavaScript language with no muss or fuss
Example: JSON Object
var myJSONObject = {"bindings": [ {"ircEvent": "PRIVMSG", "method": "newURI", "regex": "^http://.*"},
{"ircEvent": "PRIVMSG", "method": "deleteURI", "regex": "^delete.*"},
{"ircEvent": "PRIVMSG", "method": "randomURI", "regex": "^random.*"}
]
};
In this example, a JSON JavaScript object is created
containing a single member "bindings", which contains
an array containing three objects, each containing
"ircEvent", "method", and "regex" members
Members can be retrieved using dot or subscript
operators myJSONObject.bindings[0].method // "newURI"
Text to Object Conversion in
JavaScript code
var myObject = eval('(' + myJSONtext + ')');
To convert a JSON text into an JSON object, use
the eval() function > eval() invokes the JavaScript compiler
> Since JSON is a proper subset of JavaScript, the compiler will
correctly parse the text and produce an object structure

도움이 되었나요? Add Comment View Comments
 

Ques 8. What is the Security and JSON Parser?

Security and JSON Parser to understand by below examples
// Include http://www.json.org/json.js
var myObject = myJSONtext.parseJSON();
eval() can compile and execute any JavaScript program, so there can be security issues (cross-site scripting)
Use eval() when the source can be trusted
When security is a concern - the source cannot be trusted -, it is better to use a JSON parser
A JSON parser will only recognize JSON text and so is much safer
Object to Text Conversion
var myJSONText = myObject.toJSONString();
You can convert JSON object into JSON text
JSON does not support cyclic data structure
Do not give cyclical structures to the JSON stringifier

도움이 되었나요? Add Comment View Comments
 

Ques 9. What are the JSON Tools for Java Developer?

Some of JSON tools for java developer is
Parser
> Parse JSON text files and convert these to a Java model
Renderer
> Render a Java representation into text
Serializer
> Serialize plain POJO clusters to a JSON representation
Validator
> Validate the contents of a JSON file using a JSON schema
JSONObject Java Class
A JSONObject is an unordered collection of name/value pairs
The put methods adds a name/value pair to an object
The texts produced by the toString methods strictly conform to the JSON syntax rules
myString = new JSONObject().put("JSON", "Hello, World!").toString();
// myString is {"JSON": "Hello, World"}

도움이 되었나요? Add Comment View Comments
 

Ques 10. How to Generate or Send JSON Data at the Server Side?

Create JSON Java object
Add name and value pairs using put method
Convert it to String type using toString method and send it to the client with content-type as "text/xml" or "text/plain"
myString = new JSONObject().put("JSON", "Hello, World!").toString();
// myString is {"JSON": "Hello, World"}

도움이 되었나요? Add Comment View Comments
 

Most helpful rated by users:

Copyright © 2026, WithoutBook.