code: public static float getFloat(JSONValue value) {
          if (value == null)
              return 0;
          if (!(value instanceof Number))
              throw new JSONException(NOT_A_NUMBER);
          return ((Number)value).floatValue();
      }
docs: Get a {@code float} from a {@link JSONValue}.  Return 0 if the {@link JSONValue} is
  {@code null}.
  
  @param   value   the {@link JSONValue}
  @return  the value as a {@code float}
  @throws  JSONException if the value is not a number