Redesigned JSON API implementation.