How to escape/de-descape with Serde

Open
#720 2 comments 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
28/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
rust
Domain
backend

Research direction

Start by reading the Serde serialization API around se::to_string and how it writes XML text and attributes. Check the escaping behavior for quotes and other characters, then determine whether the API offers an option or requires lower-level calls; done means the supported way to escape serialized messages is clear and works for the reported protocol use case.

Written by the indexing model from the issue text.

Description

enhancement help wanted serde

Sorry if I'm spamming with question; my project involves implementing a very complicated XML-encoded protocol so y'all will likely be hearing a lot from me lol.

I just now started sending messages that require escaping and was surprised to find that se::to_string doesn't escape " or ' (I haven't tried other characters) by default. Is there a way to enable this or will I have to get into more low-level APIs for this?

Dominant language
Rust
Stars
1.6k
Forks
299
Avg merge
2d 4h
Merged PRs (30d)
9

Getting set up

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.

More from tafia/quick-xml

All issues in tafia/quick-xml

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.