void Option::dump_value(const char *field_name,
    const Option::value_t &v, Formatter *f) const
{
  if (boost::get<boost::blank>(&v)) {
    // This should be nil but Formatter doesn't allow it.
    f->dump_string(field_name, "");
    return;
  }
  switch (type) {
  case TYPE_INT:
    f->dump_int(field_name, boost::get<int64_t>(v)); break;
  case TYPE_UINT:
    f->dump_unsigned(field_name, boost::get<uint64_t>(v)); break;
  case TYPE_STR:
    f->dump_string(field_name, boost::get<std::string>(v)); break;
  case TYPE_FLOAT:
    f->dump_float(field_name, boost::get<double>(v)); break;
  case TYPE_BOOL:
    f->dump_bool(field_name, boost::get<bool>(v)); break;
  default:
    f->dump_stream(field_name) << v; break;
  }
}
void Option::dump_value(const char *field_name,
    const Option::value_t &v, Formatter *f) const
{
  if (boost::get<boost::blank>(&v)) {
     
    f->dump_string(field_name, "");
    return;
  }
  switch (type) {
  case TYPE_INT:
    f->dump_int(field_name, boost::get<int64_t>(v)); break;
  case TYPE_UINT:
    f->dump_unsigned(field_name, boost::get<uint64_t>(v)); break;
  case TYPE_STR:
    f->dump_string(field_name, boost::get<std::string>(v)); break;
  case TYPE_FLOAT:
    f->dump_float(field_name, boost::get<double>(v)); break;
  case TYPE_BOOL:
    f->dump_bool(field_name, boost::get<bool>(v)); break;
  default:
    f->dump_stream(field_name) << v; break;
  }
}