Skip to content
This repository was archived by the owner on Jan 20, 2025. It is now read-only.
This repository was archived by the owner on Jan 20, 2025. It is now read-only.

Can not serialize guava Iterables #46

@cowtowncoder

Description

@cowtowncoder

(moved from FasterXML/jackson-databind#517 reported by @chisui)


In 2.4.1.3 this works

new ObjectMapper().writeValueAsString(new Iterable<Integer>() {
  @Override
  public Iterator<Integer> iterator() {
    return ImmutableList.of(1, 2, 3).iterator();
  }
});

but this doesn't.

new ObjectMapper().writeValueAsString(Iterables.limit(Iterables.cycle(1,2,3), 3));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions