In YAML, you come across various character streams as follows −
In this chapter, we will discuss them in detail.
Directives are essential example lines utilized in YAML processor. Directives are the presentation subtleties like comments which are not reflected in serialization tree. In YAML, there is no real way to characterize private directives. This segment talks about different types of directives with pertinent examples −
Reserved directives are instated with three hyphen characters (- - ) as appeared in the model below. The reserved directives are changed over into explicit estimation of JSON.
YAML Directives are default directives. Whenever changed over in JSON, the values brought incorporates forward slice character in going before and ending characters.
YAML utilizes these markers to enable more than one Document to be contained in one stream. These markers are uniquely used to pass on the structure of YAML report. Note that a line starting with "- - "is utilized to begin another Document.
The accompanying code clarifies about this with examples –
YAML Document is considered as a solitary local data structure introduced as a solitary root node. The presentation subtleties in YAML report, for example, directives, comments, Indentation and styles are not considered as content incorporated into them.
There are two Types of Documents utilized in YAML. They are clarified in this segment −
It starts with the report begin marker pursued by the presentation of the root node. The example of YAML express statement is given below −
It incorporates an unequivocal begin and end markers which is "- - "and "… " in given example. On changing over the predefined YAML in JSON format, we get the output as appeared below –
These reports don't start with a Document begin marker. Watch the code given below –
Changing over these qualities in JSON format we get the output as a straightforward JSON object as given below –
YAML incorporates a sequence of bytes called as character stream. The stream starts with a prefix containing a byte arrange indicating a character encoding. The entire stream starts with a prefix containing a character encoding, trailed by comments.
A example of finish stream (character stream) is appeared below –
YAML Related Interview Questions
|XML Interview Questions||HTML 4 Interview Questions|
|HTML Interview Questions||HTML 5 Interview Questions|
|Dynamic HTML Interview Questions||Java XML Interview Questions|
|XML DOM Interview Questions||XML-RPC Interview Questions|
|Xml Publisher Interview Questions|
All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.