code: private Boolean readOptionalBoolean(JSONValue val) {
  
          JSONBoolean b = null == val ? null : val.isBoolean();
          if (b != null) {
              return Boolean.valueOf(b.booleanValue());
          }
          return null;
      }
docs: Read an optional boolean value form a JSON value.
  @param val the JSON value that should represent the boolean.
  @return the boolean from the JSON or null if reading the boolean fails.