Skip to content

Commit 240181d

Browse files
committed
Add documentation for Kotlin notebooks serialization format
This commit includes a new document that explains the JSON serialization format used for rendering dataframes in the Kotlin notebooks plugin for IntelliJ IDEA. The format does not adhere to any formal schema such as Json Schema, but is intended for illustrative purposes.
1 parent d1e2ee7 commit 240181d

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

docs/serialization_format.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
## Serialization format for the Kotlin notebooks plugin
2+
This document is an informal specification of the serialization format used for rendering Kotlin dataframes in the Kotlin notebooks plugin of IntelliJ IDEA.
3+
4+
### Version 2.0.0
5+
### Top level json structure
6+
```json
7+
{
8+
"$version": "2.0.0",
9+
"metadata": {
10+
"columns": [ string, ... ], // column names
11+
"nrow": int,
12+
"ncol": int
13+
},
14+
"kotlin_dataframe": [ Row, ... ]
15+
}
16+
```
17+
### Row
18+
```json
19+
{
20+
"<value_column_name1>": string|Boolean|Double|Int|Float|Long|Short|Byte|list,,
21+
"<value_column_name2>": string|Boolean|Double|Int|Float|Long|Short|Byte|list,,
22+
...
23+
"<column_group_name1>": ColumnGroup,
24+
"<column_group_name2>": ColumnGroup,
25+
...
26+
"<frame_column_name1>": NestedFrame,
27+
"<frame_column_name2>": NestedFrame
28+
}
29+
```
30+
### ColumnGroup
31+
```json
32+
{
33+
"metadata": {
34+
"kind": "ColumnGroup"
35+
},
36+
"data": Row
37+
}
38+
```
39+
### NestedFrame
40+
```json
41+
{
42+
"metadata": {
43+
"kind": "FrameColumn"
44+
"nrow": int,
45+
"ncol": int
46+
},
47+
"data": [ Row, ... ]
48+
}
49+
```

0 commit comments

Comments
 (0)