Package com.fasterxml.jackson.databind

Examples of com.fasterxml.jackson.databind.MappingJsonFactory


        public String guid = null;
        public String gateway = null;
    }
   
    protected void jsonToNetworkDefinition(String json, NetworkDefinition network) throws IOException {
        MappingJsonFactory f = new MappingJsonFactory();
        JsonParser jp;
       
        try {
            jp = f.createJsonParser(json);
        } catch (JsonParseException e) {
            throw new IOException(e);
        }
       
        jp.nextToken();
View Full Code Here


        String mac = null; // MAC Address
        String attachment = null; // Attachment name
    }
   
    protected void jsonToHostDefinition(String json, HostDefinition host) throws IOException {
        MappingJsonFactory f = new MappingJsonFactory();
        JsonParser jp;
       
        try {
            jp = f.createJsonParser(json);
        } catch (JsonParseException e) {
            throw new IOException(e);
        }
       
        jp.nextToken();
View Full Code Here

      throw new IllegalStateException("Only one WampConfigurer may exist");
    } else if (configurers.size() == 1) {
      configurer = configurers.iterator().next();
    }

    jsonFactory = new MappingJsonFactory(configurer.objectMapper());
  }
View Full Code Here

  @PostConstruct
  void postConstruct() {
    if (configurer == null) {
      configurer = new WampConfigurerAdapter();
      jsonFactory = new MappingJsonFactory(configurer.objectMapper());
    }
  }
View Full Code Here

     */
    protected void initJsonFactoryAndObjectMapper() throws NamingException {
        if (jsonFactoryLookup != null) {
            jsonFactory = InitialContext.doLookup(jsonFactoryLookup);
        } else {
            jsonFactory = new MappingJsonFactory();
        }
        objectMapper = (ObjectMapper) jsonFactory.getCodec();
        if (jsonFactoryFeatures != null) {
            NoMappingJsonFactoryObjectFactory.configureJsonFactoryFeatures(jsonFactory, jsonFactoryFeatures);
        }
View Full Code Here

        if (!directory.exists()) {
            directory.mkdirs();
        }
        this.job = job;
        this.coverallsFile = coverallsFile;
        this.generator = new MappingJsonFactory().createGenerator(coverallsFile, JsonEncoding.UTF8);
    }
View Full Code Here

     * @param fmJson The OFFlowMod in a JSON representation
     * @return The name of the OFFlowMod, null if not found
     * @throws IOException If there was an error parsing the JSON
     */
    public static String getEntryNameFromJson(String fmJson) throws IOException{
        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 The map of the storage entry
     * @throws IOException If there was an error parsing the JSON
     */
    public static Map<String, Object> jsonToStorageEntry(String fmJson) throws IOException {
        Map<String, Object> entry = new HashMap<String, Object>();
        MappingJsonFactory f = new MappingJsonFactory();
        JsonParser jp;
       
        try {
            jp = f.createJsonParser(fmJson);
        } catch (JsonParseException e) {
            throw new IOException(e);
        }
       
        jp.nextToken();
View Full Code Here

     * The copperegg_config.json file contains a specification for the metric groups and dashboards to be created / or updated.
     * Mandatory
     */
    public void read_config(InputStream in) throws Exception {

        JsonFactory f = new MappingJsonFactory();
        JsonParser jp = f.createJsonParser(in);

        JsonToken current;

        current = jp.nextToken();
        if (current != JsonToken.START_OBJECT) {
View Full Code Here

            }
        }
    }

    public String groupFind(String findName, String findIndex, Integer ExpectInt) throws Exception {
        JsonFactory f = new MappingJsonFactory();
        JsonParser jp = f.createJsonParser(findIndex);

        int count = 0;
        int foundit = 0;
        String Result = null;
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.