Added TextFormat::toJSON()