@Override public boolean[] deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { if (!jp.isExpectedStartArrayToken()) { return handleNonArray(jp, ctxt); } ArrayBuilders.BooleanBuilder builder = ctxt.getArrayBuilders().getBooleanBuilder(); boolean[] chunk = builder.resetAndStart(); int ix = 0; while (jp.nextToken() != JsonToken.END_ARRAY) { // whether we should allow truncating conversions? boolean value = _parseBooleanPrimitive(jp, ctxt); if (ix >= chunk.length) { chunk = builder.appendCompletedChunk(chunk, ix); ix = 0; } chunk[ix++] = value; } return builder.completeAndClearBuffer(chunk, ix); }
@Override public boolean[] deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { if (!jp.isExpectedStartArrayToken()) { return handleNonArray(jp, ctxt); } ArrayBuilders.BooleanBuilder builder = ctxt.getArrayBuilders().getBooleanBuilder(); boolean[] chunk = builder.resetAndStart(); int ix = 0; while (jp.nextToken() != JsonToken.END_ARRAY) { // whether we should allow truncating conversions? boolean value = _parseBooleanPrimitive(jp, ctxt); if (ix >= chunk.length) { chunk = builder.appendCompletedChunk(chunk, ix); ix = 0; } chunk[ix++] = value; } return builder.completeAndClearBuffer(chunk, ix); }
@Override public boolean[] deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { if (!jp.isExpectedStartArrayToken()) { return handleNonArray(jp, ctxt); } ArrayBuilders.BooleanBuilder builder = ctxt.getArrayBuilders().getBooleanBuilder(); boolean[] chunk = builder.resetAndStart(); int ix = 0; while (jp.nextToken() != JsonToken.END_ARRAY) { // whether we should allow truncating conversions? boolean value = _parseBooleanPrimitive(jp, ctxt); if (ix >= chunk.length) { chunk = builder.appendCompletedChunk(chunk, ix); ix = 0; } chunk[ix++] = value; } return builder.completeAndClearBuffer(chunk, ix); }
@Override public boolean[] deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { if (!jp.isExpectedStartArrayToken()) { return handleNonArray(jp, ctxt); } ArrayBuilders.BooleanBuilder builder = ctxt.getArrayBuilders().getBooleanBuilder(); boolean[] chunk = builder.resetAndStart(); int ix = 0; while (jp.nextToken() != JsonToken.END_ARRAY) { // whether we should allow truncating conversions? boolean value = _parseBooleanPrimitive(jp, ctxt); if (ix >= chunk.length) { chunk = builder.appendCompletedChunk(chunk, ix); ix = 0; } chunk[ix++] = value; } return builder.completeAndClearBuffer(chunk, ix); }