All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.stewseo.client.json.WithJson Maven / Gradle / Ivy

Go to download

java client to build api objects, handle http transport, and parse/deserialize/serialize json to/from json

There is a newer version: 1.8.0
Show newest version
package io.github.stewseo.client.json;


import jakarta.json.stream.JsonParser;

import java.io.InputStream;
import java.io.Reader;

public interface WithJson {

    default T withJson(InputStream input) {
        JsonpMapper mapper = SimpleJsonpMapper.INSTANCE_REJECT_UNKNOWN_FIELDS;
        return withJson(mapper.jsonProvider().createParser(input), mapper);
    }


    default T withJson(Reader input) {
        JsonpMapper mapper = SimpleJsonpMapper.INSTANCE_REJECT_UNKNOWN_FIELDS;
        return withJson(mapper.jsonProvider().createParser(input), mapper);
    }

    T withJson(JsonParser parser, JsonpMapper mapper);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy