hook before json_encode. We can change data in this hook
refactor getData()
Merge pull request #6 from rvadym/master

refactor getData()