refactor: move jsonToItems (controller -> service)

- introduce service test
- introduce passing service reference into callback function
- controller pass setItems into the service instead