serde-rs / serde-rs/json

Allow deserializing strings as sequences to not allocate on strings with escape sequences

Open
#321 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

performance
Dominant language
Rust
Stars
5.6k
Forks
670
PR merge metrics
No merged PRs in 30d

Description

"\"foo\"" needs to be deserialized into a heap allocated string first and then parsed further.

#318 gives one alternative to the allocation by rewriting the original input.

If the input cannot be modified, another alternative would be to allow deserialize_seq to produce a sequence of characters or bytes instead of going straight for the string.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing issue #318 and the deserialization path around deserialize_seq. Determine how an unmodifiable JSON string with escape sequences could be exposed as characters or bytes without an intermediate heap allocation; done means the proposed behavior is defined and its allocation impact is demonstrated.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.