private Map<String, Object> parseObject() throws IOException {
        final Map<String, Object> object = new LinkedHashMap<>();

        firstChar: switch (nextNonBlankspace()) {
            // If the map should be closed with no entries:
            case 0x7D : // } (close the map)
                return object;

            // If this character begins a new entry
            case 0x22 : // " (begin key)

                final CloseMethod close = parseEntryInto(object);
                switch (close) {
                    case EXIT_FROM_PARENT :
                        if (character == 0x7D) { // }
                            return object;
                        } else {
                            throw unexpectedCharacterException();
                        }

                    case CONTINUE_IN_PARENT :
                        break firstChar;

                    case NOT_DECIDED :
                        switch (nextNonBlankspace()) {
                            case 0x2C : // , (continue with next entry)
                                break firstChar;
                            case 0x7D : // } (close the map)
                                return object;
                            default :
                                throw unexpectedCharacterException();
                        }
                    default :
                        throw new IllegalStateException(
                            UNKNOWN_ENUM_CONSTANT + close + "'."
                        );
                }

            // If the first non-whitespace character was not neither
            // a '}' nor a '"':
            default :
                throw unexpectedCharacterException();
        }

        // Parse each remaining entry
        while ((nextNonBlankspace()) == 0x22) { // "
            final CloseMethod close = parseEntryInto(object);

            switch (close) {
                case EXIT_FROM_PARENT:
                    if (character == 0x7D) { // }
                        return object;
                    } else {
                        throw unexpectedCharacterException();
                    }

                case CONTINUE_IN_PARENT:
                    continue;

                case NOT_DECIDED:
                    switch (nextNonBlankspace()) {
                        case 0x2C: // , (continue with next entry)
                            continue;
                        case 0x7D: // } (close the map)
                            return object;
                        default:
                            throw unexpectedCharacterException();
                    }
                default:
                    throw new IllegalStateException(
                        UNKNOWN_ENUM_CONSTANT + close + "'."
                    );
            }
        }
        
        throw unexpectedCharacterException();
    }
Internal class that parses a stream of JSON characters into an object
representation.
<p>
This implementation includes a line and column counter that makes it easier
to debug an erroneous JSON string. These might add additional overhead to the
parsing time and should therefore only be used if the input is expected to
have errors.

@author Emil Forslund
@since  1.0.0
common-parent/json/src/main/java/com/speedment/common/json/internal/JsonDeserializer.java