Skip to content
Advertisement

how to read a list of objects from the configuration file in play framework

How can i read a list of users from the configuration file in play framework? i have tried doing something like this:

JavaScript

from the play application

JavaScript

will give me this a list of objects, if I iterate through the list i get each object as

JavaScript

at this point i don’t know how i can elegantly get the value of the uid, i can do some hacky job as omit the first and last bracket and parse for the before after equal sign, but it would be too ugly! any idea? (the application is written in java)

thanks

Advertisement

Answer

Since I had recently the same problem and this is still unanswered, here is my suggestion:

JavaScript

As far as I know there are no tuples or anything in Java, you need to use either an object or a list with two elements. I decided to go for an object here, you can also return a list.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement