use of jakarta.json.JsonObject in project zilla by aklivity.
the class SchemaTest method shouldValidateClientWhen.
@Test
public void shouldValidateClientWhen() {
JsonObject config = schema.validate("client.when.json");
assertThat(config, not(nullValue()));
}
use of jakarta.json.JsonObject in project zilla by aklivity.
the class SchemaTest method shouldValidateClient.
@Test
public void shouldValidateClient() {
JsonObject config = schema.validate("client.json");
assertThat(config, not(nullValue()));
}
use of jakarta.json.JsonObject in project zilla by aklivity.
the class SchemaTest method shouldValidateServer.
@Test
public void shouldValidateServer() {
JsonObject config = schema.validate("server.json");
assertThat(config, not(nullValue()));
}
use of jakarta.json.JsonObject in project zilla by aklivity.
the class SchemaTest method shouldValidateVault.
@Test
public void shouldValidateVault() {
JsonObject config = schema.validate("vault.json");
assertThat(config, not(nullValue()));
}
use of jakarta.json.JsonObject in project alias by JohT.
the class TypeReferenceEnhancer method adaptFromJson.
/**
* {@inheritDoc}
*/
@Override
@SuppressWarnings("unchecked")
public T adaptFromJson(JsonObject obj) throws Exception {
JsonObject original = Json.createObjectBuilder(obj).remove(FIELD_TYPE_REFERENCE).build();
Class<?> type = typeReferenceResolver.getTypeForReference(obj.getString(FIELD_TYPE_REFERENCE));
return (T) getJsonb().fromJson(original.toString(), type);
}
Aggregations