Readded toJSON methods