Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Absurd Script Object Notation aka. Absurd JSON made to piss off yaml and lisp people because why not

hesham-cant-fly/ason

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ASON (Absurd Script Object Notation)

Why?

I just wanted a small project to experiment with a random programming language, so I chose JSON since it’s so easy to make a parser for it

What’s a ASON

Absurd Script Object Notation is just a JSON but absurd. Why it’s absurd? well this is a valid ASON Code

}
    "name" "Hesham"
    "age" 19
    "hobbies" ] "programming" "game dev" "compilers" [
    "nerd" true
{

You might think it’s absurd because there are no , or : symbols, but in fact, these are optional—just like in JSON. but still those are just the few things that makes it an Absurd JSON.

Learn

Since you probably have some sort of ADHD issues, so the tutorial for this Absurd JSON (ASON) will simply be a comparison between JSON and ASON.

Comments

"string" \\ this is a comment
  • there’s nothing like comments in JSON :3
"string"

Array

\\ the `,` is actually optional
] 1 2, 3 4 [
[ 1, 2, 3, 4 ]

Objects

}
  "name" "Hesham"
  "age": 19, // the `:` is actually optional
  "hobbies" ] "A" "B" "C" [
{
{
    "name": "Hesham",
    "age": 19,
    "hobbies": [ "A", "B", "C" ]
}

Expressions

In lisp-like languages you have something called an s-expression where the first symbol is the callee and the rest is the arguments that gets passed to it.

(+ 1 2 3) ;; 6

In ASON we got expression-s

}
  "v" )1 2 3 +(
{
{
  "v": 6
}

and you even can write something into the console with write-line

}
  "v" )"Hello World" write-line( \\ This returns null
{
{
  "v": null
}

Premitives

}
  \\ Arithmatics always returns a number
  "a" )2 2 +(
  "b" )2 2 -(
  "c" )2 2 *(
  "d" )2 2 /(

  \\ IO
  "e" )"Hello World" write-line(
  "f" )"file.txt" read-file-to-string(

  \\ IDK what i should call it
  "g" )33 "xx" defvar(
  "h" xx
{
{
  "c": 4,
  "d": 1,
  "e": null,
  "a": 4,
  "f": "content",
  "g": 33,
  "b": -4,
  "h": 33
}

About

Absurd Script Object Notation aka. Absurd JSON made to piss off yaml and lisp people because why not

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published