Accepted answer

Your code is correct except that your JSON is simply an array, hence a List[User]. There are two ways to fix this, with a slightly different outcome:

Solution 1: Fix your json to

    {"name": "Foo", "emails": ["", ""]},
    {"name": "Bar", "emails": ["", ""]}

Solution2: Change the type parameter of extract to

val obj = parse(json).extract[List[User]]

Related Query

More Query from same tag