I'm trying to implement an autocomplete/suggestions functionality for a Textfield.
I found out about controlsfx, in which the method 'TextFields.bindAutoCompletion(textfield, array)' comes in very handy. The one thing i could not understand, though, is how to use a JSON as the array where the method finds its suggestions on.
I'd like that once you write 3 letters (since starting from one would mean very slow loading times from the json) it starts to find the right suggestions, but i don't know how i could use a json file in this method.
The JSON i found is this: https://it.openfoodfacts.org/cgi/search.pl?search_terms=XXXXXX&search_simple=true&json=true&fields=product_name,allergens,generic_name
Where the XXXXX is the letters i should be writing.
I don't have any clue about this. I tried looking on the internet but still, no solutions found.