Skip to content

Serialize ser

Serializes a value into a binary format.

 (ser 42)
[0xfa 0xde 0xfa 0xce 0x01 0x00 0x00 0x00 0x09 0x00 0x00 0x00 0x00 0x00 0x00 0x00..]

 (ser "hello")
[0xfa 0xde 0xfa 0xce 0x01 0x00 0x00 0x00 0x0f 0x00 0x00 0x00 0x00 0x00 0x00 0x00..]

 (ser [1 2 3])
[0xfa 0xde 0xfa 0xce 0x01 0x00 0x00 0x00 0x22 0x00 0x00 0x00 0x00 0x00 0x00 0x00..]

Info

  • Converts any Rayforce value into a byte array
  • Includes type information in the serialized data
  • Preserves the complete structure of complex objects

Warning

Functions are serialized as their source code - ensure all dependencies are available when deserializing

Tip

Use ser when you need to store data or send it over a network