std :: serial::value
Trait std::Format
trait Format {
void write(const &Value v, &String out) const;
struct Value parse(const &char text, ?&int ok) const;
}A text format for Value trees. Each backend is a small struct whose methods are the format's writer and parser: Json (json.h), Yaml (yaml.h), Csv (csv.h), Xml (xml.h; carries the root element's tag) and Html (html.h). Value::encode / Value::decode take any of them, and so does generic code bounded by Format:
struct String text = v.encode(Json::new());
struct Value back = Value::decode(Xml::new("doc"), text.as_ptr(), &ok);
Required methods
appends v's text to out
*ok: 1, or 0 on malformed input