Added JSON to Device object conversion