}
@Override
public JsonGenerator write(String name, double value) {
if (currentContext.scope != Scope.IN_OBJECT) {
throw new JsonGenerationException(
JsonMessages.GENERATOR_ILLEGAL_METHOD(currentContext.scope));
}
if (Double.isInfinite(value) || Double.isNaN(value)) {
throw new NumberFormatException(JsonMessages.GENERATOR_DOUBLE_INFINITE_NAN());
}