JSON Test
Which of the following schema properties does not need to be validated by JSON
validators?
a. format
b.
pattern
c. enum
d. transient
Which of
the following correctly describes the JSON Schema?
a. It is intended to provide validation and
interaction control of the JSON data.
b. It is
a JSON Object that defines the various attributes of the instance.
c. It does not support the serialization/deserialization tools
d. It is a JSON extension wherein a prefix is specified as an
input argument of the call itself. This prefix is typically the name of a
callback function.
Which of
the following parameters of JSONRequest hold/s the information of implicit
authentication and cookies during post operation?
a. src
b. done
c. send
d. url
Which of
the following serialization formats is/are supported by JSON?
a.
Recurring structures
b.
Invisible structures
c.
Functions
d. None of the above
Which of the following correctly describes the
term tuple typing in JSON Schema?
a.
Properties should be an object type with property definitions corresponding to
instance object properties.
b. It provides an enumeration of possible
values that are valid for the instance property. It should be an array, and
each item in the array should represent a possible value for the instance
value.
c. Items
should be a schema or an array of schemas and the instance value should be an
array with all the items in the array conforming to this schema.
d. It indicates the format of the data from among predefined
formats, This property does not need to be validated by validators.
In order
to find the last book, which of the JSONPath codes will you use?
a.
//book[(,length-1)] $..book[-1]
b.
$..book[(@.length-1)] $.book[-1:]
c.
$..book[(@length-1)] $.book[-1]
d. $..book[(@.length-1)]
$..book[-1:]
While
using JSONRequest.cancel, what will happen to the request if it is still in the
outgoing message queue?
a. It will be deleted from the queue.
b. It
will abort.
c. It
will call the done function of the request with an exception message of
"cancelled".
d. None of the above
Which of
the following is a valid JSONPath expression?
a. /.store.book[0].title/*
b. $.store.book[0].title
c. //.store.book[0].title//*
d. $..store.book[0].title
Which of
the following statements correctly describes the following syntax?
{"state":{optional:true},"town":{"required":"state",optional:true}}
a. An instance includes a state property and
a town property which is optional.
b. An
instance may or may not include a state property which is optional. If a town
property is not included, the state property is optional.
c. An
instance must include a state property if a town property is included. If a
town property is not included, the state property is optional.
d. The declaration syntax is incorrect. You can not declare
optional values in an array.
What does
the [start:end:step] element of JSONPath signify?
a. It
represents a subscript operator.
b. It
represents recursive descent.
c. It
represents attribute access.
d. It represents an array slice
operator.
Which of
the following JSONPath elements represents the root object/element?
a. /
b. $
c. @
d. .
If a
schema propeity is declared false, which of the following attributes can not be
used to extend the schema?
a.
pattern
b.
transient
c. format
d. additionalProperties
Which of
the following features of JSON has the property of exemption from the same
origin policy?
a. JSONRequest
b. Module
c. JSONT
d. JSLint
Which of
the following schema properties takes schema as value in JSON?
a. extends
b.
pattern
c.
options
d. transient
Which of
the following correctly describes the disallow property of the JSON Schema?
a. It
indicates that the property will be used for volatile values that should not be
persisted with.
b. It
indicates that the instance property should not be changed.
c. It
specifies that an instance property is an internal property that should not be
made visible to the users.
d. This attribute may take the
same values as the "type" attribute.
Which of
the following is/are true with regard to JSONRequest?
a. It is a two way data interchange between
any page and any server.
b. It can
combine programs and data services from multiple sources on a single page.
c. It accumulates random delays before acting
on new requests when previous requests have failed.
d. It can be used to retrieve JSON-encoded values and other text
formats.
Which of
the following properties form part of the response to a JSON-RPC method
invocation?
a. result
b. error
c. params
d. id
e.method
In order
to find the price of everything in the store, which of the JSONPath codes will
you use?
a. $.store.price
b. $store..price[*]
c. $.store..price
d. //store.price[*]
Which of
the following schema properties always has a unique value for all its instances
in JSON?
a.
requires
b. identity
c.
readonly
d. disallow
JSON does
not allow you to create an empty object.
a. True
b. False
What will
be the output of the code shown above?
a. OpenDoc
3
b.
CloseDoc
4
c.
CreateDoc
2
d. Syntax Error
Which of
the following is the correct syntax for declaring a <module> tag in JSON?
a.
<module name="NAME" path="URL" style="STYLE"
b.
<module id="NAME" url="URL" style="STYlE"
/>
c.
<module name=NAME path="URL" style="STYLE" >
d. <module id="NAME"
src="URL" style="STYLE" />
Which of
the following statements is/are true about modules with reference to JSON?
a. Every
node in the module's parent chain must also have a CSS display property of
dynamic.
b. Modules cannot have negative CSS margins.
c. The CSS display property of a module must be static. d. Modules
can be clipped by the CSS clip property.
Which of
the following properties should be declared first in order to define a schema
from an mslance?
a. $schema
b. $ref
c.
Sdefault
d. &id
Which of
the following parameters can be passed in the JSONRequest.post request?
a. src
b. done
c. id
d. send
Which of
the following properties are contained in the request for a JSON-RPC method
invocation?
a. result
b. method
c. params
d. error
Which
syntax is correct for the jsonPath() function during the implementation of
JSONPath?
a.
jsonPath(src, expr [, args])
b.
jsonPath(obj, expr [, args],URL)
c. jsonPath(obj, expr [, args])
d. jsonPath(obj, expr [, args],src)
State
whether true or false.
JSONRequest
allows the connection when the Content-Type in both directions is an
application/jsonrequest.
a. True
b. False
Which of
the following parameter values cannot be seriaiized in JSONRequest?
a.
timeout
b. done
c. url
d. send
Which of
the following correctly describes the function of the JSON.stringify method in
JSON?
a. It
accepts a string and revives it into an object.
b. It converts a JavaScript object into a
JSON string.
c. it
converts a JSON object into a text
d. It converts a JSON string into a JavaScript object
Which of
the following statements is/are not correct about the JSON-RPC?
a. it wraps an object, allowing you to call
methods on that object and get the return values,
b. It
does not allow multiple calls to be sent to a peer which may be answered out of
order.
c. It
does not provide the idea of getting error responses.
d. It allows for bidirectional communication between the service
and the client.
Which of
the following statements is correct about JSON?
a. It is a lightweight data interchange
format.
b. It is
a superset of JavaScript.
c. It is
a language independent text format.
d. It is a general serialization format.
Which of
the following elements of JSONPath can be used to apply the fitter(script)
expression?
a. [,]
b. ?()
c. //
d. [.]
In the
above code snippet, what is the purpose of declaring the JSONRequestpost?
a. It
will queue the request and call the done function.
b. It will queue the request and return the
request number.
c. It
will queue the request and return the request number and authentication
information.
d. None of the above
In the
code snippet below, which line contains an error?
Line1 :{
Line2:
"id":"person",
Line3:
"type":"object",
Line4:
"properties":{
Line5:
"name":{type":"string"},
Line6:
"age":{"type":"integer"}
Line7: }
Line8: }
Line9: {
Line10:"id":"marriedperson",
Line11:
"extends":{"ref":"person"},
Line12:
"properties":{
Line13:"age":{"type":"integer",
Line14:
"minimum":17},
Line15: }
Line16: }
a. Line 3
b. Line 6
c. Line
11
d. Line 12
Which of
the following parameters can be passed in the JSONRequest.get request?
a. url
b. done
c. send
d. src
Which of
the following JSONPath syntaxes will you use in order to filter all books where
price is less than $10?
a. $.book[@.price<10)]
b. $..book[?(@.pnce<10)]
c.
//book[price<10]
d. $.book[,(@.pnce<10)]
In order
to find the authors of all the books in the store, which of the JSONPath codes
will you use?
a. $.store.book[*].author
b. S..author
c. /store.book.author
d. $store.book.author
What is
the significance of the arrow before the following code in JSON?
-->
{"method": "echo", "params": ["Hello
JSON-RPC"], "id": 1}
a. It shows the data sent to the service.
b. It
shows the data coming from the service.
c. It
shows the notification message from the service.
d. It shows the root element set for the message transfer.
Which of
the following methods is/are provided by JSONRequest?
a. src
b. get
c. cancel
d. style
0 comments:
Post a Comment