[middleware] Convert yarp_json to class based model

'Fix' #278
Make data.py ready to fix #277