avaje/avaje-jsonb

Stream support, processing as Stream<MyBean> etc

Closed this issue · 0 comments

Supports ARRAY content or x-json-stream "new line delimited" content.

  Jsonb jsonb = Jsonb.newBuilder().build();
  JsonType<MyBasic> type = jsonb.type(MyBasic.class);

  try (JsonReader reader = jsonb.reader(newLineDelimitedJson)) {
      Stream<MyBasic> asStream = type.stream(reader);
      asStream.forEach(...);
  }