moshi:解析来自 okhttp3 的 json 响应

moshi: parsing a json response from okhttp3

{
  "query": {
    "project": "all",
    "images": [
      "dc5f659df9a4bcf90fc109830564d821"
    ],
    "organs": [
      "leaf"
    ],
    "includeRelatedImages": true
  },
  "language": "en",
  "preferedReferential": "the-plant-list",
  "bestMatch": "Hibiscus rosa-sinensis L.",
  "results": [
    {
      "score": 0.92912,
      "species": {
        "scientificNameWithoutAuthor": "Hibiscus rosa-sinensis",
        "scientificNameAuthorship": "L.",
        "genus": {
          "scientificNameWithoutAuthor": "Hibiscus",
          "scientificNameAuthorship": "",
          "scientificName": "Hibiscus"
        },
        "family": {
          "scientificNameWithoutAuthor": "Malvaceae",
          "scientificNameAuthorship": "",
          "scientificName": "Malvaceae"
        },
        "commonNames": [
          "Hawaiian hibiscus",
          "Hibiscus",
          "Chinese hibiscus"
        ],
        "scientificName": "Hibiscus rosa-sinensis L."
      },
      "images": [
        {
          "organ": "leaf",
          "author": "Tela Botanica − Antoine AFFOUARD",
          "license": "cc-by-sa",
          "date": {
            "timestamp": 1413870558000,
            "string": "October 21, 2014"
          },
          "url": {
            "o": "https://bs.plantnet.org/image/o/1d562e3be39e3297e6bdcff60d5f7d3fabe04eef",
            "m": "https://bs.plantnet.org/image/m/1d562e3be39e3297e6bdcff60d5f7d3fabe04eef",
            "s": "https://bs.plantnet.org/image/s/1d562e3be39e3297e6bdcff60d5f7d3fabe04eef"
          },
          "citation": "Tela Botanica − Antoine AFFOUARD / Pl@ntNet, cc-by-sa"
        },
        {
          "organ": "leaf",
          "author": "Antonio Sánchez Morales",
          "license": "cc-by-sa",
          "date": {
            "timestamp": 1548682043000,
            "string": "January 28, 2019"
          },
          "url": {
            "o": "https://bs.plantnet.org/image/o/3abd84f086c90ed70306d950532f4e165f681bfe",
            "m": "https://bs.plantnet.org/image/m/3abd84f086c90ed70306d950532f4e165f681bfe",
            "s": "https://bs.plantnet.org/image/s/3abd84f086c90ed70306d950532f4e165f681bfe"
          },
          "citation": "Antonio Sánchez Morales / Pl@ntNet, cc-by-sa"
        },
        {
          "organ": "leaf",
          "author": "femenia mayra",
          "license": "cc-by-sa",
          "date": {
            "timestamp": 1601041463219,
            "string": "September 25, 2020"
          },
          "url": {
            "o": "https://bs.plantnet.org/image/o/caa5ddc33d4b0b482b8c9f8ff8e0ba850d9af07f",
            "m": "https://bs.plantnet.org/image/m/caa5ddc33d4b0b482b8c9f8ff8e0ba850d9af07f",
            "s": "https://bs.plantnet.org/image/s/caa5ddc33d4b0b482b8c9f8ff8e0ba850d9af07f"
          },
          "citation": "femenia mayra / Pl@ntNet, cc-by-sa"
        },
        {
          "organ": "leaf",
          "author": "Antonio Sánchez Morales",
          "license": "cc-by-sa",
          "date": {
            "timestamp": 1544800115000,
            "string": "December 14, 2018"
          },
          "url": {
            "o": "https://bs.plantnet.org/image/o/8e2c190839ebbb1bb6ab7dd26cc413bb001080f4",
            "m": "https://bs.plantnet.org/image/m/8e2c190839ebbb1bb6ab7dd26cc413bb001080f4",
            "s": "https://bs.plantnet.org/image/s/8e2c190839ebbb1bb6ab7dd26cc413bb001080f4"
          },
          "citation": "Antonio Sánchez Morales / Pl@ntNet, cc-by-sa"
        },
        {
          "organ": "leaf",
          "author": "ire110",
          "license": "cc-by-sa",
          "date": {
            "timestamp": 1599948160933,
            "string": "September 12, 2020"
          },
          "url": {
            "o": "https://bs.plantnet.org/image/o/394caf62b3ce20c47f005d425488806f138a8493",
            "m": "https://bs.plantnet.org/image/m/394caf62b3ce20c47f005d425488806f138a8493",
            "s": "https://bs.plantnet.org/image/s/394caf62b3ce20c47f005d425488806f138a8493"
          },
          "citation": "ire110 / Pl@ntNet, cc-by-sa"
        },
        {
          "organ": "leaf",
          "author": "Andreas Vogelsinger",
          "license": "cc-by-sa",
          "date": {
            "timestamp": 1579618800636,
            "string": "January 21, 2020"
          },
          "url": {
            "o": "https://bs.plantnet.org/image/o/cc9f39d17007bb5fd36b890cf0043a0a683352be",
            "m": "https://bs.plantnet.org/image/m/cc9f39d17007bb5fd36b890cf0043a0a683352be",
            "s": "https://bs.plantnet.org/image/s/cc9f39d17007bb5fd36b890cf0043a0a683352be"
          },
          "citation": "Andreas Vogelsinger / Pl@ntNet, cc-by-sa"
        }
      ],
      "gbif": {
        "id": "3152559"
      }
    },
    {
      "score": 0.03652,
      "species": {
        "scientificNameWithoutAuthor": "Hibiscus schizopetalus",
        "scientificNameAuthorship": "(Dyer) Hook.f.",
        "genus": {
          "scientificNameWithoutAuthor": "Hibiscus",
          "scientificNameAuthorship": "",
          "scientificName": "Hibiscus"
        },
        "family": {
          "scientificNameWithoutAuthor": "Malvaceae",
          "scientificNameAuthorship": "",
          "scientificName": "Malvaceae"
        },
        "commonNames": [
          "Campanilla",
          "Chinese lantern",
          "Japanese hibiscus"
        ],
        "scientificName": "Hibiscus schizopetalus (Dyer) Hook.f."
      },
      "images": [
        {
          "organ": "leaf",
          "author": "nanni pri",
          "license": "cc-by-sa",
          "date": {
            "timestamp": 1619808048797,
            "string": "April 30, 2021"
          },
          "url": {
            "o": "https://bs.plantnet.org/image/o/4ca16c7045b6b2e56cbbc0f4afed08ddc3f556f7",
            "m": "https://bs.plantnet.org/image/m/4ca16c7045b6b2e56cbbc0f4afed08ddc3f556f7",
            "s": "https://bs.plantnet.org/image/s/4ca16c7045b6b2e56cbbc0f4afed08ddc3f556f7"
          },
          "citation": "nanni pri / Pl@ntNet, cc-by-sa"
        },
        {
          "organ": "leaf",
          "author": "sharlaine bustamants",
          "license": "cc-by-sa",
          "date": {
            "timestamp": 1591247217009,
            "string": "June 4, 2020"
          },
          "url": {
            "o": "https://bs.plantnet.org/image/o/c4722a732fef3bfd1eab6d6d80b500bb036e5215",
            "m": "https://bs.plantnet.org/image/m/c4722a732fef3bfd1eab6d6d80b500bb036e5215",
            "s": "https://bs.plantnet.org/image/s/c4722a732fef3bfd1eab6d6d80b500bb036e5215"
          },
          "citation": "sharlaine bustamants / Pl@ntNet, cc-by-sa"
        },
        {
          "organ": "leaf",
          "author": "Hugo SANTACREU",
          "license": "cc-by-sa",
          "date": {
            "timestamp": 1531233524000,
            "string": "July 10, 2018"
          },
          "url": {
            "o": "https://bs.plantnet.org/image/o/3ddba92c55e30e0cb70b10feb1cd021190dfec76",
            "m": "https://bs.plantnet.org/image/m/3ddba92c55e30e0cb70b10feb1cd021190dfec76",
            "s": "https://bs.plantnet.org/image/s/3ddba92c55e30e0cb70b10feb1cd021190dfec76"
          },
          "citation": "Hugo SANTACREU / Pl@ntNet, cc-by-sa"
        },
        {
          "organ": "leaf",
          "author": "Pierre Bonnet",
          "license": "cc-by-sa",
          "date": {
            "timestamp": 1534366939000,
            "string": "August 15, 2018"
          },
          "url": {
            "o": "https://bs.plantnet.org/image/o/f68ad5f10d76837924537d560cbb62b6cb4003c5",
            "m": "https://bs.plantnet.org/image/m/f68ad5f10d76837924537d560cbb62b6cb4003c5",
            "s": "https://bs.plantnet.org/image/s/f68ad5f10d76837924537d560cbb62b6cb4003c5"
          },
          "citation": "Pierre Bonnet / Pl@ntNet, cc-by-sa"
        },
        {
          "organ": "leaf",
          "author": "Tobias Jacobsen",
          "license": "cc-by-sa",
          "date": {
            "timestamp": 1571130043838,
            "string": "October 15, 2019"
          },
          "url": {
            "o": "https://bs.plantnet.org/image/o/44da8a021cfe8dcc1004a2998ff13982cce545f3",
            "m": "https://bs.plantnet.org/image/m/44da8a021cfe8dcc1004a2998ff13982cce545f3",
            "s": "https://bs.plantnet.org/image/s/44da8a021cfe8dcc1004a2998ff13982cce545f3"
          },
          "citation": "Tobias Jacobsen / Pl@ntNet, cc-by-sa"
        },
        {
          "organ": "leaf",
          "author": "abderrahim Lamari",
          "license": "cc-by-sa",
          "date": {
            "timestamp": 1619785453625,
            "string": "April 30, 2021"
          },
          "url": {
            "o": "https://bs.plantnet.org/image/o/e669d09a54681d3d56fabfb588d3ecb50b523490",
            "m": "https://bs.plantnet.org/image/m/e669d09a54681d3d56fabfb588d3ecb50b523490",
            "s": "https://bs.plantnet.org/image/s/e669d09a54681d3d56fabfb588d3ecb50b523490"
          },
          "citation": "abderrahim Lamari / Pl@ntNet, cc-by-sa"
        }
      ],
      "gbif": {
        "id": "9064581"
      }
    }
  ],
  "version": "2022-02-14 (5.0)",
  "remainingIdentificationRequests": 491
}

