Package javax.json

Examples of javax.json.JsonStructure


    @NotNull(message = "Issue is never NULL")
    public Issue create(
        @NotNull(message = "title can't be NULL") final String title,
        @NotNull(message = "body can't be NULL")final String body)
        throws IOException {
        final JsonStructure json = Json.createObjectBuilder()
            .add("title", title)
            .add("body", body)
            .build();
        return this.get(
            this.request.method(Request.POST)
View Full Code Here


    @NotNull(message = "label is never NULL")
    public Label create(
        @NotNull(message = "label name can't be NULL") final String name,
        @NotNull(message = "label color can't be NULL") final String color)
        throws IOException {
        final JsonStructure json = Json.createObjectBuilder()
            // @checkstyle MultipleStringLiterals (1 line)
            .add("name", name)
            .add("color", color)
            .build();
        this.request.method(Request.POST)
View Full Code Here

    @Override
    @NotNull(message = "Comment is never NULL")
    public Comment post(@NotNull(message = "post text can't be NULL")
        final String text) throws IOException {
        final JsonStructure json = Json.createObjectBuilder()
            .add("body", text)
            .build();
        return this.get(
            this.request.method(Request.POST)
                .body().set(json).back()
View Full Code Here

        final Map<String, String> config) throws IOException {
        final JsonObjectBuilder builder = Json.createObjectBuilder();
        for (final Map.Entry<String, String> entr : config.entrySet()) {
            builder.add(entr.getKey(), entr.getValue());
        }
        final JsonStructure json = Json.createObjectBuilder()
            .add("name", name)
            .add("config", builder)
            .build();
        return this.get(
            this.request.method(Request.POST)
View Full Code Here

    @Override
    public void merge(
        @NotNull(message = "message can't be NULL") final String msg)
        throws IOException {
        final JsonStructure json = Json.createObjectBuilder()
            .add("commit_message", msg)
            .build();
        this.request
            .uri().path("/merge").back()
            .body().set(json).back()
View Full Code Here

    @Override
    @NotNull(message = "GistComment is never NULL")
    public GistComment post(
        @NotNull(message = "text can't be NULL") final String text
    ) throws IOException {
        final JsonStructure json = Json.createObjectBuilder()
            .add("body", text)
            .build();
        return this.get(
            this.request.method(Request.POST)
                .body().set(json).back()
View Full Code Here

    @Override
    @NotNull(message = "milestone is never NULL")
    public Milestone create(
        @NotNull(message = "title can't be NULL") final String title)
        throws IOException {
        final JsonStructure json = Json.createObjectBuilder()
            .add("title", title)
            .build();
        return this.get(
            this.request.method(Request.POST)
                .body().set(json).back()
View Full Code Here

    @Override
    @NotNull(message = "Fork can't be NULL")
    public Fork create(
        @NotNull(message = "organization can't be NULL")
        final String organization) throws IOException {
        final JsonStructure json = Json.createObjectBuilder()
            .add("organization", organization)
            .build();
        return this.get(
            this.request.method(Request.POST)
                .body().set(json).back()
View Full Code Here

        final Iterable<String> labels) throws IOException {
        JsonArrayBuilder builder = Json.createArrayBuilder();
        for (final String label : labels) {
            builder = builder.add(label);
        }
        final JsonStructure json = builder.build();
        this.request.method(Request.POST)
            .body().set(json).back()
            .fetch()
            .as(RestResponse.class)
            .assertStatus(HttpURLConnection.HTTP_OK)
View Full Code Here

        final Iterable<String> labels) throws IOException {
        JsonArrayBuilder builder = Json.createArrayBuilder();
        for (final String label : labels) {
            builder = builder.add(label);
        }
        final JsonStructure json = builder.build();
        this.request.method(Request.PUT)
            .body().set(json).back()
            .fetch()
            .as(RestResponse.class)
            .assertStatus(HttpURLConnection.HTTP_OK)
View Full Code Here

TOP

Related Classes of javax.json.JsonStructure

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.