Migrated JSON parsing into a django view so that it can be ready by
javascript.