Added toJSON implementations