private void readObject() throws IOException {
        SourceLocation objectLocation = getSourceLocation();
        Object object = handler.startObject();
        read();
        if (++nestingLevel > MAX_NESTING_LEVEL) {
            throw error("Nesting too deep");
        }
        skipWhiteSpace();
        if (readChar('}')) {
            nestingLevel--;
            handler.endObject(object, objectLocation);
            return;
        }
        do {
            skipWhiteSpace();
            SourceLocation nameLocation = getSourceLocation();
            // handler.startObjectName(object);
            String name = readName();
            // handler.endObjectName(object, name);
            skipWhiteSpace();
            if (!readChar(':')) {
                throw expected("':'");
            }
            skipWhiteSpace();
            // handler.startObjectValue(object, name);
            readValue();
            handler.endObjectValue(object, name, nameLocation);
            skipWhiteSpace();
        } while (readChar(','));
        if (!readChar('}')) {
            throw expected("',' or '}'");
        }
        nestingLevel--;
        handler.endObject(object, objectLocation);
    }
Reads the entire input from the given reader and parses it as JSON. The input must contain a
valid JSON value, optionally padded with whitespace.
<p>
Characters are read in chunks into an input buffer of the given size. Hence, wrapping a reader
in an additional <code>BufferedReader</code> likely won't improve reading performance.
</p>

@param reader the reader to read the input from
@param buffersize the size of the input buffer in chars
@throws IOException if an I/O error occurs in the reader
@throws ModelSyntaxException if the input is not valid JSON
smithy-model/src/main/java/software/amazon/smithy/model/node/internal/JsonParser.java