数据加载 [⚠️ need proofread]
从外部文件加载数据。
这些函数可以帮助您加载和嵌入数据,例如从实验结果中获取数据。 [⚠️]
Encoding
Some of the functions are also capable of encoding, e.g. cbor.encode. They facilitate passing structured data to plugins.
However, each data format has its own native types. Therefore, for an arbitrary Typst value, the encode-to-decode roundtrip might be lossy. In general, numbers, strings, and arrays or dictionaries composed of them can be reliably converted, while other types may fall back to strings via repr, which is for debugging purposes only. Please refer to the page of each data format for details.