| 1 | ---
|
| 2 | in_progress: yes
|
| 3 | body_css_class: width40 help-body
|
| 4 | default_highlighter: oils-sh
|
| 5 | preserve_anchor_case: yes
|
| 6 | ---
|
| 7 |
|
| 8 | Packle
|
| 9 | ======
|
| 10 |
|
| 11 | This chapter in the [Oils Reference](index.html) describes Packle, a binary
|
| 12 | serialization format for object graphs.
|
| 13 |
|
| 14 | It's a secure subset of Python's `pickle` format.
|
| 15 |
|
| 16 | Advantages:
|
| 17 |
|
| 18 | - Strings are length-prefixed, so they don't need to be escaped and unescaped.
|
| 19 | - Exact float representation, with NaN, Inf, and -Inf values.
|
| 20 | - Represent graphs, not just trees. (Think "JSON key sharing")
|
| 21 | - Strict Byte strings and strict Unicode, not the mess of JSON strings.
|
| 22 |
|
| 23 | <div id="toc">
|
| 24 | </div>
|
| 25 |
|
| 26 |
|
| 27 | ## Atoms
|
| 28 |
|
| 29 | TODO: describe wire format.
|
| 30 |
|
| 31 | ### Null
|
| 32 |
|
| 33 | ### Bool
|
| 34 |
|
| 35 | ### Int
|
| 36 |
|
| 37 | ### Float
|
| 38 |
|
| 39 | ### Bytes
|
| 40 |
|
| 41 | ### Unicode
|
| 42 |
|
| 43 | ## Compound
|
| 44 |
|
| 45 | TODO: describe wire format.
|
| 46 |
|
| 47 | ### List
|
| 48 |
|
| 49 | ### Dict
|
| 50 |
|
| 51 |
|
| 52 | [JSON]: https://json.org
|
| 53 |
|