我得到这个 JSON 对象作为 OkHttp3 POST 请求的响应。我的目标是获取名为 results 的 JSON 数组中的内容并显示它。

这是我当前的代码:

JSONObject object = new JSONObject(response.body().string());
JSONArray array = object.getJSONArray("results");
int length = array.length();
ArrayList<String> arrayList = new ArrayList<>();

我一直在尝试许多 JSON 库,但我似乎无法让它工作。我决定选择 Moshi,因为它与 OkHttp3 兼容,但我发现文档中缺少示例。甚至可以像这样解析 JSON 吗?

我在这里分享“以四种不同的方式将 JSON 字符串反序列化为 Java 对象”。还有很多其他 java JSON 库。

1.使用 Moshi

2。使用杰克逊

3。使用 Gson

4.使用 Genson

“请记住 - java 中的 POJO 在定义对象以提高其可读性和可重用性方面很有用。”

我们将使用以下具有多个字段的根 class 作为要反序列化的对象。

Root.java

public class Root {
    public Query query;
    public String language;
    public String preferedReferential;
    public String bestMatch;
    public List<Result> results;
    public String version;
    public int remainingIdentificationRequests;
    //getter 
    //setter 
    //constructors
}

Result.java

public class Result {
    public double score;
    public Species species;
    public List<Image> images;
    public Gbif gbif;
    //getter
    //setter
    //constrcutor
}

