APISonar


org.h2.value.Value.JSON

> org > h2 > value > Value > JSON
org APIs h2 APIs value APIs Value APIs JSON APIs

Example 1
public static void jsonObjectAppend(ByteArrayOutputStream baos, String key, Value value) {
        if (baos.size() > 1) {
            baos.write(',');
        }
        JSONByteArrayTarget.encodeString(baos, key).write(':');
        byte[] b = value.convertTo(Value.JSON).getBytesNoCopy();
        baos.write(b, 0, b.length);
    }
Example 2
public Value getValue(Value value) {
        switch (value.getValueType()) {
        case Value.NULL:
            return ValueJson.NULL;
        case Value.STRING:
        case Value.STRING_IGNORECASE:
        case Value.STRING_FIXED:
        case Value.CLOB:
            return ValueJson.fromJson(value.getString());
        default:
            return value.convertTo(Value.JSON);
        }
    }