As a quick little bit of code sharing, I gave my Sarah stocks plugin the ability to allow multiple spoken phrases for one command. For instance, a user can now say “check stock prices”, “get stock prices”, or “get stocks” to check their stocks. To do this, I added an array of phrases to the JSON file that describes the Stocks plugin.
Getting to the point of this post, the following Scala source code shows how to read an array of JSON string values using Lift-JSON: