Added variation with json but need custom encoder to make it work.