public boolean readBoolean(InputStream in) throws ConversionException, IOException {
        JSONArray json = parseArray(in);
        if (json.size() != 1) {
            throwConversionException("readBoolean() expects one item in the array: [ true | false ].", json);
        }
        return readBooleanInternal(json.get(0));
    }
public boolean readBoolean ( InputStream in ) throws ConversionException , IOException { JSONArray json = parseArray ( in ) ; if ( json . size ( ) != 1 ) { throwConversionException ( "readBoolean() expects one item in the array: [ true | false ]." , json ) ; } return readBooleanInternal ( json . get ( 0 ) ) ; }
Decode a JSON document to retrieve an boolean value.

@param in The stream to read JSON from
@return The decoded boolean value
@throws ConversionException If JSON uses unexpected structure/format
@throws IOException If an I/O error occurs or if JSON is ill-formed.
@see #writeInt(OutputStream, int)