Species.java

public class Species {
    public String scientificNameWithoutAuthor;
    public String scientificNameAuthorship;
    public Genus genus;
    public Family family;
    public List<String> commonNames;
    public String scientificName;
   //getter
    //setter
    //constrcutor
}

Gbif.java

public class Gbif {
    public String id;
       //getter
       //setter
       //constrcutor
}

Genus.java

 public class Genus {
  public String scientificNameWithoutAuthor;
  public String scientificNameAuthorship;
  public String scientificName;
       //getter
       //setter
       //constrcutor
    }

Family.java

public class Family {
    public String scientificNameWithoutAuthor;
    public String scientificNameAuthorship;
    public String scientificName;
           //getter
           //setter
           //constrcutor
}

Image.java

public class Image{
    public String organ;
    public String author;
    public String license;
    public Date date;
    public Url url;
    public String citation;
    //getter
    //setter
    //constrcutor 
}

例子

您需要将 Moshi JSON 依赖项添加到您的 pom.xml 文件中,如果 Moshi 已经存在,请跳过此步骤。

<dependency>
    <groupId>com.squareup.moshi</groupId>
    <artifactId>moshi</artifactId>
    <version>1.9.2</version>
</dependency>
<dependency>
    <groupId>com.squareup.moshi</groupId>
    <artifactId>moshi-adapters</artifactId>
    <version>1.9.2</version>
