![JAR search and dependency download from the Maven repository](/logo.png)
com.lordofthejars.nosqlunit.marklogic.content.JsonContent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nosqlunit-marklogic Show documentation
Show all versions of nosqlunit-marklogic Show documentation
NoSQLUnit adapter for MarkLogic
The newest version!
package com.lordofthejars.nosqlunit.marklogic.content;
import com.fasterxml.jackson.databind.JsonNode;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import static java.nio.charset.StandardCharsets.UTF_8;
public class JsonContent extends Content {
private JsonNode data;
public JsonContent() {
}
public JsonContent(JsonNode data) {
this.data = data;
}
public JsonContent(String uri, JsonNode data) {
this(data);
setUri(uri);
}
@Override
public InputStream content() {
return new ByteArrayInputStream(data.toString().getBytes(UTF_8));
}
@Override
public JsonNode getData() {
return data;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy