Search code examples
javaokhttpmoshi

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
}

I got this JSON object as a response from OkHttp3 POST request. My goal is to get what is inside the JSON array named results and display it.

Here's my current code:

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

I have been trying many JSON libraries but I can't seem to make it work. I decided to choose Moshi since it is compatible with OkHttp3 but I find the examples on the documentation lacking. Is it even possible to parse a JSON like this?


Solution

  • Here I am sharing "Deserialize your JSON string into Java objects in four different ways". There are a lot of other java JSON libraries.

    1. Using Moshi

    2. Using Jackson

    3. Using Gson

    4. Using Genson

    "Remember - The POJOs in java are useful in defining objects to increase their readability and reusability."

    We'll use the following Root class with multiple fields as the object to deserialize throughout.

    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 
    }
    

    Example

    You need to add the Moshi JSON dependencies to your pom.xml file, if Moshi already exists just skip this step.

    <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>
    

    If you want to use Jackson add the following dependencies to the pom.xml:

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

    If you want to use Gson add the following dependencies to the pom.xml:

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

    If you want to use Genson add the following dependencies to the pom.xml:

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

    Print the values inside the results on your system console and verify,

       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());
        
            }
        }
    

    Output (Using Jackson,Moshi,Gson, and 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]]]