Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › Coders Lounge › KTON - Object notation in pure Kotlin!

KTON - Object notation in pure Kotlin!

Posts 1–2 of 2 · Page 1 of 1
canown
canown
KTON - Object notation in pure Kotlin!
****** repository: https://******.com/Jire/KTON

KTON
Object notation in pure Kotlin!

This library is licensed under GLP 3.0.

---

KTON allows you to notate objects in an easy syntax using pure Kotlin. This is mostly a toy project but it may be useful for certain cases. I'd like to make conversion to JSON and provide more advanced features.

The following shows the differences between JSON, XML, and KTON. (Data used from http://json.org/example.html )

JSON:
Code:
{
    "menu": {
        "id": "file",
        "value": "File",
        "popup": {
            "menuitem": [
                { "value": "New", "onclick": "CreateNewDoc()" },
                { "value": "Open", "onclick": "OpenDoc()" },
                { "value": "Close", "onclick": "CloseDoc()" }
            ]
        }
    }
}
XML:
Code:
<menu id="file" value="File">
    <popup>
        <menuitem value="New" onclick="CreateNewDoc()" />
        <menuitem value="Open" onclick="OpenDoc()" />
        <menuitem value="Close" onclick="CloseDoc()" />
    </popup>
</menu>
KTON:
Code:
val menu = kton {
    "id".."file"
    "value".."File"
    "popup" {
        "menuitem" {
            arr { "value".."New"; "onclick".."CreateNewDoc()" }
            arr { "value".."Open"; "onclick".."OpenDoc()" }
            arr { "value".."Close"; "onclick".."CloseDoc()" }
        }
    }
}
---

Accessing data from a KTON is done with concise syntax. Using the above example...

Value access through get operator:

menu["id"] => "file", menu["value"] => "File"

Body access through invoke operator:

val popup = menu("popup"), val menuitems = popup("menuitem")

Array access through get operator specifying index:

menuitems[0]["value"] => "New", menuitems[3]["onclick"] => "CloseDoc()"
#1 · 10y ago
HK
hkKenshin
Very interesting.
I like the idea, good job.
#2 · 10y ago
Posts 1–2 of 2 · Page 1 of 1

Post a Reply

Similar Threads

  • Jeremy (Pure Pwnage) - Enigma.By The_Enigma in Art & Graphic Design
    4Last post 19y ago
  • need a pure rs fileBy masoudmasoud in Hack Requests
    0Last post 19y ago
  • selling lvl 49 pures!!!!!By tarty67 in Trade Accounts/Keys/Items
    2Last post 19y ago
  • sellin RS2 str/mage pureBy m164life in Trade Accounts/Keys/Items
    1Last post 19y ago
  • [trade] im trading a lvl 40 pure str runescape accountBy famasgunner831 in WarRock - International Hacks
    2Last post 19y ago

Tags for this Thread

#java#jire#json#kotlin#kton