Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

OrderedDictionary instances not correctly stringified to json or javascript #1110

Closed
jbrichau opened this issue Feb 6, 2019 · 0 comments
Closed
Assignees

Comments

@jbrichau
Copy link
Member

jbrichau commented Feb 6, 2019

In Pharo7, it seems the use of PluggableDictionary has been replaced by OrderedDictionary in some places (e.g. Collection>>#groupedBy). However, Seaside does not define correct json conversion for instances of OrderedDictionary. For example, the following code snippet:

|dict|
dict := OrderedDictionary new add:(#foo -> 'test1');add:(#bar -> 'test2');yourself.
dict asJson

Will produce:
["test1", "test2"]

This should be:

{"foo"->"test1", "bar" ->"test2"}

OrderedDictionary existed before but since it's now used in key methods of the image to construct dictionaries (like #groupedBy), we should implement the necessary json and javascript conversion methods on it.

@jbrichau jbrichau self-assigned this Feb 6, 2019
jbrichau added a commit that referenced this issue Mar 18, 2019
Implemented OrderedDictionary>>javascriptOn: and jsonOn:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant