Refactors GetJsonAPI and changes structure of GetJSONAPI