@Test public void testLibraryDeserialization() throws IOException { ReferenceLibrary library = BatfishObjectMapper.mapper() .readValue( readResource("org/batfish/referencelibrary/libraryTwoBooks.json", UTF_8), ReferenceLibrary.class); assertThat(library.getReferenceBooks(), hasSize(2)); }
@JsonProperty(PROP_BOOKS) @Nonnull public SortedSet<ReferenceBook> getReferenceBooks() { return _books; }
ReferenceLibrary { @JsonProperty(PROP_BOOKS) @Nonnull public SortedSet<ReferenceBook> getReferenceBooks() { return _books; } }
ReferenceLibrary { @JsonProperty(PROP_BOOKS) @Nonnull public SortedSet<ReferenceBook> getReferenceBooks() { return _books; } @JsonCreator  ReferenceLibrary(@JsonProperty(PROP_BOOKS) @Nullable List<ReferenceBook> books); }
ReferenceLibrary { @JsonProperty(PROP_BOOKS) @Nonnull public SortedSet<ReferenceBook> getReferenceBooks() { return _books; } @JsonCreator  ReferenceLibrary(@JsonProperty(PROP_BOOKS) @Nullable List<ReferenceBook> books); void delAddressBook(String bookName); @Override boolean equals(@Nullable Object o); @Nonnull Optional<ReferenceBook> getReferenceBook(String bookName); @JsonProperty(PROP_BOOKS) @Nonnull SortedSet<ReferenceBook> getReferenceBooks(); @Override int hashCode(); @Nonnull ReferenceLibrary mergeReferenceBooks(Collection<ReferenceBook> newBooks); }
ReferenceLibrary { @JsonProperty(PROP_BOOKS) @Nonnull public SortedSet<ReferenceBook> getReferenceBooks() { return _books; } @JsonCreator  ReferenceLibrary(@JsonProperty(PROP_BOOKS) @Nullable List<ReferenceBook> books); void delAddressBook(String bookName); @Override boolean equals(@Nullable Object o); @Nonnull Optional<ReferenceBook> getReferenceBook(String bookName); @JsonProperty(PROP_BOOKS) @Nonnull SortedSet<ReferenceBook> getReferenceBooks(); @Override int hashCode(); @Nonnull ReferenceLibrary mergeReferenceBooks(Collection<ReferenceBook> newBooks);  }