v2.5.0 Added toJSON.