Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >>>>>>>>>>>>>>>>>>>>>>
- XJS
- >>>>>>>>>>>>>>>>>>>>>>
- numbers: {
- integer: 1
- decimal: 1.0
- negative: -1,
- negative2: -1.0
- scientific: 1e3
- scientific2: 1e+2,
- scientific3: 1e-1
- }
- booleans: {
- true: true
- false: false
- }
- strings: {
- simple: hello
- spaces: hello world
- double: "use quotes, because commas"
- single: 'hello, world'
- multiline:
- '''
- multiple lines, with commas
- <-- aligned to the left-most character
- '''
- implicit: starts with text: {
- this is not an object.
- alignment is just like multiline strings
- { [ ( more of these are allowed ) ] }
- }
- implicit2: starts with text and {
- "}" does not end it because it's quoted
- }
- }
- null: null
- array: [
- 1
- 2
- 3
- ]
- trailing: [
- 4,
- 5,
- 6,
- ]
- condensed: [ 7, 8, 9 ]
- comments: {
- // line comments
- k1: v1
- # hash comments
- k2: v2
- /* block comments */
- k3: v3
- }
- positions: {
- // before line
- k1: v1
- k2: v2 // after line
- // interior
- }
- differences: {
- multiline:
- '''
- string // this is not a comment
- '''
- // What happens to these comments
- // and how the new lines, alignment,
- // etc. is not really important, but
- // we should make sure to clearly
- // document whatever we decide on.
- implicit: (
- // this is a comment (where does it go?)
- text
- )
- // Same here. How we treat these
- // comments is not significant.
- // These strings aren't ideal for
- // regular text and are mostly
- // needed just for expressions.
- // This can be considered a very
- // primitive form of expression.
- implicit2: this should /* comment */ be legal
- }
- delimiters: {
- comma: string,
- newline: string
- }
- keys: {
- spaces are allowed: string
- keys can be ({:}) implicit: string
- "keys can be quoted": string
- // true, but maybe don't do it
- keys do not end
- until the colon: string
- }
- >>>>>>>>>>>>>>>>>>>>>>>>>>>>
- JSON
- >>>>>>>>>>>>>>>>>>>>>>>>>>>>
- {
- "numbers": {
- "integer": 1,
- "decimal": 1.0,
- "negative": -1,
- "negative2" -1.0,
- "scientific": 1000,
- "scientific2": 100,
- "scientific3": 1.0
- },
- "booleans": {
- "true": true,
- "false": false
- },
- "strings": {
- "simple": "hello",
- "spaces": "hello world",
- "double": "use quotes, because commas",
- "single": "hello, world",
- "multiline": "multiple lines, with commas\n <-- aligned to the left-most character",
- "implicit": "starts with text: {\n this is not an object.\n alignment is just like multiline strings\n { [ ( more of these are allowed ) ] }",
- "implicit2": starts with text and {\n \"}\" does not end it because it's quoted"
- },
- "null": null,
- "array": [
- 1,
- 2,
- 3
- ],
- "trailing": [
- 4,
- 5,
- 6
- ],
- "condensed": [ 7, 8, 9 ],
- "comments": {
- "k1": "v1",
- "k2": "v2",
- "k3": "v3"
- },
- "positions": {
- "k1": "v1",
- "k2": "v2"
- },
- "differences": {
- "multiline": "\n string",
- "implicit": "(\n text\n)",
- "implicit2": "this should be legal"
- },
- "delimiters": {
- "comma": "string",
- "newline" "string"
- },
- "keys": {
- "spaces are allowed": "string",
- "keys can be ({:}) implicit": "string",
- "keys can be quoted": "string",
- "keys do not end\nuntil the colon": "string"
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment