tanszek:oktatas:techcomm:syntax_graphs
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| tanszek:oktatas:techcomm:syntax_graphs [2024/10/07 16:45] – knehez | tanszek:oktatas:techcomm:syntax_graphs [2024/11/18 20:19] (current) – knehez | ||
|---|---|---|---|
| Line 13: | Line 13: | ||
| Even if someone is unfamiliar with the PASCAL language, they would be able to declare syntactically correct variables using the graph: | Even if someone is unfamiliar with the PASCAL language, they would be able to declare syntactically correct variables using the graph: | ||
| - | \[ | + | < |
| - | \text{var age, weekdays : integer;} | + | var age, weekdays : integer; |
| - | \] | + | var taxrate, netIncome : real; |
| - | \[ | + | var choice, isready : boolean; |
| - | \text{var taxrate, netIncome : real;} | + | initials, grade : char; |
| - | \] | + | name, surname : string; |
| - | \[ | + | </ |
| - | \text{var choice, isready : boolean;} | + | |
| - | \] | + | |
| - | \[ | + | |
| - | \text{initials, grade : char;} | + | |
| - | \] | + | |
| - | \[ | + | |
| - | \text{name, surname : string;} | + | |
| - | \] | + | |
| - | This shows how graphical representations can help in understanding | + | This shows how graphical representations can help understand |
| + | |||
| + | === 2. Example: Syntax Graph of the JSON (JavaScript Object Notation) Data Exchange Format with Examples === | ||
| + | |||
| + | The JSON format is very important in modern information technology. By looking at examples and the syntax graph, we can understand its structure. | ||
| + | |||
| + | === Simple JSON Data === | ||
| + | |||
| + | <sxh json> | ||
| + | { | ||
| + | | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | This is an object that contains **name-value pairs** or **arrays**, combined in various ways. For example: | ||
| + | |||
| + | <sxh json> | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | {" | ||
| + | {" | ||
| + | {" | ||
| + | ] | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | This example shows how JSON can be used to structure objects, where properties have values and methods. The syntax graph helps visualize the relationships between objects, arrays, and values. | ||
| + | |||
| + | JSON object: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | JSON array: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | JSON types: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | JSON string: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | JSON number: | ||
| + | |||
| + | For example: '' | ||
| + | |||
| + | {{: | ||
tanszek/oktatas/techcomm/syntax_graphs.1728319517.txt.gz · Last modified: 2024/10/07 16:45 by knehez
