Skip to content

Conversation

@aplavin
Copy link
Contributor

@aplavin aplavin commented Dec 4, 2025

Basically, for convenience: I find myself copy-pasting these methods whenever I load/store Julia serialized data as part of another data format like parquet or sql database. They natively store byte arrays, and would be nice to have these (de)serialize methods going directly back and forth between Julia objects and byte vectors.

Another neat usecase is to quickly copy-paste a Julia object between different Julia sessions (repls, notebooks, remote, ...):

# in session 1:
x |> serialize |> base64encode
# copy the resulting string

# in session 2:
x = "<paste string here>" |> base64decode |> deserialize

@JeffBezanson
Copy link
Member

Looks good. Would be nice to add doc strings to these.

Copy link
Member

@LilithHafner LilithHafner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I've also wanted this functionality. There's no other plausible implementation of the deserialize(::Vector{UInt8}) method, and the return type Vector{UInt8} seems reasonable for the serialize(value) method.

Should go to triage as it is technically an expansion of public API? The specific question I'd ask is: "Is Vector{UInt8} the right return type for serialize(value)?"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants