Using Silex JSON API. Closes #165.