en:xjson
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:xjson [2026/06/03 09:15] – administrator | en:xjson [2026/06/03 09:56] (current) – [XJSON] administrator | ||
|---|---|---|---|
| Line 13: | Line 13: | ||
| Alternative, | Alternative, | ||
| - | { | + | |
| " | " | ||
| " | " | ||
| - | } | + | |
| Line 37: | Line 37: | ||
| * _cls: base64, or z85 (binary) | * _cls: base64, or z85 (binary) | ||
| - | ==== XJSON ==== | + | ===== XJSON ===== |
| There are two other issues in JSON. The first issue is that it must be an object, that is the notation must start with a curly bracket. | There are two other issues in JSON. The first issue is that it must be an object, that is the notation must start with a curly bracket. | ||
| Line 65: | Line 65: | ||
| The following is an example of an XJSON object, or a key-value pair dictionary. Note that attribute (or dictionary key) does not needed to be quoted, although you can. You cannot use number as attribute. Attribute must be a single word without space in between. | The following is an example of an XJSON object, or a key-value pair dictionary. Note that attribute (or dictionary key) does not needed to be quoted, although you can. You cannot use number as attribute. Attribute must be a single word without space in between. | ||
| - | { | + | |
| + | | ||
| feedback : 1, | feedback : 1, | ||
| changeset : { | changeset : { | ||
| Line 84: | Line 85: | ||
| locked: F, | locked: F, | ||
| icon: _HA09EFJKI===, | icon: _HA09EFJKI===, | ||
| - | } | + | |
| This is an example for a XJSON for a list instead of an object. It can also be a number or a string too. | This is an example for a XJSON for a list instead of an object. It can also be a number or a string too. | ||
| - | [ 1, 2, " | + | |
| - | === Notes on Boolean === | + | ==== Notes on Boolean |
| T or True, or TT are the same since we first character already tell the type. Similar to F and False. | T or True, or TT are the same since we first character already tell the type. Similar to F and False. | ||
| - | === Notes on Number === | + | ==== Notes on Number |
| - | | + | |
| - | | + | |
| - | | + | |
| - | === Notes on DateTime === | + | ==== Notes on DateTime |
| - | | + | |
| - | | + | |
| - | | + | |
| - | === Notes on String === | + | ==== Notes on String |
| - | | + | |
| - | | + | |
| - | === Notes on Bytes === | + | ==== Notes on Bytes ==== |
| You shall put bytes data betwen pair of signle quote if you have space in bytes data. For example _' | You shall put bytes data betwen pair of signle quote if you have space in bytes data. For example _' | ||
| - | === Notes on List and Dict === | + | ==== Notes on List and Dict ==== |
| You can leave the last item in a List or Dict blank. Eg [ 1, 2, 3, ] is accepted. So is { a: 1, b: 2, }. But you cannot have an empty item in between. Eg [ 1,,3 ] or { a: , b: 2 }, error. | You can leave the last item in a List or Dict blank. Eg [ 1, 2, 3, ] is accepted. So is { a: 1, b: 2, }. But you cannot have an empty item in between. Eg [ 1,,3 ] or { a: , b: 2 }, error. | ||
en/xjson.1780478126.txt.gzip · Last modified: by administrator
