Dicts with non-string keys get serialized wrong
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
Research direction
Start by tracing how the Python extension handles the py:runresult examples and where dictionaries are passed through JSON serialization. Reproduce the {1: 2} and {(1,2): 3} cases, then verify that non-string-key dictionaries serialize as lists of pairs without the current incorrect output or exception.
Written by the indexing model from the issue text.
Description
Copied from with more discussion at: https://github.com/qiemem/PythonExtension/issues/6
Some examples:
observershow py:runresult "{1: 2}"
observer: [["1" 2]]
observershow py:runresult "{(1,2): 3}"
Extension exception: keys must be a string
While JSON is restricted to string keys, we are not. We need to hijack JSON's dict serialization to turn them into a list of pairs instead.
- Dominant language
- Scala
- Stars
- 31
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
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.
More from NetLogo/Python-Extension
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
NetLogo/Python-Extension#27 · 3 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
NetLogo/Python-Extension#24 · 2 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
NetLogo/Python-Extension#17 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
NetLogo/Python-Extension#16 · 6 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
All issues in NetLogo/Python-Extension
Similar issues
-
Area: Excel support
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
orbeon/orbeon-forms#7893 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
lichess-org/lila#21788 · 2 comments ·
-
area:Iceberg area:writer documentation requires-triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
apache/datafusion-comet#6147 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
GiganticMinecraft/SeichiAssist#2978 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
chipsalliance/rocket-chip#3833 ·