factor/basis/serialize/serialize-docs.factor

23 lines
1.0 KiB
Factor
Raw Normal View History

2007-09-20 18:09:08 -04:00
! Copyright (C) 2006 Chris Double.
! See http://factorcode.org/license.txt for BSD license.
USING: help.syntax help.markup ;
IN: serialize
HELP: serialize
{ $values { "obj" "object to serialize" }
}
{ $description "Serializes the object to the current output stream. Object references within the structure being serialized are maintained." }
{ $examples
2008-03-11 22:01:39 -04:00
{ $example "USING: serialize io.encodings.binary io.streams.byte-array prettyprint ;" "binary [ { 1 2 } serialize ] with-byte-writer\n\nbinary [ deserialize ] with-byte-reader ." "{ 1 2 }" }
2007-09-20 18:09:08 -04:00
}
2008-03-08 04:50:03 -05:00
{ $see-also deserialize } ;
2007-09-20 18:09:08 -04:00
HELP: deserialize
{ $values { "obj" "deserialized object" }
}
{ $description "Deserializes an object by reading from the current input stream. Object references within the structure that was originally serialized are maintained." }
{ $examples
2008-03-11 22:01:39 -04:00
{ $example "USING: serialize io.encodings.binary io.streams.byte-array prettyprint ;" "binary [ { 1 2 } serialize ] with-byte-writer\n\nbinary [ deserialize ] with-byte-reader ." "{ 1 2 }" }
2007-09-20 18:09:08 -04:00
}
2008-03-08 04:50:03 -05:00
{ $see-also serialize } ;