Example usage for io.vertx.core.json JsonObject remove

List of usage examples for io.vertx.core.json JsonObject remove

Introduction

In this page you can find the example usage for io.vertx.core.json JsonObject remove.

Prototype

public Object remove(String key) 

Source Link

Document

Remove an entry from this object.

Usage

From source file:org.hawkular.apm.examples.vertx.opentracing.common.VertxMessageExtractAdapter.java

License:Apache License

public VertxMessageExtractAdapter(final JsonObject obj) {
    // Convert to single valued map
    this.map = new HashMap<>();

    JsonObject header = obj.getJsonObject("_apmHeader");
    if (header != null) {
        header.forEach(entry -> map.put(entry.getKey(), entry.getValue().toString()));
        // Remove header
        obj.remove("_apmHeader");
    }/*w  w w .  ja va2 s. c  o  m*/
}

From source file:org.hawkular.apm.examples.vertx.opentracing.common.VertxMessageInjectAdapter.java

License:Apache License

public static void cleanup(JsonObject obj) {
    obj.remove("_apmHeader");
}