}
@Override
public JsonGenerator write(String name, JsonValue value) {
if (currentContext.scope != Scope.IN_OBJECT) {
throw new JsonGenerationException(
JsonMessages.GENERATOR_ILLEGAL_METHOD(currentContext.scope));
}
switch (value.getValueType()) {
case ARRAY:
JsonArray array = (JsonArray)value;