Anonymous user
Simple database: Difference between revisions
→{{header|Pike}}: caveat for dataformat
(→{{header|Pike}}: translated from lisp) |
(→{{header|Pike}}: caveat for dataformat) |
||
Line 226:
}
// pike offers encode_value() and decode_value() as standard ways to save and read data,
// but that is not a human readable format.
// therefore we are instead printing the structure as debug-output which is a readable form
// as long as it only contains integers, strings, mappings, arrays and multisets this format can be read by pike.
// to read it we are creating a class that contains the data as a value,
// which is then compiled and instantiated to allow us to pull the data out.
void save_db(string filename, mapping database)
{
|