Pydeck layer serialization strips internal quotes
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 14.6k
- Forks
- 2.3k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 42
Description
cc @ajduberstein
Description
When passing a string to Pydeck, all internal (double) quote characters are removed. This prevents passing JSON data as a string to JS.
Repro Steps
Note that this can be reproduced solely in Python. I.e. before doing any serialization, the quotes have already been stripped.
import pydeck as pdk
json_str = '"{"hello":"world"}"'
layer = pdk.Layer(
"Layer",
None,
json=json_str)
layer
{"@@type": "Layer",
"id": "6e7e67aa-7b5c-47ab-928f-508fb6af892e",
"json": "{hello:world}"}
I would expect escaped \" to exist in the internal string object
Environment (please complete the following information):
- Framework Version: master
- Browser Version: Chrome latest
- OS: Mac
Logs
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the pdk.Layer entry point shown in the Python reproduction and run it to inspect the string before and after layer serialization. Trace where the json argument is transformed; done means internal double quotes remain escaped in the serialized layer output so JSON strings can be passed to JavaScript.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, typescript
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100