All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dslplatform.json.parsers.AbstractJsObjParser Maven / Gradle / Ivy

package com.dslplatform.json.parsers;

import com.dslplatform.json.JsonReader;

import java.io.IOException;

abstract class AbstractJsObjParser extends AbstractParser {

    protected boolean isEmptyObj(final JsonReader reader) throws JsParserException {
        try {
            if (reader.last() != '{') throw reader.newParseError("Expecting '{' for map start");
            byte nextToken = reader.getNextToken();
            return nextToken == '}';
        } catch (IOException e) {
            throw new JsParserException(e.getMessage());
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy