Skip to content
SDL (Simple Declarative Language) for java
Branch: develop
Clone or download
Pull request Compare This branch is 64 commits ahead, 4 commits behind ikayzo:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

SDLang (Simple Declarative Language) for Java

Build Status Maven Central Javadocs Coverage Status

SDLang is a simple and concise way to textually represent data. It has an XML-like structure – tags, values and attributes – which makes it a versatile choice for data serialization, configuration files, or declarative languages. Its syntax was inspired by the C family of languages (C/C++, C#, D, Java, …).

Adding the dependency to your project

Releases are available from Maven Central



To parse an SDL file simply create an InputStreamReader and pass it into the constructor of Parser:

final InputStream inputStream = new FileInputStream("c:\\data\\myfile.sdl");
final Reader inputStreamReader = new InputStreamReader(inputStream, "UTF-8");
final List<Tag> tags = new Parser(inputStreamReader).parse();

To write SDL from Java objects:

final Tag tag = SDL.tag("thing")
    .withComment("This text will precede the 'my:thing' when serialised")
        .withComment("child tags can also have comments")
        .withValues(SDL.value(, SDL.value("some text"))
    .withAttribute("flt", SDL.value(0.0f))
    .withAttribute("lng", SDL.value(1_000L))

Forked from ikayzo/SDL:

This code was originally dumped in github in May 2011 with a single commit message stating that it was migrated from svn.

Since then there's been no activity in that repository and it seems that issues are ignored. Even the URL for documentation is broken.

As the project appears to be abandoned I've forked it with the goal of

  • Adding more unit tests
  • Enabling continuous integration using
  • Reporting on Test Coverage using
  • Fixing existing bugs
  • Overhaul the project and start rewriting the codebase
  • Publish build artifacts to maven central

Daniel Leuck, the original author, licensed the source as LGPL v2.1

You can’t perform that action at this time.