24 lines
410 B
Plaintext
24 lines
410 B
Plaintext
public type Value {
|
|
Null
|
|
Boolean(value: Bool)
|
|
Number(raw: Text)
|
|
String(text: Text)
|
|
Array(children: List<Int>)
|
|
Object(members: Map<Text, Int>)
|
|
}
|
|
|
|
public type Document {
|
|
root: Int
|
|
nodes: List<Value>
|
|
}
|
|
|
|
public type ParseResult {
|
|
Parsed(document: Document)
|
|
error Failed(position: Int, message: Text)
|
|
}
|
|
|
|
public type WriteResult {
|
|
Written(text: Text)
|
|
error Failed(node: Int, message: Text)
|
|
}
|