-
Notifications
You must be signed in to change notification settings - Fork 2
/
library.dylan
47 lines (38 loc) · 1.11 KB
/
library.dylan
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
module: dylan-user
define library serialization
use common-dylan;
use io;
export serialization;
export json-serialization;
export sexpr-serialization;
end library;
define module serialization
use common-dylan;
use streams;
export <serializer>, write-array-field-start,
write-end-array, write-end-object,
write-field-name, write-field,
write-object, write-object-field-start,
write-separator-array, write-separator-field-name,
write-separator-object, write-start-array,
write-start-object, write-object-to-string;
// This is only for use by the other modules in this
// library.
export <field-name>, stream, <property-list>;
end module;
define module json-serialization
use common-dylan, exclude: { format-to-string };
use format;
use serialization, export: all;
use streams;
export <json-serializer>,
write-object-to-json-string;
end module;
define module sexpr-serialization
use common-dylan, exclude: { format-to-string };
use format;
use serialization, export: all;
use streams;
export <sexpr-serializer>,
write-object-to-sexpr-string;
end module;