Package com.fasterxml.jackson.databind

Examples of com.fasterxml.jackson.databind.MappingJsonFactory


    }

    private DocumentSource createDocumentSource() {
        final InputStream inputStream = _resource.read();
        try {
            final MappingJsonFactory jsonFactory = new MappingJsonFactory();
            final JsonParser parser = jsonFactory.createParser(inputStream);
            logger.debug("Created JSON parser for resource: {}", _resource);

            return new JsonDocumentSource(parser, _resource.getName());
        } catch (Exception e) {
            FileHelper.safeClose(inputStream);
View Full Code Here


    /**
     * Initializes {@code jsonFactory} field, which may be instantiated or obtained from other part of the application.
     * This method also configures the {@code jsonFactory} properly.
     */
    protected void initJsonFactory() {
        jsonFactory = new MappingJsonFactory();
        if (jsonFactoryFeatures != null) {
            for (final Map.Entry<String, String> e : jsonFactoryFeatures.entrySet()) {
                final String key = e.getKey();
                final String value = e.getValue();
                final JsonFactory.Feature feature;
View Full Code Here

            super( message );
        }
    }

    public RestJiraDownloader() {
        jsonFactory = new MappingJsonFactory(  );
        //2012-07-17T06:26:47.723-0500
        dateFormat = new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ss.SSSZ" );
        resolvedFixVersionIds = new ArrayList<String>(  );
        resolvedStatusIds = new ArrayList<String>(  );
        resolvedComponentIds = new ArrayList<String>(  );
View Full Code Here

        }
    }

    public RestJiraDownloader()
    {
        jsonFactory = new MappingJsonFactory(  );
        //2012-07-17T06:26:47.723-0500
        dateFormat = new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ss.SSSZ" );
        resolvedFixVersionIds = new ArrayList<String>(  );
        resolvedStatusIds = new ArrayList<String>(  );
        resolvedComponentIds = new ArrayList<String>(  );
View Full Code Here

        return lbs.removeMember(memberId);
    }

    protected LBMember jsonToMember(String json) throws IOException {
        MappingJsonFactory f = new MappingJsonFactory();
        JsonParser jp;
        LBMember member = new LBMember();
       
        try {
            jp = f.createJsonParser(json);
        } catch (JsonParseException e) {
            throw new IOException(e);
        }
       
        jp.nextToken();
View Full Code Here

    protected LBVip jsonToVip(String json) throws IOException {
       
        if (json==null) return null;
       
        MappingJsonFactory f = new MappingJsonFactory();
        JsonParser jp;
        LBVip vip = new LBVip();
       
        try {
            jp = f.createJsonParser(json);
        } catch (JsonParseException e) {
            throw new IOException(e);
        }
       
        jp.nextToken();
View Full Code Here

     * @return The subnet mask
     * @throws IOException If there was an error parsing the JSON
     */
    public static String jsonExtractSubnetMask(String fmJson) throws IOException {
        String subnet_mask = "";
        MappingJsonFactory f = new MappingJsonFactory();
        JsonParser jp;

        try {
            jp = f.createJsonParser(fmJson);
        } catch (JsonParseException e) {
            throw new IOException(e);
        }

        jp.nextToken();
View Full Code Here

    }

    protected LBPool jsonToPool(String json) throws IOException {
        if (json==null) return null;

        MappingJsonFactory f = new MappingJsonFactory();
        JsonParser jp;
        LBPool pool = new LBPool();
       
        try {
            jp = f.createJsonParser(json);
        } catch (JsonParseException e) {
            throw new IOException(e);
        }
       
        jp.nextToken();
View Full Code Here

     * @throws IOException If there was an error parsing the JSON
     */

    public static FirewallRule jsonToFirewallRule(String fmJson) throws IOException {
        FirewallRule rule = new FirewallRule();
        MappingJsonFactory f = new MappingJsonFactory();
        JsonParser jp;

        try {
            jp = f.createJsonParser(fmJson);
        } catch (JsonParseException e) {
            throw new IOException(e);
        }

        jp.nextToken();
View Full Code Here

        return lbs.removeMonitor(monitorId);
    }

    protected LBMonitor jsonToMonitor(String json) throws IOException {
        MappingJsonFactory f = new MappingJsonFactory();
        JsonParser jp;
        LBMonitor monitor = new LBMonitor();
       
        try {
            jp = f.createJsonParser(json);
        } catch (JsonParseException e) {
            throw new IOException(e);
        }
       
        jp.nextToken();
View Full Code Here

TOP

Related Classes of com.fasterxml.jackson.databind.MappingJsonFactory

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.