io.github.ralfspoeth.json.JsonString Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of json Show documentation
Show all versions of json Show documentation
This project implements a JSON parser and serializer
which operates around immutable data structures for
the JSON elements.
The newest version!
package io.github.ralfspoeth.json;
import java.util.Objects;
public record JsonString(String value) implements Basic {
public JsonString {
value = Objects.requireNonNullElse(value, "");
}
@Override
public String json() {
return "\"%s\"".formatted(value);
}
}