public JsonWriter endObject() {
        if (!context.map()) {
            throw new IllegalStateException("Unexpected end, not in object.");
        }
        if (context.value()) {
            throw new IllegalStateException("Expected map value but got end.");
        }
        writer.write('}');
        context = stack.pop();
        return this;
    }
public JsonWriter endObject ( ) { if ( ! context . map ( ) ) { throw new IllegalStateException ( "Unexpected end, not in object." ) ; } if ( context . value ( ) ) { throw new IllegalStateException ( "Expected map value but got end." ) ; } writer . write ( '}' ) ; context = stack . pop ( ) ; return this ; }
The the ongoing object.

@return The JSON Writer.