Search in sources :

Example 1 with NamespaceMembershipListJson

use of org.eclipse.openvsx.json.NamespaceMembershipListJson in project openvsx by eclipse.

the class AdminAPITest method namespaceMemberJson.

private String namespaceMemberJson(Consumer<NamespaceMembershipListJson> content) throws JsonProcessingException {
    var json = new NamespaceMembershipListJson();
    content.accept(json);
    return new ObjectMapper().writeValueAsString(json);
}
Also used : NamespaceMembershipListJson(org.eclipse.openvsx.json.NamespaceMembershipListJson) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper)

Example 2 with NamespaceMembershipListJson

use of org.eclipse.openvsx.json.NamespaceMembershipListJson in project openvsx by eclipse.

the class UserAPITest method membershipsJson.

private String membershipsJson(Consumer<NamespaceMembershipListJson> content) throws JsonProcessingException {
    var json = new NamespaceMembershipListJson();
    json.namespaceMemberships = new ArrayList<>();
    content.accept(json);
    return new ObjectMapper().writeValueAsString(json);
}
Also used : NamespaceMembershipListJson(org.eclipse.openvsx.json.NamespaceMembershipListJson) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper)

Aggregations

ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)2 NamespaceMembershipListJson (org.eclipse.openvsx.json.NamespaceMembershipListJson)2