com.laamella:s-expressions-core

S-Expression support for Java

Лицензия

Лицензия

Группа

Группа

com.laamella
Идентификатор

Идентификатор

s-expressions-core
Последняя версия

Последняя версия

0.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

com.laamella:s-expressions-core
S-Expression support for Java

Скачать s-expressions-core

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.laamella/s-expressions-core/ -->
<dependency>
    <groupId>com.laamella</groupId>
    <artifactId>s-expressions-core</artifactId>
    <version>0.2</version>
</dependency>
// https://jarcasting.com/artifacts/com.laamella/s-expressions-core/
implementation 'com.laamella:s-expressions-core:0.2'
// https://jarcasting.com/artifacts/com.laamella/s-expressions-core/
implementation ("com.laamella:s-expressions-core:0.2")
'com.laamella:s-expressions-core:jar:0.2'
<dependency org="com.laamella" name="s-expressions-core" rev="0.2">
  <artifact name="s-expressions-core" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.laamella', module='s-expressions-core', version='0.2')
)
libraryDependencies += "com.laamella" % "s-expressions-core" % "0.2"
[com.laamella/s-expressions-core "0.2"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
io.javaslang : javaslang jar 2.0.2

test (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12

Модули Проекта

Данный проект не имеет модулей.

s-expressions library for Java

S-Expressions are a very simple, very flexible data format. It describes tree structures, or in this case: lists of lists or strings.

Goals

Have a simple, efficient format for...

  • data transfer
  • configuration files
  • object serialization

Additionally, make the API flexible enough to support other use cases, like implementing a Lisp.

Examples

Sample for serialization

TODO

Sample for configuration files

A simple configuration file reader is supplied. It can read the following kind of property files:

; Sample config file
; At the lowest level, we have a key->value mapping
(key value)
(keys-dont-have-spaces but the values can have spaces. All    whitespace    is turned into a single space.)
(but! "when you quote a value, spaces    are     retained")
(my-value-is-an-empty-string)

; Here we have a hierarchy.
(application
  (window
     (width 320)
     (height 200)
     (x 100)
     (y 100))
  (name Hello World!))

It can be read as if it were a .properties file:

SProperties properties = new SProperties();
properties.load("/config.s");

properties.get("application.window.height").ifPresent(System.out::println);

for (Map.Entry<String, String> e : properties) {
    System.out.println(e.getKey() + "->" + e.getValue());
}

Sample for data storage

TODO

com.laamella

Laamella Gad

Версии библиотеки

Версия
0.2