Skip to content
Switch branches/tags
This branch is up to date with develop.

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

SDLang (Simple Declarative Language) for Java

Java CI 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 for v2 are available from Maven Central under the com.singingbush groupid (as v2 was [singingbush]'s fork of v1):


The v2 repo has been transferred to the sdlang-dev github organisation so that continued development and a planned v3 can be worked on as a joint effort. For now v2 releases will continue with the same groupId and artifactId. The next major release will likely be under a new groupId.


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


SDL (Simple Declarative Language) for java




No packages published