https://github.com/kordlib/ketf
kotlinx.serialization support for the External Term Format
https://github.com/kordlib/ketf
erlang-term-format etf kotlin kotlinx-serialization
Last synced: 11 months ago
JSON representation
kotlinx.serialization support for the External Term Format
- Host: GitHub
- URL: https://github.com/kordlib/ketf
- Owner: kordlib
- License: mit
- Created: 2020-07-02T16:13:55.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-05-29T06:41:35.000Z (about 4 years ago)
- Last Synced: 2025-06-09T03:05:11.758Z (about 1 year ago)
- Topics: erlang-term-format, etf, kotlin, kotlinx-serialization
- Language: Kotlin
- Homepage:
- Size: 65.4 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# KETF
kotlinx.serialization support for the [External Term Format](http://erlang.org/doc/apps/erts/erl_ext_dist.html).
## Supported types
| ETF type | Kotlin type |
|---------------------|------------------------|
| SMALL_INTEGER_EXT | Byte, Char, Int, Long |
| INTEGER_EXT | Short, Int, Long |
| SMALL_TUPLE_EXT | List |
| LARGE_TUPLE_EXT | List |
| MAP_EXT | Map, Class |
| NIL_EXT | null |
| STRING_EXT | String |
| LIST_EXT | List, String¹ |
| SMALL_BIG_EXT | Long² |
| LARGE_BIG_EXT | Long² |
| NEW_FLOAT_EXT | Double, Float |
| ATOM_UTF8_EXT | Boolean, property name |
| SMALL_ATOM_UTF8_EXT | Boolean, property name |
| ATOM_EXT | Boolean, property name |
| SMALL_ATOM_EXT | Boolean, property name |
| ATOM_CACHE_REF | none |
| FLOAT_EXT | none |
| PORT_EXT | none |
| NEW_PORT_EXT | none |
| PID_EXT | none |
| NEW_PID_EXT | none |
| BINARY_EXT | none |
| REFERENCE_EXT | none |
| NEW_REFERENCE_EXT | none |
| NEWER_REFERENCE_EXT | none |
| FUN_EXT | none |
| NEW_FUN_EXT | none |
| EXPORT_EXT | none |
| BIT_BINARY_EXT | none |
* ¹ Strings longer than [65535 characters](http://erlang.org/doc/apps/erts/erl_ext_dist.html#list_ext) will be represented as a list of chars instead.
* ² Values decoded from this tag may be bigger than Long.MAX_VALUE. Decoding values that would cause an overflow will throw a `SerializationException` instead.