code: public static String getString(JSONValue value) {
          if (value == null)
              return null;
          if (!(value instanceof JSONString))
              throw new JSONException(NOT_A_STRING);
          return ((JSONString)value).toString();
      }
docs: Get a {@link String} from a {@link JSONValue}.  Return {@code null} if the
  {@link JSONValue} is {@code null}.
  
  @param   value   the {@link JSONValue}
  @return  the value as a {@link String}
  @throws  JSONException if the value is not a string