added json type and default constructor to otp