toData/toObj should be standard toJSON function