Package org.candlepin.resteasy

Examples of org.candlepin.resteasy.JsonProvider


        // we need a different mapper to write the output, one without our
        // schema hack module installed.
        // Let's just set it to pretty_print the output instead of having
        // to construct a configuration only to get a simple value.
        ObjectMapper mapper = new JsonProvider(true)
            .locateMapper(Object.class, MediaType.APPLICATION_JSON_TYPE);
        FileWriter jsonFile = new FileWriter(apiFile);
        try {
            mapper.writeValue(jsonFile, allApiCalls);
        }
View Full Code Here


public class CandlepinConnection {

    @Inject
    public CandlepinConnection(Configuration config) {
        ResteasyProviderFactory rpf = ResteasyProviderFactory.getInstance();
        JsonProvider jsonprovider = new JsonProvider(config);
        rpf.addMessageBodyReader(jsonprovider);
        rpf.addMessageBodyWriter(jsonprovider);
        RegisterBuiltin.register(rpf);
    }
View Full Code Here

TOP

Related Classes of org.candlepin.resteasy.JsonProvider

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.