Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Escape special chars in encoding shorthand syntax #9

Open
brucala opened this issue Aug 11, 2023 · 0 comments
Open

Escape special chars in encoding shorthand syntax #9

brucala opened this issue Aug 11, 2023 · 0 comments

Comments

@brucala
Copy link
Owner

brucala commented Aug 11, 2023

Due to the shorthand string syntax, using chars like ( or : in the Encoding can give unexpected results:

julia > Encoding("Beak Length (mm):Q")
Deneb.EncodingSpec: 
{
  "x": {
    "aggregate": "Beak Length ",
    "field": "mm",
    "type": "quantitative"
  }
}

At the moment there are no escaping rules to avoid that. In the meantime one can simply use the verbose syntax without the shorthands:

> julia> Encoding(x=(field="Beak Length (mm)", type=:quantitative))
Deneb.EncodingSpec: 
{
  "x": {
    "field": "Beak Length (mm)",
    "type": "quantitative"
  }
}
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant