Skip to content

Serde feature does not follow the spec #1

@adriandelgado

Description

@adriandelgado

Deserializing a string with comma separating values should not result in a vector of strings. The whatwg spec does not assign any special meaning to the comma.

This can be confirmed inside a javascript console

const url1 = new URL("http://example.com?foo=bar,baz");
console.log(url1.searchParams.get("foo")); // "bar,baz"
const url2 = new URL("http://example.com?foo=bar&foo=baz");
console.log(url2.searchParams.get("foo")); // "bar"
console.log(url2.searchParams.getAll("foo")); // [ "bar", "baz" ]

If foo is a multivalued query, the serde_json::Value should already contain a vector of strings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions