๐ Welcome to the worldโs most ridiculous (and awesome) way to write code in JSON. Yes, you read that right. JSON. As code. Not just for configs or not just for data. But as a ridiculous programming language.
{ "language": "๐ง JPL (JSON as Programming Language) is what happens when you stare at too many curly braces and think, โWhat if this was a real language?โ", "type": "Fun JSON-Based Programming Language", "status": "๐ฅ Experimental, Minimal, For geeks", "features": [ "โ Pure JSON syntax", "๐งฉ Print stuff (yes, really)", "๐ฆ Make variables like itโs 1999", "๐ Write loops, if/else, and functions", "๐ REPL + CLI", "๐ ๏ธ Call system functions", "๐ญ Pretend youโre living in a JSON utopia", "๐งช All in JSON. No kidding.", "๐ง Are you afraid of braces? You should be.", "๐งช Experimental features like functions, loops, and conditionals" ], "warning": "โ ๏ธ If you're afraid of curly braces, step away!" }
If curly braces
{}
or square brackets[]
make you sweat, this JSON jungle isnโt for you!
If you're afraid of
{curly braces}
orsquare brackets[]
, turn back now.
JPL is 99.9% JSON, 0.1% mercy.
Touch it only if you're brave enough to stare into the abyss of
{}
and live to tell the tale.
- Download the latest JPL.exe
- Double-click it, or run from terminal:
jpl.exe --help
- Clone this chaotic project:
git clone https://github.com/W1LDN16H7/JPL.git cd jpl
- Build it with Maven:
mvn clean package
- Run it:
java -jar target/JPL-1.0-SNAPSHOT.jar
- Build executable with GraalVM (Windows):
.\native-image -cp picocli-4.7.7.jar -jar jpl.jar
- Download the latest JPL.jar
jpl.exe or java -jar jpl.jar
jpl.exe run examples/func.jpl
jpl.exe compile may be in the future
jpl.exe help loop
[
{ "let": { "name": "JSON", "times": 3 } },
{
"for": {
"var": "i",
"from": 1,
"to": "times",
"do": [
{ "print": { "add": ["Hello ", "name"] } }
]
}
}
]
Output:
Hello JSON
Hello JSON
Hello JSON
Save this as megaExample.jpl
and run jpl.exe run megaExample.jpl
:
[
{ "import": "system.jpl" },
{ "print": { "call": { "now": [] } } },
{ "print": { "call": { "osName": [] } } },
{ "print": { "call": { "cpuCount": [] } } },
{ "let": { "a": 9, "b": 4, "name": "JPL" } },
{ "print": { "add": ["\"a + b = \"", { "add": ["a", "b"] }] } },
{ "print": { "mul": ["a", "b"] } },
{ "print": { "div": ["a", "b"] } },
{ "print": { "mod": ["a", "b"] } },
{ "print": { "&": [6, 3] } },
{ "print": { "||": [false, true] } },
{ "print": { "gt": ["a", "b"] } },
{ "def": { "sq": { "params": ["x"], "body": [{ "return": { "mul": ["x", "x"] } }] } } },
{ "print": { "call": { "sq": [5] } } },
{ "def": { "greet": { "params": ["who"], "body": [{ "return": { "add": ["\"Hi, \"", "who"] } }] } } },
{ "print": { "call": { "greet": ["\"JSON Fan\""] } } },
{ "if": { "cond": { "<": ["b", "a"] }, "then": { "print": "\"b < a ๐\"" }, "else": { "print": "\"b >= a ๐ค\"" } } },
{ "for": { "var": "i", "from": 1, "to": 3, "step": 1, "do": [ { "print": { "call": { "sq": ["i"] } } } ] } },
{ "print": "\"All features in one! ๐\"" }
]
Expected Output:
2025-07-09T15:30:00.123
Windows 10
8
"a + b = 13.0"
36.0
2.25
1.0
2
true
true
25
Hi, JSON Fan
b < a ๐
1
4
9
All features in one! ๐
[
// ๐ Welcome to JPL โ JSON Programming Language!
// Import system utilities for fun stuff
{ "import": "system.jpl" },
// Print system info
{ "print": { "call": { "now": [] } } },
{ "print": { "call": { "osName": [] } } },
{ "print": { "call": { "cpuCount": [] } } },
// Define a math function to square a number
{
"def": {
"square": {
"params": ["x"],
"body": [
{ "return": { "mul": ["x", "x"] } }
]
}
}
},
// Greet a user
{
"def": {
"greet": {
"params": ["name"],
"body": [
{ "return": { "add": ["Hello, ", "name"] } }
]
}
}
},
// Declare variables
{ "let": { "a": 7, "user": "Kapil" } },
// Use greet function and print
{ "print": { "call": { "greet": ["user"] } } },
// Conditional message
{
"if": {
"cond": { ">": ["a", 5] },
"then": { "print": "a is greater than 5" },
"else": { "print": "a is 5 or less" }
}
},
// Loop with break and continue
{
"for": {
"var": "i",
"from": 1,
"to": 10,
"step": 1,
"do": [
{ "if": { "cond": { "eq": ["i", 3] }, "then": { "continue": true } } },
{ "if": { "cond": { "gt": ["i", 7] }, "then": { "break": true } } },
{ "print": { "call": { "square": ["i"] } } }
]
}
},
// Fun ending message
{ "print": "๐ Done with curly braces and JSON fun!" }
]
Type:
jpl.exe help basics
โ Intro & let/printjpl.exe help math
โ Arithmetic & logicjpl.exe help if
โ Conditionalsjpl.exe help loop
โ For-loops & controlsjpl.exe help func
โ Functions & returnsjpl.exe help system
โ System library
Or explore the /examples
directory for ready-to-run scripts:
a1.jpl
โ Example script 1a2.jpl
โ Example script 2basic.jpl
โ Basic syntax and printingbmath.jpl
โ More math operationscmt.jpl
โ Comments usagecond.jpl
โ Advanced conditionalsconst.jpl
โ Constantsfunc.jpl
โ Functions and callsif.jpl
โ If/else conditionalsloop.jpl
โ While loopsmath.jpl
โ Math operations
To run all examples at once (Windows):
examples/run_all_examples.bat
Or run individually:
jpl.exe run examples/if.jpl
You can import libs like this:
{ "import": "system.jpl" }
Available libraries:
system.jpl
โ โ OS info, timestring.jpl
โ โ String tricksmath.jpl
โ โ Power mathfunc.jpl
โ โ Sample functionsloop.jpl
โ โ Loop demobasics.jpl
โ โ Print & let stuff
- JSON geeks who want to troll JavaScript
- Devs who love abuse of data formats
- Educators teaching ASTs / interpreters
- Hackers who want a new esolang
- People who just love chaos. ๐งจ
- File IO (read JSON while writing JSON ๐ต)
- JPL โ JVM bytecode (because why not)
- Web-based playground (comingโฆ maybe)
- JPL transpiler to TypeScript, Python, Morse code
- Fork on GitHub: https://github.com/W1LDN16H7/JPL
- Add your own .jpl libraries in lib/
- Create VSCode syntax plugins or web playgrounds
- Write issues for bugs, features, or just to say hi
- PRs: new features, docs, examples
- Add your own JPL scripts to examples/
- Write posts about your JPL adventures on X with #jpl
- Fix/Add NEW things in README.md, examples, or code
- Star the project and share it need your support to keep the madness alive!
MIT License โ code it, break it, share it. Built for JSON geeks who dare to dream in braces. โค๏ธ
Made with โค๏ธ and pure nonsense by Kapil.
Have fun, cause chaos, JPL forever! ๐