Added toJSON methods