</dependency>

如果你想使用 Jackson,请将以下依赖项添加到 pom.xml:

<dependency>
    <groupId>com.fasterxml.jackson.core</groupId>
    <artifactId>jackson-databind</artifactId>
    <version>2.13.0</version>
</dependency>

如果你想使用 Gson 添加以下依赖到 pom.xml:

       <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.8.5</version>
        </dependency>

如果您想使用 Genson,请将以下依赖项添加到 pom.xml:

<dependency>
            <groupId>com.owlike</groupId>
            <artifactId>genson</artifactId>
            <version>1.6</version>
        </dependency>

在系统控制台上打印结果中的值并验证,

   import java.io.IOException;
   import java.util.List;
   import com.fasterxml.jackson.databind.ObjectMapper;
   import com.google.gson.Gson;
   import com.owlike.genson.Genson;
   import com.squareup.moshi.JsonAdapter;
   import com.squareup.moshi.Moshi;
    
    public class DemoApplication {
    
        public static void main(String[] args) throws IOException {

            String json = "your response json";

        //Using Jackson
        ObjectMapper objectMapper = new ObjectMapper();
        Root root = objectMapper.readValue(json, Root.class);
        List<Result> results = root.getResults();
        System.out.println(results);

        //Using Moshi
        Moshi moshi = new Moshi.Builder().build();
        JsonAdapter<Root> jsonAdapter = moshi.adapter(Root.class);
        Root root2 = jsonAdapter.fromJson(json);
        List<Result> moshResult = root2.getResults();
        System.out.println(moshResult);

       //Using Gson
        Gson gson = new Gson();
        Root groot = gson.fromJson(json, Root.class);
        List<Result> gResult = groot.getResults();
        System.out.println(gResult);

       // Using Genson
        Root gensonRoot = new Genson().deserialize(json, Root.class);
        System.out.println(gensonRoot.getResults());
    
        }
    }

输出(使用 Jackson、Moshi、Gson 和 Genson)

