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

Implementations of #asJson in Seaside and GToolkit conflict #1433

Closed
Rinzwind opened this issue Jul 13, 2024 · 4 comments
Closed

Implementations of #asJson in Seaside and GToolkit conflict #1433

Rinzwind opened this issue Jul 13, 2024 · 4 comments
Labels

Comments

@Rinzwind
Copy link
Member

There are conflicting implementations of #asJson in Seaside and Glamorous Toolkit. Using Glamorous Toolkit v1.0.975, the test in the following fails:

Metacello new
	baseline: 'Seaside3';
	repository: 'github://SeasideSt/Seaside:d90609cfd7005f52/repository';
	load: 'Tests'.
(Smalltalk at: #WAJsonStreamTest) debug: #testArray

This is because #asJson doesn’t answer a String but a GtJson:

#(1 2 3) asJson "=> a GtJson(root)"

@marschall
Copy link
Contributor

Interesting. Does GT also define #jsonOn:?

@marschall marschall added the JSON label Jul 14, 2024
@Rinzwind
Copy link
Member Author

There are no implementors of #jsonOn: in Glamorous Toolkit v1.0.975.

To get a String with JSON from a GtJson, it can be sent #asJsonString. The classes implementing #asJsonString are GtJsonBasic, GtJsonModel and YAMLParseNode, so sending the message to an Array causes a MessageNotUnderstood to be signaled, leaving a rename of Seaside’s #asJson to #asJsonString as one option to avoid the conflict.

@Rinzwind
Copy link
Member Author

GToolkit’s #asJson has been deprecated in GToolkit issue #3895.

Rinzwind added a commit that referenced this issue Jul 16, 2024
…ionary, OrderedDictionary and SequenceableCollection when testing on Glamorous Toolkit (see issue #1433, “Implementations of #asJson in Seaside and GToolkit conflict”).
@Rinzwind
Copy link
Member Author

I’ll close this. As noted in GToolkit issue #3895, the conflict remains as long as the deprecated methods remain in GToolkit. The workaround is to just remove them, see commit c0e63ad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants