The next generation of markup for Web5 & WebAI

Inspired by JSON and DSL, secure by design, ideal for AI and the decentralized web

The web as an intelligent entity begins here.

What It Is – What It Is NOT?

JML (JSON-Inspired Markup Language) is an innovative markup language inspired by JSON structure and DSL, designed for Ascoos OS and the modern web.

Its goal is to provide a lightweight, secure, and easy-to-use alternative to traditional HTML, with emphasis on AI-compatibility, decentralization (Web5), and minimal syntax.

In Summary

It IS

  • JSON-inspired DSL markup
  • AST-based from the ground up
  • 16–40% smaller than HTML
  • Zero-trust & XSS-safe
  • Ideal for WebAI / agents
  • Fully UTF-8 native
  • With semantic macros & extensions

It Is NOT

  • Native browser markup
  • Template engine (Twig/Pug)
  • A simple JSON replacement
  • A programming language

JML vs HTML – Comparison 2026

FeatureJMLHTML5
Size (Hello World minified)64 chars108 chars
With meta + viewport177 chars212 chars
Average reduction16–40%
BoilerplateNoneDOCTYPE, head, body...
XSS SecuritySafe (AST)Depends
Executable logic (macros)YesNo
EncryptionYes (WIC)No
Browser nativeNo (extension)Yes

AST – The Heart of JML

JML is not markup. It is a DSL with native AST – the markup of 2030, today.

It enables semantic macros, transformations, debugging, and security without XSS.

Abstract Syntax Tree visualization

Example AST structure – enables validation, macros & secure rendering

Try JML Now

JML (Compact Syntax)
html {
  head {
    meta:charset('UTF-8')
    link:rel('stylesheet'),href('https://cdn.ascoos.com/bootlib/css/bootlib.min.css')
  }
  body:class('dark-theme') {
    h1{`Welcome to JML!`}
    p{`Lightweight markup for Ascoos OS.`}
  }
}
Equivalent HTML
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="https://cdn.ascoos.com/bootlib/css/bootlib.min.css">
</head>
<body class="dark-theme">
    <h1>Welcome to JML!</h1>
    <p>Lightweight markup for Ascoos OS.</p>
</body>
</html>

JML (left) produces exactly the same HTML (right) – with 17% fewer characters.

JML Studio and Generated Helper Code

DSL (Domain-Specific Language)
TAG html
  TAG head
    TAG meta CHARSET 'UTF-8'
    TAG link REL 'stylesheet' HREF 'https://cdn.ascoos.com/bootlib/css/bootlib.min.css'
  TAG body CLASS 'dark-theme'
    TAG h1
      TEXT 'Welcome to JML!'
    TAG p
      TEXT 'Lightweight markup for Ascoos OS.'
AST (Abstract Syntax Tree)
{
  "type": "group",
  "name": null,
  "value": null,
  "attributes": [],
  "children": [
    {
      "type": "tag",
      "name": "html",
      "value": null,
      "attributes": [],
      "children": [
        {
          "type": "tag",
          "name": "head",
          "value": null,
          "attributes": [],
          "children": [
            {
              "type": "tag",
              "name": "meta",
              "value": null,
              "attributes": [
                {
                  "type": "attribute",
                  "name": "charset",
                  "value": "UTF-8",
                  "attributes": [],
                  "children": []
                }
              ],
              "children": []
            },
            {
              "type": "tag",
              "name": "link",
              "value": null,
              "attributes": [
                {
                  "type": "attribute",
                  "name": "rel",
                  "value": "stylesheet",
                  "attributes": [],
                  "children": []
                },
                {
                  "type": "attribute",
                  "name": "href",
                  "value": "https://cdn.ascoos.com/bootlib/css/bootlib.min.css",
                  "attributes": [],
                  "children": []
                }
              ],
              "children": []
            }
          ]
        },
        {
          "type": "tag",
          "name": "body",
          "value": null,
          "attributes": [
            {
              "type": "attribute",
              "name": "class",
              "value": "dark-theme",
              "attributes": [],
              "children": []
            }
          ],
          "children": [
            {
              "type": "tag",
              "name": "h1",
              "value": null,
              "attributes": [],
              "children": [
                {
                  "type": "content",
                  "name": null,
                  "value": "Welcome to JML!",
                  "attributes": [],
                  "children": []
                }
              ]
            },
            {
              "type": "tag",
              "name": "p",
              "value": null,
              "attributes": [],
              "children": [
                {
                  "type": "content",
                  "name": null,
                  "value": "Lightweight markup for Ascoos OS.",
                  "attributes": [],
                  "children": []
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}

Both generated formats, the DSL (left) and the AST (right), are structured for WebAI usage.

Server-Side Rendering

<?php
/**
 * @ASCOOS-NAME        : Ascoos OS
 * @ASCOOS-VERSION     : 1.0.0
 * @ASCOOS-SUPPORT     : support@ascoos.com
 * @ASCOOS-BUGS        : https://issues.ascoos.com
 *
 * @CASE-STUDY          : jml_to_html_renderer.php
 * @fileNo              : ASCOOS-OS-CASESTUDY-SEC00268
 *
 * @desc Parses JML syntax into HTML using THTML, generates full page from nested structure.
 *
 * @since PHP 8.2.0
 */
declare(strict_types=1);
use ASCOOS\OS\Kernel\HTML\THTML;
use ASCOOS\OS\Kernel\Files\TFilesHandler;
$properties = [
    'output' => './generated_page.html'
];
try {
    $html = new THTML();
    $files = new TFilesHandler();
    // -----------------------------------------------------------------------------
    // JML as string.
    // -----------------------------------------------------------------------------
    $jmlString = <<<'JML'
html:lang('en') {
  head {
    meta:charset('UTF-8')
    meta:name('viewport'),content('width=device-width, initial-scale=1.0')
    title {`Advanced Sample Page`}
    style {
      `.container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
            background-color: #f4f4f4;
        }
        .header {
            text-align: center;
            color: #333;
            padding: 10px;
            border-bottom: 2px solid #000;
        }
        .form-group {
            margin-bottom: 15px;
        }
        .form-group label {
            display: block;
            font-weight: bold;
        }
        .form-group input, .form-group select {
            width: 100%;
            padding: 8px;
            margin-top: 5px;
        }`
    }
    script {
      `function validateForm() {
            let name = document.getElementById("name").value;
            let email = document.getElementById("email").value;
            if (name === "" || email === "") {
                alert("Please fill out all fields!");
                return false;
            }
            return true;
        }`
    }
  }
  body {
    div:class('container') {
      div:class('header') {
        h1 {`Welcome to Ascoos OS Demo`}
        p {`This is a complex demo with nested elements and interactivity.`}
      }
      div:class('content') {
        h2 {`User Registration`}
        form:onsubmit('return validateForm()'),method('POST'),action('/submit') {
          div:class('form-group') {
            label:for('name') {`Name:`}
            input:type('text'),id('name'),name('name'),required('')
          }
          div:class('form-group') {
            label:for('email') {`Email:`}
            input:type('email'),id('email'),name('email'),required('')
          }
          div:class('form-group') {
            label:for('country') {`Country:`}
            select:id('country'),name('country') {
              option:value('us') {`United States`}
              option:value('gr') {`Greece`}
              option:value('de') {`Germany`}
            }
          }
          button:type('submit') {`Submit`}
        }
        br
        div:class('footer') {
          p {`© 2025 Ascoos OS. All rights reserved.`}
          br
          a:href('https://ascoos.com') {`Visit our site`}
        }
      }
    }
  }
}
JML;
    $fullHtml = $html->fromJMLString($jmlString);
    $output = '' . $fullHtml;
    $files->writeToFileWithCheck($output, $properties['output']);
    echo "JML Parsed! Generated HTML:\n";
    echo $output . "\n";
    echo "Saved to: " . $properties['output'] . "\n";
    $html->Free();
    $files->Free();
} catch (Exception $e) {
    echo "Error: " . $e->getMessage() . "\n";
}
?>

With the PHP renderer, it generates HTML on-the-fly for dynamic sites without boilerplate.

Ascoos JML Renderer – Browser Extension

Install the lightweight extension and transform any webpage into JML-ready: client-side rendering with zero dependencies!

Full JML documents

Renders <script type="text/jml"> as a complete HTML document.

Inline JML blocks

Embedded <jml> ... </jml> inside existing HTML.

Support for void & nested tags

br, hr, img, input + nested blocks, attributes, multiline text.

Pure JS – No dependencies

Works on any page (local/remote), Manifest V3 compatible.

The extension is lightweight (26 KB), collects no data, and works instantly – ideal for developers who want to experiment with JML without setup.

Roadmap

2026: Conditionals, loops, semantic macros v2
2027: Export to Markdown/PDF + security profiles
2028+: Automatic authoring with Ascoos AI

Frequently Asked Questions

Is JML compatible with existing browsers?

Yes, through a renderer that produces clean HTML5. No browser changes are required.

How does JML handle scripts and styles?

It supports inline scripts/styles and external links, with built-in escaping for security.

Can I use it with frameworks like React?

Yes, through JML → JSX conversion or direct parsing into custom components.