[Result [score=0.92912, species=Species [scientificNameWithoutAuthor=Hibiscus rosa-sinensis, scientificNameAuthorship=L., genus=Genus [scientificNameWithoutAuthor=Hibiscus, scientificNameAuthorship=, scientificName=Hibiscus], family=Family [scientificNameWithoutAuthor=Malvaceae, scientificNameAuthorship=, scientificName=Malvaceae], commonNames=[Hawaiian hibiscus, Hibiscus, Chinese hibiscus], scientificName=Hibiscus rosa-sinensis L.], images=[Image [organ=leaf, author=Tela Botanica − Antoine AFFOUARD, license=cc-by-sa, date=com.example.demo.Date@7ce6a65d, url=com.example.demo.Url@1500955a, citation=Tela Botanica − Antoine AFFOUARD / Pl@ntNet, cc-by-sa], Image [organ=leaf, author=Antonio Sánchez Morales, license=cc-by-sa, date=com.example.demo.Date@e874448, url=com.example.demo.Url@29b5cd00, citation=Antonio Sánchez Morales / Pl@ntNet, cc-by-sa], Image [organ=leaf, author=femenia mayra, license=cc-by-sa, date=com.example.demo.Date@60285225, url=com.example.demo.Url@7113b13f, citation=femenia mayra / Pl@ntNet, cc-by-sa], Image [organ=leaf, author=Antonio Sánchez Morales, license=cc-by-sa, date=com.example.demo.Date@45820e51, url=com.example.demo.Url@42d8062c, citation=Antonio Sánchez Morales / Pl@ntNet, cc-by-sa], Image [organ=leaf, author=ire110, license=cc-by-sa, date=com.example.demo.Date@6043cd28, url=com.example.demo.Url@cb51256, citation=ire110 / Pl@ntNet, cc-by-sa], Image [organ=leaf, author=Andreas Vogelsinger, license=cc-by-sa, date=com.example.demo.Date@59906517, url=com.example.demo.Url@5bfbf16f, citation=Andreas Vogelsinger / Pl@ntNet, cc-by-sa]], gbif=Gbif [id=3152559]], Result [score=0.03652, species=Species [scientificNameWithoutAuthor=Hibiscus schizopetalus, scientificNameAuthorship=(Dyer) Hook.f., genus=Genus [scientificNameWithoutAuthor=Hibiscus, scientificNameAuthorship=, scientificName=Hibiscus], family=Family [scientificNameWithoutAuthor=Malvaceae, scientificNameAuthorship=, scientificName=Malvaceae], commonNames=[Campanilla, Chinese lantern, Japanese hibiscus], scientificName=Hibiscus schizopetalus (Dyer) Hook.f.], images=[Image [organ=leaf, author=nanni pri, license=cc-by-sa, date=com.example.demo.Date@25af5db5, url=com.example.demo.Url@12cdcf4, citation=nanni pri / Pl@ntNet, cc-by-sa], Image [organ=leaf, author=sharlaine bustamants, license=cc-by-sa, date=com.example.demo.Date@5bcea91b, url=com.example.demo.Url@5f3a4b84, citation=sharlaine bustamants / Pl@ntNet, cc-by-sa], Image [organ=leaf, author=Hugo SANTACREU, license=cc-by-sa, date=com.example.demo.Date@27f723, url=com.example.demo.Url@670b40af, citation=Hugo SANTACREU / Pl@ntNet, cc-by-sa], Image [organ=leaf, author=Pierre Bonnet, license=cc-by-sa, date=com.example.demo.Date@4923ab24, url=com.example.demo.Url@44c8afef, citation=Pierre Bonnet / Pl@ntNet, cc-by-sa], Image [organ=leaf, author=Tobias Jacobsen, license=cc-by-sa, date=com.example.demo.Date@7b69c6ba, url=com.example.demo.Url@46daef40, citation=Tobias Jacobsen / Pl@ntNet, cc-by-sa], Image [organ=leaf, author=abderrahim Lamari, license=cc-by-sa, date=com.example.demo.Date@12f41634, url=com.example.demo.Url@13c27452, citation=abderrahim Lamari / Pl@ntNet, cc-by-sa]], gbif=Gbif [id=9064581]]]
[Result [score=0.92912, species=Species [scientificNameWithoutAuthor=Hibiscus rosa-sinensis, scientificNameAuthorship=L., genus=Genus [scientificNameWithoutAuthor=Hibiscus, scientificNameAuthorship=, scientificName=Hibiscus], family=Family [scientificNameWithoutAuthor=Malvaceae, scientificNameAuthorship=, scientificName=Malvaceae], commonNames=[Hawaiian hibiscus, Hibiscus, Chinese hibiscus], scientificName=Hibiscus rosa-sinensis L.], images=[Image [organ=leaf, author=Tela Botanica − Antoine AFFOUARD, license=cc-by-sa, date=com.example.demo.Date@33cb5951, url=com.example.demo.Url@365c30cc, citation=Tela Botanica − Antoine AFFOUARD / Pl@ntNet, cc-by-sa], Image [organ=leaf, author=Antonio Sánchez Morales, license=cc-by-sa, date=com.example.demo.Date@701fc37a, url=com.example.demo.Url@4148db48, citation=Antonio Sánchez Morales / Pl@ntNet, cc-by-sa], Image [organ=leaf, author=femenia mayra, license=cc-by-sa, date=com.example.demo.Date@282003e1, url=com.example.demo.Url@7fad8c79, citation=femenia mayra / Pl@ntNet, cc-by-sa], Image [organ=leaf, author=Antonio Sánchez Morales, license=cc-by-sa, date=com.example.demo.Date@71a794e5, url=com.example.demo.Url@76329302, citation=Antonio Sánchez Morales / Pl@ntNet, cc-by-sa], Image [organ=leaf, author=ire110, license=cc-by-sa, date=com.example.demo.Date@5e25a92e, url=com.example.demo.Url@4df828d7, citation=ire110 / Pl@ntNet, cc-by-sa], Image [organ=leaf, author=Andreas Vogelsinger, license=cc-by-sa, date=com.example.demo.Date@b59d31, url=com.example.demo.Url@62fdb4a6, citation=Andreas Vogelsinger / Pl@ntNet, cc-by-sa]], gbif=Gbif [id=3152559]], Result [score=0.03652, species=Species [scientificNameWithoutAuthor=Hibiscus schizopetalus, scientificNameAuthorship=(Dyer) Hook.f., genus=Genus [scientificNameWithoutAuthor=Hibiscus, scientificNameAuthorship=, scientificName=Hibiscus], family=Family [scientificNameWithoutAuthor=Malvaceae, scientificNameAuthorship=, scientificName=Malvaceae], commonNames=[Campanilla, Chinese lantern, Japanese hibiscus], scientificName=Hibiscus schizopetalus (Dyer) Hook.f.], images=[Image [organ=leaf, author=nanni pri, license=cc-by-sa, date=com.example.demo.Date@11e21d0e, url=com.example.demo.Url@1dd02175, citation=nanni pri / Pl@ntNet, cc-by-sa], Image [organ=leaf, author=sharlaine bustamants, license=cc-by-sa, date=com.example.demo.Date@31206beb, url=com.example.demo.Url@3e77a1ed, citation=sharlaine bustamants / Pl@ntNet, cc-by-sa], Image [organ=leaf, author=Hugo SANTACREU, license=cc-by-sa, date=com.example.demo.Date@3ffcd140, url=com.example.demo.Url@23bb8443, citation=Hugo SANTACREU / Pl@ntNet, cc-by-sa], Image [organ=leaf, author=Pierre Bonnet, license=cc-by-sa, date=com.example.demo.Date@1176dcec, url=com.example.demo.Url@120d6fe6, citation=Pierre Bonnet / Pl@ntNet, cc-by-sa], Image [organ=leaf, author=Tobias Jacobsen, license=cc-by-sa, date=com.example.demo.Date@4ba2ca36, url=com.example.demo.Url@3444d69d, citation=Tobias Jacobsen / Pl@ntNet, cc-by-sa], Image [organ=leaf, author=abderrahim Lamari, license=cc-by-sa, date=com.example.demo.Date@1372ed45, url=com.example.demo.Url@6a79c292, citation=abderrahim Lamari / Pl@ntNet, cc-by-sa]], gbif=Gbif [id=9064581]]]
[Result [score=0.92912, species=Species [scientificNameWithoutAuthor=Hibiscus rosa-sinensis, scientificNameAuthorship=L., genus=Genus [scientificNameWithoutAuthor=Hibiscus, scientificNameAuthorship=, scientificName=Hibiscus], family=Family [scientificNameWithoutAuthor=Malvaceae, scientificNameAuthorship=, scientificName=Malvaceae], commonNames=[Hawaiian hibiscus, Hibiscus, Chinese hibiscus], scientificName=Hibiscus rosa-sinensis L.], images=[Image [organ=leaf, author=Tela Botanica − Antoine AFFOUARD, license=cc-by-sa, date=com.example.demo.Date@45018215, url=com.example.demo.Url@65d6b83b, citation=Tela Botanica − Antoine AFFOUARD / Pl@ntNet, cc-by-sa], Image [organ=leaf, author=Antonio Sánchez Morales, license=cc-by-sa, date=com.example.demo.Date@d706f19, url=com.example.demo.Url@30b7c004, citation=Antonio Sánchez Morales / Pl@ntNet, cc-by-sa], Image [organ=leaf, author=femenia mayra, license=cc-by-sa, date=com.example.demo.Date@79efed2d, url=com.example.demo.Url@2928854b, citation=femenia mayra / Pl@ntNet, cc-by-sa], Image [organ=leaf, author=Antonio Sánchez Morales, license=cc-by-sa, date=com.example.demo.Date@27ae2fd0, url=com.example.demo.Url@29176cc1, citation=Antonio Sánchez Morales / Pl@ntNet, cc-by-sa], Image [organ=leaf, author=ire110, license=cc-by-sa, date=com.example.demo.Date@2f177a4b, url=com.example.demo.Url@4278a03f, citation=ire110 / Pl@ntNet, cc-by-sa], Image [organ=leaf, author=Andreas Vogelsinger, license=cc-by-sa, date=com.example.demo.Date@147ed70f, url=com.example.demo.Url@61dd025, citation=Andreas Vogelsinger / Pl@ntNet, cc-by-sa]], gbif=Gbif [id=3152559]], Result [score=0.03652, species=Species [scientificNameWithoutAuthor=Hibiscus schizopetalus, scientificNameAuthorship=(Dyer) Hook.f., genus=Genus [scientificNameWithoutAuthor=Hibiscus, scientificNameAuthorship=, scientificName=Hibiscus], family=Family [scientificNameWithoutAuthor=Malvaceae, scientificNameAuthorship=, scientificName=Malvaceae], commonNames=[Campanilla, Chinese lantern, Japanese hibiscus], scientificName=Hibiscus schizopetalus (Dyer) Hook.f.], images=[Image [organ=leaf, author=nanni pri, license=cc-by-sa, date=com.example.demo.Date@124c278f, url=com.example.demo.Url@15b204a1, citation=nanni pri / Pl@ntNet, cc-by-sa], Image [organ=leaf, author=sharlaine bustamants, license=cc-by-sa, date=com.example.demo.Date@77167fb7, url=com.example.demo.Url@1fe20588, citation=sharlaine bustamants / Pl@ntNet, cc-by-sa], Image [organ=leaf, author=Hugo SANTACREU, license=cc-by-sa, date=com.example.demo.Date@6ce139a4, url=com.example.demo.Url@6973bf95, citation=Hugo SANTACREU / Pl@ntNet, cc-by-sa], Image [organ=leaf, author=Pierre Bonnet, license=cc-by-sa, date=com.example.demo.Date@2ddc8ecb, url=com.example.demo.Url@229d10bd, citation=Pierre Bonnet / Pl@ntNet, cc-by-sa], Image [organ=leaf, author=Tobias Jacobsen, license=cc-by-sa, date=com.example.demo.Date@47542153, url=com.example.demo.Url@33afa13b, citation=Tobias Jacobsen / Pl@ntNet, cc-by-sa], Image [organ=leaf, author=abderrahim Lamari, license=cc-by-sa, date=com.example.demo.Date@7a4ccb53, url=com.example.demo.Url@309e345f, citation=abderrahim Lamari / Pl@ntNet, cc-by-sa]], gbif=Gbif [id=9064581]]]
[Result [score=0.92912, species=Species [scientificNameWithoutAuthor=Hibiscus rosa-sinensis, scientificNameAuthorship=L., genus=Genus [scientificNameWithoutAuthor=Hibiscus, scientificNameAuthorship=, scientificName=Hibiscus], family=Family [scientificNameWithoutAuthor=Malvaceae, scientificNameAuthorship=, scientificName=Malvaceae], commonNames=[Hawaiian hibiscus, Hibiscus, Chinese hibiscus], scientificName=Hibiscus rosa-sinensis L.], images=[Image [organ=leaf, author=Tela Botanica − Antoine AFFOUARD, license=cc-by-sa, date=com.example.demo.Date@4efbca5a, url=com.example.demo.Url@1b7cc17c, citation=Tela Botanica − Antoine AFFOUARD / Pl@ntNet, cc-by-sa], Image [organ=leaf, author=Antonio Sánchez Morales, license=cc-by-sa, date=com.example.demo.Date@59662a0b, url=com.example.demo.Url@77fbd92c, citation=Antonio Sánchez Morales / Pl@ntNet, cc-by-sa], Image [organ=leaf, author=femenia mayra, license=cc-by-sa, date=com.example.demo.Date@67c27493, url=com.example.demo.Url@1a482e36, citation=femenia mayra / Pl@ntNet, cc-by-sa], Image [organ=leaf, author=Antonio Sánchez Morales, license=cc-by-sa, date=com.example.demo.Date@72967906, url=com.example.demo.Url@5b8dfcc1, citation=Antonio Sánchez Morales / Pl@ntNet, cc-by-sa], Image [organ=leaf, author=ire110, license=cc-by-sa, date=com.example.demo.Date@2f9f7dcf, url=com.example.demo.Url@747ddf94, citation=ire110 / Pl@ntNet, cc-by-sa], Image [organ=leaf, author=Andreas Vogelsinger, license=cc-by-sa, date=com.example.demo.Date@35e2d654, url=com.example.demo.Url@1bd4fdd, citation=Andreas Vogelsinger / Pl@ntNet, cc-by-sa]], gbif=Gbif [id=3152559]], Result [score=0.03652, species=Species [scientificNameWithoutAuthor=Hibiscus schizopetalus, scientificNameAuthorship=(Dyer) Hook.f., genus=Genus [scientificNameWithoutAuthor=Hibiscus, scientificNameAuthorship=, scientificName=Hibiscus], family=Family [scientificNameWithoutAuthor=Malvaceae, scientificNameAuthorship=, scientificName=Malvaceae], commonNames=[Campanilla, Chinese lantern, Japanese hibiscus], scientificName=Hibiscus schizopetalus (Dyer) Hook.f.], images=[Image [organ=leaf, author=nanni pri, license=cc-by-sa, date=com.example.demo.Date@55183b20, url=com.example.demo.Url@4f83df68, citation=nanni pri / Pl@ntNet, cc-by-sa], Image [organ=leaf, author=sharlaine bustamants, license=cc-by-sa, date=com.example.demo.Date@6cf0e0ba, url=com.example.demo.Url@7d8995e, citation=sharlaine bustamants / Pl@ntNet, cc-by-sa], Image [organ=leaf, author=Hugo SANTACREU, license=cc-by-sa, date=com.example.demo.Date@130d63be, url=com.example.demo.Url@42a48628, citation=Hugo SANTACREU / Pl@ntNet, cc-by-sa], Image [organ=leaf, author=Pierre Bonnet, license=cc-by-sa, date=com.example.demo.Date@293a5bf6, url=com.example.demo.Url@6aeb35e6, citation=Pierre Bonnet / Pl@ntNet, cc-by-sa], Image [organ=leaf, author=Tobias Jacobsen, license=cc-by-sa, date=com.example.demo.Date@1283bb96, url=com.example.demo.Url@74f0ea28, citation=Tobias Jacobsen / Pl@ntNet, cc-by-sa], Image [organ=leaf, author=abderrahim Lamari, license=cc-by-sa, date=com.example.demo.Date@f6efaab, url=com.example.demo.Url@3c19aaa5, citation=abderrahim Lamari / Pl@ntNet, cc-by-sa]], gbif=Gbif [id=9064581]]]