Add a method to get raw JSON data.
Add tests.