JSON API support refactoring