Skip to content
/ adn Public

The best data serialization format is a modified version of edn.

License

Notifications You must be signed in to change notification settings

Amplus2/adn

Repository files navigation

adn

The best data serialization format is a modified version of edn.

We have a very brief spec and an almost complete implementation.

Usage

To use the adn Reference Implementation, you just have to put it in your include path and include it, then you can make use of the Lexer and Parser:

#include <adn.hh>
#include <cassert>
#include <iostream>

int main() {
    auto tokens = Adn::Lexer::Lex(U"(1 2 3)");
    auto elements = Adn::Parser::Parse(tokens);
    for(auto list : elements) {
        assert(list.type == Adn::Parser::List);
        for(auto element : list.vec) {
            assert(element.type == Adn::Parser::Int);
            std::cout << element.i << std::endl;
        }
    }
    return 0;
}
c++ -I/path/to/adn example.cc -o example
./example
1
2
3

About

The best data serialization format is a modified version of edn.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published