Example usage for io.vertx.sqlclient Tuple JSON_NULL

List of usage examples for io.vertx.sqlclient Tuple JSON_NULL

Introduction

In this page you can find the example usage for io.vertx.sqlclient Tuple JSON_NULL.

Prototype

Object JSON_NULL

To view the source code for io.vertx.sqlclient Tuple JSON_NULL.

Click Source Link

Document

The JSON null literal value.

Usage

From source file:examples.MySQLClientExamples.java

public void jsonExample() {

    // Create a tuple
    Tuple tuple = Tuple.of(Tuple.JSON_NULL, new JsonObject().put("foo", "bar"), 3);

    // Retrieving json
    Object value = tuple.getValue(0); // Expect JSON_NULL

    ///*w  ww. j av a2s .c om*/
    value = tuple.get(JsonObject.class, 1); // Expect JSON object

    //
    value = tuple.get(Integer.class, 2); // Expect 3
    value = tuple.getInteger(2); // Expect 3
}