Fruit

screenshot of Fruit

Fruit for Html just like Gson for Json.

Overview

Fruit is an innovative Java library designed to simplify the process of converting HTML into Java objects, much like Gson does for JSON. Built on the robust foundation of jsoup, Fruit offers developers an efficient and intuitive way to parse HTML documents and extract data with ease. This library caters to developers looking to seamlessly navigate the complexities of HTML data extraction while adhering to straightforward coding conventions.

What sets Fruit apart is its user-friendly annotation system, which allows developers to map HTML elements directly to Java object fields. By utilizing simple "Pick" annotations, users can specify CSS-like selectors to extract information without the unnecessary complexity often associated with HTML parsing. With its inspiration drawn from Google’s Gson and a focus on practical application, Fruit is poised to become a valuable tool for Java developers dealing with HTML data.

Features

  • Easy Annotation Usage: Use the "Pick" annotation to effortlessly map HTML elements to Java object fields.
  • CSS-like Selectors: Specify elements using familiar CSS-like selectors, making it intuitive for web developers.
  • Optional Field Customization: The "Pick" annotation allows for customization beyond just text, including attributes like src and href.
  • Powered by jsoup: Utilizes the powerful jsoup library for parsing HTML, ensuring reliability and performance.
  • JUnit Test Ready: Comes with detailed JUnit test codes that demonstrate functionality and ensure quality.
  • Open Source Licensing: Licensed under the Apache License 2.0, offering flexibility and ease of use for developers.
  • Community Usage: Adopted by applications like V2er, showcasing its practical application in real-world code bases.