Here you can find the source of jsonString(JsonValue value)
public static String jsonString(JsonValue value)
//package com.java2s; import javax.json.JsonString; import javax.json.JsonValue; public class Main { public static String jsonString(JsonValue value) { if (value == null || value.getValueType() == JsonValue.ValueType.NULL) return ""; if (value.getValueType() == JsonValue.ValueType.STRING && (value instanceof JsonString)) return ((JsonString) value).getString(); return ""; }//from w w w.ja va 2 s . c o m }