Extension methods to convert from backend classes to json wrapper classes