25 lines
461 B
Dart
25 lines
461 B
Dart
enum JsonElementType {
|
|
object, // 0
|
|
array, // 1
|
|
key, // 2
|
|
primitive, // 3
|
|
stringValue, // 4
|
|
}
|
|
|
|
class JsonElement {
|
|
JsonElementType type = JsonElementType.object;
|
|
int start = 0;
|
|
int end = 0;
|
|
int len = 0;
|
|
|
|
JsonElement? parent; // parent
|
|
JsonElement? child; // first child
|
|
JsonElement? next; // next sibling
|
|
JsonElement? prev; // previous sibling
|
|
|
|
bool waitingForColon = false;
|
|
int elemIndex = -1; // siblingIndex
|
|
|
|
JsonElement();
|
|
}
|