-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1368 from SeasideSt/1367-DictionaryasJson-does-no…
…t-produce-valid-JSON-when-using-integer-keys Fix #1367: keys of a JSON object should always be a string. + JSON tests cleanup
- Loading branch information
Showing
71 changed files
with
210 additions
and
184 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"noMethodMetaData" : true, | ||
"separateMethodMetaAndSource" : false, | ||
"useCypressPropertiesFile" : true } | ||
"noMethodMetaData" : true, | ||
"useCypressPropertiesFile" : true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 8 additions & 11 deletions
19
repository/BaselineOfSeaside3.package/BaselineOfSeaside3.class/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
{ | ||
"category" : "BaselineOfSeaside3", | ||
"classinstvars" : [ | ||
], | ||
"classvars" : [ | ||
], | ||
"commentStamp" : "", | ||
"instvars" : [ | ||
], | ||
"name" : "BaselineOfSeaside3", | ||
"pools" : [ | ||
], | ||
"super" : "BaselineOf", | ||
"type" : "normal" } | ||
"category" : "BaselineOfSeaside3", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ ], | ||
"name" : "BaselineOfSeaside3", | ||
"type" : "normal" | ||
} |
2 changes: 1 addition & 1 deletion
2
repository/BaselineOfSeaside3.package/monticello.meta/categories.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
SystemOrganization addCategory: #'BaselineOfSeaside3'! | ||
SystemOrganization addCategory: #BaselineOfSeaside3! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
{ | ||
} | ||
{ } |
3 changes: 3 additions & 0 deletions
3
...y/Seaside-GemStone-JSON-Core.package/CharacterCollection.extension/instance/jsonKeyOn..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*seaside-gemstone-json-core | ||
jsonKeyOn: aRenderer | ||
self jsonOn: aRenderer |
4 changes: 4 additions & 0 deletions
4
repository/Seaside-JSON-Core.package/Object.extension/instance/jsonKeyOn..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*Seaside-JSON-Core | ||
jsonKeyOn: aRenderer | ||
|
||
self error: 'Only Strings can be used as keys in JSON objects.' |
3 changes: 3 additions & 0 deletions
3
repository/Seaside-JSON-Core.package/String.extension/instance/jsonKeyOn..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*seaside-json-core | ||
jsonKeyOn: aRenderer | ||
self jsonOn: aRenderer |
2 changes: 1 addition & 1 deletion
2
repository/Seaside-JSON-Core.package/WAJsonCanvas.class/instance/boolean..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
double-disptach | ||
double-dispatch | ||
boolean: aBoolean | ||
self document stream nextPutAll: (aBoolean ifTrue: [ 'true' ] ifFalse: [ 'false' ]) |
2 changes: 1 addition & 1 deletion
2
repository/Seaside-JSON-Core.package/WAJsonCanvas.class/instance/dateAndTime..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
repository/Seaside-JSON-Core.package/WAJsonCanvas.class/instance/null.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
double-disptach | ||
double-dispatch | ||
null | ||
self document stream nextPutAll: 'null' |
2 changes: 1 addition & 1 deletion
2
repository/Seaside-JSON-Core.package/WAJsonCanvas.class/instance/number..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
double-disptach | ||
double-dispatch | ||
number: aNumber | ||
aNumber printOn: self document stream |
2 changes: 1 addition & 1 deletion
2
repository/Seaside-JSON-Core.package/WAJsonCanvas.class/instance/scaledDecimal..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
repository/Seaside-JSON-Core.package/WAJsonCanvas.class/instance/string..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
double-disptach | ||
double-dispatch | ||
string: aString | ||
self document string: aString |
3 changes: 3 additions & 0 deletions
3
repository/Seaside-JSON-Core.package/WAJsonKeyValueBrush.class/class/stringKeysOnly..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
stringKeysOnly: aBoolean | ||
StringKeysOnly := aBoolean |
3 changes: 3 additions & 0 deletions
3
repository/Seaside-JSON-Core.package/WAJsonKeyValueBrush.class/class/stringKeysOnly.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
stringKeysOnly | ||
^ StringKeysOnly ifNil: [ false ] |
4 changes: 3 additions & 1 deletion
4
repository/Seaside-JSON-Core.package/WAJsonKeyValueBrush.class/instance/openBrush.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
private | ||
openBrush | ||
super openBrush. | ||
key jsonOn: canvas. | ||
self class stringKeysOnly | ||
ifTrue: [ key jsonKeyOn: canvas ] | ||
ifFalse: [ key jsonOn: canvas ]. | ||
self document stream nextPutAll: ': ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...dDictionary.extension/instance/jsonOn..st → ...dDictionary.extension/instance/jsonOn..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
1 change: 1 addition & 0 deletions
1
repository/Seaside-Pharo-JSON-Core.package/monticello.meta/categories.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
SystemOrganization addCategory: #'Seaside-Pharo-JSON-Core'! | ||
SystemOrganization addCategory: #'Seaside-Pharo-JSON-Core-Base'! |
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
repository/Seaside-Pharo70-JSON-Extensions.package/monticello.meta/categories.st
This file was deleted.
Oops, something went wrong.
Empty file removed
0
repository/Seaside-Pharo70-JSON-Extensions.package/monticello.meta/initializers.st
Empty file.
1 change: 0 additions & 1 deletion
1
repository/Seaside-Pharo70-JSON-Extensions.package/monticello.meta/package
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
repository/Seaside-Pharo70-JSON-Extensions.package/properties.json
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 8 additions & 8 deletions
16
repository/Seaside-Tests-JSON.package/WAJsonParserTest.class/instance/testNumberFloat.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
tests-literals | ||
testNumberFloat | ||
self assert: (self parse: '0.0') = 0.0. | ||
self assert: (self parse: '0.12') = 0.12. | ||
self assert: (self parse: '-0.12') = -0.12. | ||
self assert: (self parse: '12.34') = 12.34. | ||
self assert: (self parse: '-12.34') = -12.34. | ||
self assert: (self parse: '1.2e0') = 1.2. | ||
self assert: (self parse: '1.2e+1') = 12.0. | ||
self assert: (self parse: '1.2e-1') = 1.2e-1 | ||
self assert: (self parse: '0.0') equals: 0.0. | ||
self assert: (self parse: '0.12') equals: 0.12. | ||
self assert: (self parse: '-0.12') equals: -0.12. | ||
self assert: (self parse: '12.34') equals: 12.34. | ||
self assert: (self parse: '-12.34') equals: -12.34. | ||
self assert: (self parse: '1.2e0') equals: 1.2. | ||
self assert: (self parse: '1.2e+1') equals: 12.0. | ||
self assert: (self parse: '1.2e-1') equals: 1.2e-1 |
14 changes: 7 additions & 7 deletions
14
repository/Seaside-Tests-JSON.package/WAJsonParserTest.class/instance/testNumberInteger.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
tests-literals | ||
testNumberInteger | ||
self assert: (self parse: '0') = 0. | ||
self assert: (self parse: '1') = 1. | ||
self assert: (self parse: '-1') = -1. | ||
self assert: (self parse: '12') = 12. | ||
self assert: (self parse: '-12') = -12. | ||
self assert: (self parse: '1e2') = 100. | ||
self assert: (self parse: '1e+2') = 100 | ||
self assert: (self parse: '0') equals: 0. | ||
self assert: (self parse: '1') equals: 1. | ||
self assert: (self parse: '-1') equals: -1. | ||
self assert: (self parse: '12') equals: 12. | ||
self assert: (self parse: '-12') equals: -12. | ||
self assert: (self parse: '1e2') equals: 100. | ||
self assert: (self parse: '1e+2') equals: 100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
repository/Seaside-Tests-JSON.package/WAJsonParserTest.class/instance/testString.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
tests-literals | ||
testString | ||
self assert: (self parse: '""') = ''. | ||
self assert: (self parse: '"foo"') = 'foo'. | ||
self assert: (self parse: '"foo bar"') = 'foo bar'. | ||
self assert: (self parse: '" foo "') = ' foo ' | ||
self assert: (self parse: '""') equals: ''. | ||
self assert: (self parse: '"foo"') equals: 'foo'. | ||
self assert: (self parse: '"foo bar"') equals: 'foo bar'. | ||
self assert: (self parse: '" foo "') equals: ' foo ' |
18 changes: 9 additions & 9 deletions
18
repository/Seaside-Tests-JSON.package/WAJsonParserTest.class/instance/testStringEscaped.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
tests-literals | ||
testStringEscaped | ||
self assert: (self parse: '"\""') = '"'. | ||
self assert: (self parse: '"\\"') = '\'. | ||
self assert: (self parse: '"\/"') = '/'. | ||
self assert: (self parse: '"\b"') = (String with: Character backspace). | ||
self assert: (self parse: '"\f"') = (String with: Character newPage). | ||
self assert: (self parse: '"\n"') = (String with: Character lf). | ||
self assert: (self parse: '"\r"') = (String with: Character cr). | ||
self assert: (self parse: '"\t"') = (String with: Character tab). | ||
self assert: (self parse: '"\u20Ac"') = (String with: (Character codePoint: 16r20AC)) | ||
self assert: (self parse: '"\""') equals: '"'. | ||
self assert: (self parse: '"\\"') equals: '\'. | ||
self assert: (self parse: '"\/"') equals: '/'. | ||
self assert: (self parse: '"\b"') equals: (String with: Character backspace). | ||
self assert: (self parse: '"\f"') equals: (String with: Character newPage). | ||
self assert: (self parse: '"\n"') equals: (String with: Character lf). | ||
self assert: (self parse: '"\r"') equals: (String with: Character cr). | ||
self assert: (self parse: '"\t"') equals: (String with: Character tab). | ||
self assert: (self parse: '"\u20Ac"') equals: (String with: (Character codePoint: 16r20AC)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.