PersonTheCat

Untitled

Feb 21st, 2022
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.33 KB | None | 0 0
  1. >>>>>>>>>>>>>>>>>>>>>>
  2. XJS
  3. >>>>>>>>>>>>>>>>>>>>>>
  4.  
  5. numbers: {
  6. integer: 1
  7. decimal: 1.0
  8. negative: -1,
  9. negative2: -1.0
  10. scientific: 1e3
  11. scientific2: 1e+2,
  12. scientific3: 1e-1
  13. }
  14. booleans: {
  15. true: true
  16. false: false
  17. }
  18. strings: {
  19. simple: hello
  20. spaces: hello world
  21. double: "use quotes, because commas"
  22. single: 'hello, world'
  23. multiline:
  24. '''
  25. multiple lines, with commas
  26. <-- aligned to the left-most character
  27. '''
  28. implicit: starts with text: {
  29. this is not an object.
  30. alignment is just like multiline strings
  31. { [ ( more of these are allowed ) ] }
  32. }
  33. implicit2: starts with text and {
  34. "}" does not end it because it's quoted
  35. }
  36. }
  37. null: null
  38. array: [
  39. 1
  40. 2
  41. 3
  42. ]
  43. trailing: [
  44. 4,
  45. 5,
  46. 6,
  47. ]
  48. condensed: [ 7, 8, 9 ]
  49. comments: {
  50. // line comments
  51. k1: v1
  52. # hash comments
  53. k2: v2
  54. /* block comments */
  55. k3: v3
  56. }
  57. positions: {
  58. // before line
  59. k1: v1
  60. k2: v2 // after line
  61. // interior
  62. }
  63. differences: {
  64. multiline:
  65. '''
  66. string // this is not a comment
  67. '''
  68. // What happens to these comments
  69. // and how the new lines, alignment,
  70. // etc. is not really important, but
  71. // we should make sure to clearly
  72. // document whatever we decide on.
  73. implicit: (
  74. // this is a comment (where does it go?)
  75. text
  76. )
  77. // Same here. How we treat these
  78. // comments is not significant.
  79. // These strings aren't ideal for
  80. // regular text and are mostly
  81. // needed just for expressions.
  82. // This can be considered a very
  83. // primitive form of expression.
  84. implicit2: this should /* comment */ be legal
  85. }
  86. delimiters: {
  87. comma: string,
  88. newline: string
  89. }
  90. keys: {
  91. spaces are allowed: string
  92. keys can be ({:}) implicit: string
  93. "keys can be quoted": string
  94. // true, but maybe don't do it
  95. keys do not end
  96. until the colon: string
  97. }
  98.  
  99.  
  100. >>>>>>>>>>>>>>>>>>>>>>>>>>>>
  101. JSON
  102. >>>>>>>>>>>>>>>>>>>>>>>>>>>>
  103.  
  104.  
  105. {
  106. "numbers": {
  107. "integer": 1,
  108. "decimal": 1.0,
  109. "negative": -1,
  110. "negative2" -1.0,
  111. "scientific": 1000,
  112. "scientific2": 100,
  113. "scientific3": 1.0
  114. },
  115. "booleans": {
  116. "true": true,
  117. "false": false
  118. },
  119. "strings": {
  120. "simple": "hello",
  121. "spaces": "hello world",
  122. "double": "use quotes, because commas",
  123. "single": "hello, world",
  124. "multiline": "multiple lines, with commas\n <-- aligned to the left-most character",
  125. "implicit": "starts with text: {\n this is not an object.\n alignment is just like multiline strings\n { [ ( more of these are allowed ) ] }",
  126. "implicit2": starts with text and {\n \"}\" does not end it because it's quoted"
  127. },
  128. "null": null,
  129. "array": [
  130. 1,
  131. 2,
  132. 3
  133. ],
  134. "trailing": [
  135. 4,
  136. 5,
  137. 6
  138. ],
  139. "condensed": [ 7, 8, 9 ],
  140. "comments": {
  141. "k1": "v1",
  142. "k2": "v2",
  143. "k3": "v3"
  144. },
  145. "positions": {
  146. "k1": "v1",
  147. "k2": "v2"
  148. },
  149. "differences": {
  150. "multiline": "\n string",
  151. "implicit": "(\n text\n)",
  152. "implicit2": "this should be legal"
  153. },
  154. "delimiters": {
  155. "comma": "string",
  156. "newline" "string"
  157. },
  158. "keys": {
  159. "spaces are allowed": "string",
  160. "keys can be ({:}) implicit": "string",
  161. "keys can be quoted": "string",
  162. "keys do not end\nuntil the colon": "string"
  163. }
  164. }
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
Advertisement
Add Comment
Please, Sign In to add comment