From 7812952ad85033dfd1a80f078c8044393283fcef Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Thu, 14 Jul 2016 21:36:42 +0200 Subject: [PATCH 01/90] Sync with upstream MC repositories --- .../instance/stable..st | 4 +++- .../methodProperties.json | 12 +++++++++++- .../monticello.meta/version | 2 +- .../instance/initialize.st | 3 ++- .../instance/mapProperty.getter.setter..st | 3 ++- .../instance/propertyNamed.ifAbsent..st | 2 +- .../instance/readFrom..st | 3 +++ .../instance/writeObject.on..st | 2 +- .../methodProperties.json | 11 ++++++----- .../properties.json | 3 ++- .../instance/writeObject.on..st | 4 ++-- .../methodProperties.json | 3 ++- .../NeoJSONReader.class/README.md | 6 +++++- .../NeoJSONReader.class/instance/nextAs..st | 3 ++- .../instance/parseCharacterHex.st | 19 +++++++++++++------ .../instance/parseCharacterHexDigit.st | 2 +- .../NeoJSONReader.class/methodProperties.json | 7 +++++-- .../NeoJSONReader.class/properties.json | 2 +- .../methodProperties.json | 3 ++- .../instance/escapeChar..st | 3 +-- .../instance/initialize.st | 1 + .../NeoJSONWriter.class/methodProperties.json | 8 ++++++-- .../NeoJSONWriter.class/properties.json | 3 ++- .../monticello.meta/version | 2 +- .../methodProperties.json | 3 +++ .../methodProperties.json | 3 +++ .../monticello.meta/version | 2 +- 27 files changed, 83 insertions(+), 36 deletions(-) diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/stable..st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/stable..st index ff279b2..5df5d45 100644 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/stable..st +++ b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/stable..st @@ -2,4 +2,6 @@ symbolic versions stable: spec - spec for: #common version: '9' \ No newline at end of file + spec for: #common version: '13'. + + spec for: #gemstone version: '13'. \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/methodProperties.json b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/methodProperties.json index 43561f7..9808d89 100644 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/methodProperties.json +++ b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/methodProperties.json @@ -2,6 +2,9 @@ "class" : { "DevelopmentSupport" : "SvenVanCaekenberghe 6/22/2012 16:48", "baseConfigurationClassIfAbsent:" : "SvenVanCaekenberghe 6/22/2012 16:48", + "catalogContactInfo" : "SvenVanCaekenberghe 1/5/2016 09:38", + "catalogDescription" : "SvenVanCaekenberghe 1/5/2016 09:39", + "catalogKeywords" : "SvenVanCaekenberghe 1/5/2016 09:39", "ensureMetacello" : "SvenVanCaekenberghe 6/22/2012 16:48", "ensureMetacelloBaseConfiguration" : "SvenVanCaekenberghe 6/22/2012 16:48", "isMetacelloConfig" : "SvenVanCaekenberghe 6/22/2012 16:48", @@ -12,8 +15,15 @@ "validate" : "SvenVanCaekenberghe 6/22/2012 16:48" }, "instance" : { "baseline1:" : "SvenVanCaekenberghe 6/22/2012 16:53", + "baseline2:" : "PaulDeBruicker 11/2/2014 20:39", + "bleedingEdge:" : "SvenVanCaekenberghe 7/11/2016 10:22", + "development:" : "SvenVanCaekenberghe 7/11/2016 10:22", "project" : "SvenVanCaekenberghe 6/22/2012 16:48", - "stable:" : "SvenVanCaekenberghe 4/24/2014 13:29", + "stable:" : "SvenVanCaekenberghe 7/11/2016 10:22", + "version10:" : "SvenVanCaekenberghe 3/29/2015 11:39", + "version11:" : "SvenVanCaekenberghe 11/25/2015 09:34", + "version12:" : "SvenVanCaekenberghe 1/22/2016 12:58", + "version13:" : "SvenVanCaekenberghe 7/4/2016 14:58", "version1:" : "SvenVanCaekenberghe 9/27/2012 20:29", "version2:" : "SvenVanCaekenberghe 12/18/2012 10:27", "version3:" : "SvenVanCaekenberghe 5/29/2013 15:54", diff --git a/repository/ConfigurationOfNeoJSON.package/monticello.meta/version b/repository/ConfigurationOfNeoJSON.package/monticello.meta/version index 8987e7d..c98b642 100644 --- a/repository/ConfigurationOfNeoJSON.package/monticello.meta/version +++ b/repository/ConfigurationOfNeoJSON.package/monticello.meta/version @@ -1 +1 @@ -(name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.10' message 'updated to #stable v9' id '14b025d0-da85-481f-924f-39f5fbdbc929' date '24 April 2014' time '1:30:05.463071 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.9' message 'v8' id '7ed1d4a7-e738-401a-9cac-69b85aa16b2e' date '21 January 2014' time '8:08:56.986201 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.8' message 'updated to stable v7' id '679ab4c1-1a64-426f-89ca-21722fc74519' date '27 December 2013' time '9:45:29.870451 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.7' message 'updated to stable v6' id '820b367a-f793-4fac-b5a2-1dd1ac73e48e' date '27 December 2013' time '7:03:35.869612 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.6' message 'New feature: NeoJSONWriter>>#asciiOnly: to escape all non ASCII characters in strings' id '27393a62-ca8a-4ad4-808c-ab2f6af1eff3' date '3 September 2013' time '12:23:21.522443 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.5' message 'updated to v4' id '7a79620f-07ab-4204-b37d-160779d1b946' date '30 August 2013' time '11:12:49.896139 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.4' message 'stable v3' id '8351f635-abd1-44eb-803b-05ae75b962d8' date '29 May 2013' time '3:54:34.113576 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.3' message 'stable version 2' id '4b6f70ed-72be-4f87-82a6-2f9745d99eba' date '18 December 2012' time '10:28:02.924 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.2' message 'added spec blessing: #release to all versiosn' id 'da8a252c-180e-4245-84d6-c0f0b3c43d8d' date '27 September 2012' time '8:30:34.121 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.1' message '1st version' id '43b49eb6-24b6-4665-a7b7-88fafe008cf9' date '22 June 2012' time '4:56:37.24 pm' author 'SvenVanCaekenberghe' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ()) \ No newline at end of file +(name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.18' message 'remove fixed version for Pharo 2' id 'd0a7ed10-3489-4c44-8660-a32ca7e310f9' date '11 July 2016' time '10:24:09.934133 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.17' message 'new stable v13 fixed v13 as development & bleedingEdge for pharo 2' id 'e3db452a-9cb1-4905-8137-7d2000bffc5c' date '4 July 2016' time '3:05:08.240172 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.16' message 'new #stable version 12' id '01f3f962-be93-4c82-8202-811cb23ee382' date '22 January 2016' time '12:59:31.613337 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.15' message 'Added Pharo Catalog methods' id 'a72d39e2-a388-4a8b-bcd1-befe683fcd54' date '5 January 2016' time '9:44:59.254937 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.14' message 'updated to #stable version 11' id '02843207-1071-4d38-965e-9be4f6d00dd3' date '25 November 2015' time '9:35:11.431058 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.12' message 'upgrade to #stable version 10 for #common' id '556e99db-c3b6-4fe8-9aa4-dd6d254cc358' date '29 March 2015' time '11:40:22.992972 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-PaulDeBruicker.11' message 'Added GemStone to the configuration' id '568062a9-b890-418e-91f1-428f5ed94522' date '2 November 2014' time '8:40:58.359238 pm' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.10' message 'updated to #stable v9' id '14b025d0-da85-481f-924f-39f5fbdbc929' date '24 April 2014' time '1:30:05.463071 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.9' message 'v8' id '7ed1d4a7-e738-401a-9cac-69b85aa16b2e' date '21 January 2014' time '8:08:56.986201 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.8' message 'updated to stable v7' id '679ab4c1-1a64-426f-89ca-21722fc74519' date '27 December 2013' time '9:45:29.870451 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.7' message 'updated to stable v6' id '820b367a-f793-4fac-b5a2-1dd1ac73e48e' date '27 December 2013' time '7:03:35.869612 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.6' message 'New feature: NeoJSONWriter>>#asciiOnly: to escape all non ASCII characters in strings' id '27393a62-ca8a-4ad4-808c-ab2f6af1eff3' date '3 September 2013' time '12:23:21.522443 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.5' message 'updated to v4' id '7a79620f-07ab-4204-b37d-160779d1b946' date '30 August 2013' time '11:12:49.896139 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.4' message 'stable v3' id '8351f635-abd1-44eb-803b-05ae75b962d8' date '29 May 2013' time '3:54:34.113576 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.3' message 'stable version 2' id '4b6f70ed-72be-4f87-82a6-2f9745d99eba' date '18 December 2012' time '10:28:02.924 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.2' message 'added spec blessing: #release to all versiosn' id 'da8a252c-180e-4245-84d6-c0f0b3c43d8d' date '27 September 2012' time '8:30:34.121 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.1' message '1st version' id '43b49eb6-24b6-4665-a7b7-88fafe008cf9' date '22 June 2012' time '4:56:37.24 pm' author 'SvenVanCaekenberghe' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ()) \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/initialize.st b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/initialize.st index 0a5b43c..074317d 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/initialize.st +++ b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/initialize.st @@ -1,4 +1,5 @@ initialize-release initialize super initialize. - properties := Dictionary new. \ No newline at end of file + properties := OrderedCollection new. + allowNil := false \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapProperty.getter.setter..st b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapProperty.getter.setter..st index 7d7895b..0674e13 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapProperty.getter.setter..st +++ b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapProperty.getter.setter..st @@ -6,5 +6,6 @@ mapProperty: propertyName getter: readBlock setter: writeBlock propertyName: propertyName; getter: readBlock; setter: writeBlock. - properties at: propertyName put: propertyMapping. + properties removeAllSuchThat: [ :each | each propertyName = propertyName ]. + properties addLast: propertyMapping. ^ propertyMapping \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/propertyNamed.ifAbsent..st b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/propertyNamed.ifAbsent..st index dc78466..242dceb 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/propertyNamed.ifAbsent..st +++ b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/propertyNamed.ifAbsent..st @@ -1,3 +1,3 @@ accessing propertyNamed: propertyName ifAbsent: block - ^ properties at: propertyName ifAbsent: block \ No newline at end of file + ^ properties detect: [ :each | each propertyName = propertyName ] ifNone: block \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/readFrom..st b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/readFrom..st index 2dc73cb..ffb2d7d 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/readFrom..st +++ b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/readFrom..st @@ -2,6 +2,9 @@ parsing readFrom: jsonReader | anObject | anObject := subjectClass new. + allowNil ifTrue: [ + jsonReader parseConstantDo: [ :value | + ^ value ifNotNil: [ jsonReader error: 'Unexpected boolean constant' ] ] ]. jsonReader parseMapKeysDo: [ :key | (self propertyNamed: key ifAbsent: [ nil ]) ifNil: [ diff --git a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/writeObject.on..st b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/writeObject.on..st index c733ca3..96857d6 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/writeObject.on..st +++ b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/writeObject.on..st @@ -1,5 +1,5 @@ writing writeObject: anObject on: jsonWriter jsonWriter writeMapStreamingDo: [ :jsonMapWriter | - properties valuesDo: [ :each | + properties do: [ :each | each writeObject: anObject on: jsonMapWriter ] ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/methodProperties.json b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/methodProperties.json index 81cf6b1..abe87b8 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/methodProperties.json +++ b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/methodProperties.json @@ -2,8 +2,9 @@ "class" : { }, "instance" : { + "allowNil" : "SvenVanCaekenberghe 12/30/2015 11:44", "identifier" : "SvenVanCaekenberghe 3/23/2014 19:25", - "initialize" : "SvenVanCaekenberghe 6/5/2012 22:50", + "initialize" : "SvenVanCaekenberghe 7/11/2016 10:54", "mapAccessor:" : "SvenVanCaekenberghe 6/12/2012 13:13", "mapAccessor:mutator:to:" : "SvenVanCaekenberghe 6/12/2012 13:12", "mapAccessor:to:" : "SvenVanCaekenberghe 6/12/2012 13:13", @@ -13,8 +14,8 @@ "mapInstVar:to:" : "SvenVanCaekenberghe 6/9/2012 18:36", "mapInstVars" : "SvenVanCaekenberghe 6/6/2012 15:59", "mapInstVars:" : "SvenVanCaekenberghe 6/6/2012 16:00", - "mapProperty:getter:setter:" : "SvenVanCaekenberghe 6/9/2012 18:13", - "propertyNamed:ifAbsent:" : "SvenVanCaekenberghe 6/7/2012 14:52", - "readFrom:" : "SvenVanCaekenberghe 6/8/2012 17:13", + "mapProperty:getter:setter:" : "SvenVanCaekenberghe 7/11/2016 11:01", + "propertyNamed:ifAbsent:" : "SvenVanCaekenberghe 7/11/2016 10:58", + "readFrom:" : "SvenVanCaekenberghe 12/30/2015 11:48", "subjectClass:" : "SvenVanCaekenberghe 6/6/2012 15:32", - "writeObject:on:" : "SvenVanCaekenberghe 6/6/2012 14:55" } } + "writeObject:on:" : "SvenVanCaekenberghe 7/11/2016 10:54" } } diff --git a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/properties.json b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/properties.json index 8f3cf92..7f6beda 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/properties.json +++ b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/properties.json @@ -7,7 +7,8 @@ "commentStamp" : "", "instvars" : [ "subjectClass", - "properties" ], + "properties", + "allowNil" ], "name" : "NeoJSONObjectMapping", "pools" : [ ], diff --git a/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/writeObject.on..st b/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/writeObject.on..st index 2efaaf7..b3b0f51 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/writeObject.on..st +++ b/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/writeObject.on..st @@ -2,5 +2,5 @@ writing writeObject: anObject on: jsonMapWriter | value | value := getter value: anObject. - value - ifNotNil: [ jsonMapWriter writeKey: propertyName value: value as: valueSchema ] \ No newline at end of file + (value notNil or: [ jsonMapWriter writeNil ]) + ifTrue: [ jsonMapWriter writeKey: propertyName value: value as: valueSchema ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/methodProperties.json b/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/methodProperties.json index 8bd2fd9..417cca5 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/methodProperties.json +++ b/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/methodProperties.json @@ -4,8 +4,9 @@ "instance" : { "getter:" : "SvenVanCaekenberghe 6/6/2012 15:34", "printOn:" : "SvenVanCaekenberghe 7/4/2013 19:07", + "propertyName" : "SvenVanCaekenberghe 7/11/2016 10:59", "propertyName:" : "SvenVanCaekenberghe 6/6/2012 15:34", "readObject:from:" : "SvenVanCaekenberghe 6/8/2012 17:04", "setter:" : "SvenVanCaekenberghe 6/6/2012 15:34", "valueSchema:" : "SvenVanCaekenberghe 6/8/2012 17:01", - "writeObject:on:" : "SvenVanCaekenberghe 3/23/2014 21:55" } } + "writeObject:on:" : "SvenVanCaekenberghe 5/28/2014 20:46" } } diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/README.md b/repository/Neo-JSON-Core.package/NeoJSONReader.class/README.md index 284de65..9a24cec 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/README.md +++ b/repository/Neo-JSON-Core.package/NeoJSONReader.class/README.md @@ -22,4 +22,8 @@ Here are some examples: mapInstVarsFor: Point; for: #ArrayOfPoints customDo: [ :mapping | mapping listOfElementSchema: Point ]; - nextAs: #ArrayOfPoints. \ No newline at end of file + nextAs: #ArrayOfPoints. + + (NeoJSONReader on: '[ { "x" : 1, "y" : 2 }, { "x" : 3, "y" : 4 } ]' readStream) + mapInstVarsFor: Point; + nextListAs: Point. \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/nextAs..st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/nextAs..st index 523ac07..d41ad39 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/nextAs..st +++ b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/nextAs..st @@ -1,7 +1,8 @@ accessing nextAs: schema "Secondary interface to parse JSON. - Return objects according to schema." + Return an object according to schema. + If schema is nil, act like #next" | mapping | schema ifNil: [ ^ self next ]. diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacterHex.st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacterHex.st index 7a45f0e..78a4862 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacterHex.st +++ b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacterHex.st @@ -1,7 +1,14 @@ -parsing +private parseCharacterHex - | value | - value := self parseCharacterHexDigit. - 3 timesRepeat: [ - value := (value << 4) + self parseCharacterHexDigit ]. - ^ Character codePoint: value \ No newline at end of file + | value codePoint | + value := self parseCharacterHex4Value. + (value < 16rD800 or: [ value > 16rDBFF ]) + ifTrue: [ codePoint := value ] + ifFalse: [ | leadSurrogate trailSurrogate | + "Characters not in the Basic Multilingual Plane are encoded as a UTF-16 surrogate pair" + "See https://tools.ietf.org/html/rfc7159#section-7" + leadSurrogate := value. + trailSurrogate := self parseTrailingSurrogateHexEscape. + codePoint := (leadSurrogate - 16rD800) * 16r400 + (trailSurrogate - 16rDC00). + codePoint := 16r10000 + codePoint ]. + ^ Character codePoint: codePoint \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacterHexDigit.st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacterHexDigit.st index 54b1762..0456f7a 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacterHexDigit.st +++ b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacterHexDigit.st @@ -1,4 +1,4 @@ -parsing +private parseCharacterHexDigit | digit | readStream atEnd diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/methodProperties.json b/repository/Neo-JSON-Core.package/NeoJSONReader.class/methodProperties.json index f98cfba..2ce8a27 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/methodProperties.json +++ b/repository/Neo-JSON-Core.package/NeoJSONReader.class/methodProperties.json @@ -17,10 +17,12 @@ "match:do:" : "SvenVanCaekenberghe 12/3/2012 10:57", "matchChar:" : "SvenVanCaekenberghe 12/3/2012 10:51", "next" : "SvenVanCaekenberghe 6/7/2012 16:56", - "nextAs:" : "SvenVanCaekenberghe 6/7/2012 22:21", + "nextAs:" : "SvenVanCaekenberghe 3/16/2016 11:21", + "nextListAs:" : "SvenVanCaekenberghe 3/16/2016 10:58", "on:" : "SvenVanCaekenberghe 6/13/2012 16:10", "parseCharacter" : "SvenVanCaekenberghe 6/7/2012 16:59", - "parseCharacterHex" : "SvenVanCaekenberghe 6/2/2012 14:20", + "parseCharacterHex" : "SvenVanCaekenberghe 2/24/2016 14:48", + "parseCharacterHex4Value" : "SvenVanCaekenberghe 2/24/2016 14:41", "parseCharacterHexDigit" : "SvenVanCaekenberghe 6/2/2012 14:21", "parseConstantDo:" : "SvenVanCaekenberghe 6/2/2012 14:16", "parseList" : "SvenVanCaekenberghe 6/7/2012 17:17", @@ -36,6 +38,7 @@ "parseNumberInteger" : "SvenVanCaekenberghe 6/12/2012 16:15", "parsePropertyName" : "SvenVanCaekenberghe 6/13/2012 09:40", "parseString" : "SvenVanCaekenberghe 6/2/2012 13:58", + "parseTrailingSurrogateHexEscape" : "SvenVanCaekenberghe 2/24/2016 14:49", "parseValue" : "SvenVanCaekenberghe 6/12/2012 15:56", "propertyNamesAsSymbols:" : "SvenVanCaekenberghe 6/13/2012 09:39", "stringStreamContents:" : "SvenVanCaekenberghe 6/7/2012 16:54", diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/properties.json b/repository/Neo-JSON-Core.package/NeoJSONReader.class/properties.json index e7732a1..e32ffd6 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/properties.json +++ b/repository/Neo-JSON-Core.package/NeoJSONReader.class/properties.json @@ -4,7 +4,7 @@ ], "classvars" : [ ], - "commentStamp" : "", + "commentStamp" : "SvenVanCaekenberghe 3/16/2016 11:23", "instvars" : [ "readStream", "stringStream", diff --git a/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/methodProperties.json b/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/methodProperties.json index 7e6faed..2b433d9 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/methodProperties.json +++ b/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/methodProperties.json @@ -7,4 +7,5 @@ "wasUsed" : "SvenVanCaekenberghe 6/6/2012 15:00", "writeElement:" : "SvenVanCaekenberghe 6/6/2012 15:15", "writeKey:value:" : "SvenVanCaekenberghe 6/6/2012 15:01", - "writeKey:value:as:" : "SvenVanCaekenberghe 3/23/2014 21:53" } } + "writeKey:value:as:" : "SvenVanCaekenberghe 3/23/2014 21:53", + "writeNil" : "SvenVanCaekenberghe 5/28/2014 20:45" } } diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/escapeChar..st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/escapeChar..st index 897915f..fdedb11 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/escapeChar..st +++ b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/escapeChar..st @@ -16,5 +16,4 @@ escapeChar: code ifTrue: [ ^ writeStream nextPutAll: '\r' ]. code = 9 ifTrue: [ ^ writeStream nextPutAll: '\t' ]. - writeStream nextPutAll: '\u'. - code printOn: writeStream base: 16 nDigits: 4 \ No newline at end of file + self escapeUnicode: code \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/initialize.st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/initialize.st index fc927ad..aa1c0c6 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/initialize.st +++ b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/initialize.st @@ -4,4 +4,5 @@ initialize self newLine: String cr. self prettyPrint: false. self asciiOnly: false. + self writeNil: false. level := 0 \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/methodProperties.json b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/methodProperties.json index cc5e9e9..33d9372 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/methodProperties.json +++ b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/methodProperties.json @@ -10,9 +10,11 @@ "encodeChar:" : "SvenVanCaekenberghe 9/3/2013 11:55", "encodeKey:value:" : "SvenVanCaekenberghe 6/3/2012 19:41", "encodeKey:value:as:" : "SvenVanCaekenberghe 3/23/2014 21:53", - "escapeChar:" : "SvenVanCaekenberghe 6/2/2012 22:45", + "escapeChar:" : "SvenVanCaekenberghe 2/24/2016 14:17", + "escapeUnicode4:" : "SvenVanCaekenberghe 2/24/2016 14:29", + "escapeUnicode:" : "SvenVanCaekenberghe 2/24/2016 14:48", "indentedDo:" : "SvenVanCaekenberghe 6/3/2012 19:31", - "initialize" : "SvenVanCaekenberghe 4/17/2014 11:58", + "initialize" : "SvenVanCaekenberghe 5/28/2014 20:43", "listElementSeparator" : "SvenVanCaekenberghe 6/3/2012 19:32", "mapElementSeparator" : "SvenVanCaekenberghe 6/3/2012 19:32", "newLine:" : "SvenVanCaekenberghe 12/10/2012 16:27", @@ -30,6 +32,8 @@ "writeListStreamingDo:" : "SvenVanCaekenberghe 6/6/2012 15:19", "writeMap:" : "SvenVanCaekenberghe 6/6/2012 15:04", "writeMapStreamingDo:" : "SvenVanCaekenberghe 6/6/2012 15:19", + "writeNil" : "SvenVanCaekenberghe 5/28/2014 20:44", + "writeNil:" : "SvenVanCaekenberghe 5/28/2014 20:43", "writeNull" : "SvenVanCaekenberghe 6/2/2012 22:15", "writeObject:" : "SvenVanCaekenberghe 6/7/2012 15:55", "writeStreamingDo:" : "SvenVanCaekenberghe 6/6/2012 15:19", diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/properties.json b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/properties.json index da76840..5e1d475 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/properties.json +++ b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/properties.json @@ -10,7 +10,8 @@ "prettyPrint", "level", "newLine", - "asciiOnly" ], + "asciiOnly", + "writeNil" ], "name" : "NeoJSONWriter", "pools" : [ ], diff --git a/repository/Neo-JSON-Core.package/monticello.meta/version b/repository/Neo-JSON-Core.package/monticello.meta/version index b710dd5..7098ba4 100644 --- a/repository/Neo-JSON-Core.package/monticello.meta/version +++ b/repository/Neo-JSON-Core.package/monticello.meta/version @@ -1 +1 @@ -(name 'Neo-JSON-Core-SvenVanCaekenberghe.27' message 'Added NeoJSONWriter>>#newline to write an end of line on the wrapped stream depending on the #newLine: setting' id '5a262fd6-a42d-4102-b554-26e4f1eade3d' date '17 April 2014' time '12:12:47.207836 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.26' message 'Added new feature NeoJSONWriter>>#nextPutAs: symmetrical to NeoJSONReader>>#next:as: More specifically NeoJSONPropertyMapping>>#writeObjectOn: now respects the valueSchema if it exists using NeoJSONStreamingWriter>>#writeKey:value:as: and NeoJSONWriter>>#encodeKey:value:as: Made both the reader and writer blocks in NeoJSONCustomMapping optional with a fallback to default behavior Refactoring: added NeoJSONMapping abstract superclass above NeoJSONObjectMapping and NeoJSONCustomMapping to better clarify the design' id '41d2075d-bca4-4c08-bdf8-ed0c8da9bcf2' date '24 March 2014' time '12:18:21.026173 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.25' message 'Added basic support for mapping using inheritance when using #neoJonMapping : (see #testObject3) Renamed #new[Custom|Object]MappingFor: to [custom|object]MappingFor: to better reflect the new behavior Thanks Philippe Back for making these suggestions!' id '3051cd7d-a857-4aee-b5ba-d56a4085517b' date '22 March 2014' time '11:03:31.510538 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.24' message 'New feature: NeoJSONWriter>>#asciiOnly: to escape all non ASCII characters in strings' id '9f2d3ef6-abbb-46c1-bce7-95a6bd8b4954' date '3 September 2013' time '12:21:28.781401 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.23' message 'Added NeoJSONCustomMapping>>#mapWithValueSchema:' id '6d0d538b-6fb1-41ac-92ee-05721924c5c4' date '30 August 2013' time '11:09:17.235312 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.22' message 'Fix more double dots in the source code of #printOn: that hampered Gemstone compatibility (thx Sebastian Heidbrink)' id 'd15895fc-5743-4ec8-b99f-76fa5f72baf4' date '4 July 2013' time '7:25:56.931 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.21' message 'Fix a double dot in the source code of NeoJSONCustomWrapper>>#printOn: that hampered Gemstone compatibility (thx Sebastian Heidbrink)' id '3fcb3755-32a9-4c17-ac08-6721bf37a301' date '4 July 2013' time '6:41:52.665 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.20' message 'Added NeoJSONReader>>#atEnd' id 'afd8e136-e594-4bef-ad4b-7d3bc48fc36e' date '6 March 2013' time '3:24:11.242 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.19' message 'added NeoJSONWriter>>#newLine: to customize the end of line convention when pretty printing' id 'bf3e7e59-8300-44a6-889e-1f866c8d2977' date '10 December 2012' time '5:11:36.655 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.18' message 'minor refactoring using #peekFor:' id 'e1330b1e-87f4-4ea3-b81c-5deb03652c0d' date '3 December 2012' time '11:10:22.335 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.17' message 'modified by accident, not really changed' id 'a18f519f-c220-4ea1-a6bb-163e2c70eab7' date '14 June 2012' time '10:01:07.225 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.16' message 'documented the character stream API being used' id '5ba3bcd2-e7a6-4b07-91af-af04c7f98624' date '13 June 2012' time '4:29:08.628 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.15' message 'bugfix in NeoJSONReader>>#match:do: added examples to class comments' id '89ad4ee7-3035-43af-9d5c-cbbef6bcb3f0' date '13 June 2012' time '2:58:00.219 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.14' message 'extended NeoJSONReader with settable listClass and mapClass as well as a propertyNamesAsSymbols option extended class and method comments' id '3f749c2c-b53b-4d56-bb65-bfe964b5a69b' date '13 June 2012' time '11:56:19.567 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.13' message 'made NeoJSONReader>>parseNumberInteger more strict' id '5233f22a-8653-43c2-8651-bf5fa274b3da' date '12 June 2012' time '4:19:27.63 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.12' message 'introduced some custom exceptions' id 'bb6ec6aa-4e5d-4fac-9aa4-629ea6f068b6' date '12 June 2012' time '3:57:32.274 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.11' message 'major simplification: removed NeoJSON[Composite|List|Map]Mapping, all to be handled by blocks in NeoJSONCustomMapping renamed forCustom:do: to for:customDo: accessor based mapping to NeoJSONObjectMapping ' id '82a72131-e968-4ffe-af32-60085b4ecc67' date '12 June 2012' time '1:36:03.263 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.10' message 'optimized NeoJSONWriter>>#encodeChar: to do minimal work' id 'a684bb8c-d2d0-4a4b-8af2-da24c3f5fda4' date '10 June 2012' time '9:27:46.001 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.9' message 'added NeoJSONTestObject1 with class side #neoJsonMapping: method' id '49129177-ee36-4e4b-890e-314e92f23d76' date '9 June 2012' time '6:56:12.413 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.8' message 'added custom mapping' id 'b02af4e3-7a91-471f-81a0-57db8b43a87d' date '8 June 2012' time '10:09:41.079 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.7' message 'adding valueSchema to propertyMapping' id '61c29ad0-e2a6-40af-8360-24952a5e6633' date '8 June 2012' time '8:35:55 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.6' message '1st version where list mapping works on some simple examples' id 'e3250e47-9c16-461e-8d2e-e8031e4cc2be' date '8 June 2012' time '4:40:26 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.5' message 'introduced NeoJSONMapper 1st simplified version of NeoJSONReader>>#nextAs:' id '8a4a2338-c728-4ec5-bae9-8232abd6d7f6' date '7 June 2012' time '3:52:29 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.4' message '1st version with working object mapping for writer' id '0208c7c7-3ab1-4081-9061-9c6ca9d7e7cf' date '6 June 2012' time '8:47:04 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.3' message 'added more tests and a simple benchmark' id '2567c409-eb97-428e-a865-e6d078d23dff' date '4 June 2012' time '6:52:34 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.2' message 'first simple version of NeoJSONWriter' id '7e6474b7-70ed-4cb0-8348-05adddc17853' date '3 June 2012' time '7:57:41 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.1' message 'first simple version of NeoJSONReader' id 'e0039613-c57d-47ae-8838-db64917ca722' date '2 June 2012' time '9:59:42 pm' author 'SvenVanCaekenberghe' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ()) \ No newline at end of file +(name 'Neo-JSON-Core-SvenVanCaekenberghe.36' message 'Use an OrderedCollection instead of a some Dictionary to store the properties inside a NeoJSONObjectMapping ' id 'aab6c89f-0fbc-4f3c-8aa9-4da1c71f72b2' date '11 July 2016' time '11:03:30.192353 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.35' message 'Add NeoJSONObjectMapping>>#dictionaryForProperties with hack to cover more Pharo versions' id 'a137c050-87c4-4d1c-89c3-d558cfe78ff5' date '11 July 2016' time '10:23:25.017843 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.34' message 'Use an OrderedDictionary instead of a regular Dictionary to store the properties inside a NeoJSONObjectMapping - this allows the user to control the order of properties while writing, if needed Add NeoJSONWriterTests>>#testPreservePropertyOrder' id 'ded70581-c06f-4687-936c-11a029a39ba4' date '2 July 2016' time '12:03:08.919979 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.33' message 'Added NeoJSONReader>>#nextListAs: as suggested by Norbert Hartl Added NeoJSONReaderTests>>#testArrayOfPointsUsingNextListAs' id '34aac279-4fef-4476-9201-95a64efaea6f' date '16 March 2016' time '11:24:47.837176 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.32' message 'Added support for characters not in the Basic Multilingual Plane encoding as a UTF-16 surrogate pair See https://tools.ietf.org/html/rfc7159#section-7' id 'fd9330ff-1b0e-4e0c-b011-defc809a9a9e' date '24 February 2016' time '2:51:06.880365 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.31' message 'New #allowNil option to Object mapping so that null values are accepted and returned as nil when reading a schema using #nextAs: (off by default) Added NeoJSONObjectMapping>>#allowNil Added NeoJSONReaderTests>>#testAllowNil' id 'fb235526-3c04-4e5f-a543-9a7e9eaaac2a' date '30 December 2015' time '12:31:59.303349 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.30' message 'Add OrderedDictionary>>#neoJsonOn: to write it as a map (Thx Paul Wilke)' id '9f42a6bd-1b9f-4ecd-99de-d9283fac6920' date '26 August 2015' time '12:42:05.743206 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.29' message 'Added NeoJSONObject, a convencience subclass of Dictionary that mimics some JavaScript behavior' id '4d5a39e4-c7f3-48ee-9366-36d9e45068ce' date '8 September 2014' time '2:26:09.557335 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.28' message 'Added NeoJSONWriter #writeNil property, defaulting to false; when true, nil instance variables will be written as null by NeoJSONPropertyMapping, else they will be skipped' id 'd6927f86-5b87-4ba2-99c1-cfe5b58ed22f' date '28 May 2014' time '8:52:57.799163 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.27' message 'Added NeoJSONWriter>>#newline to write an end of line on the wrapped stream depending on the #newLine: setting' id '5a262fd6-a42d-4102-b554-26e4f1eade3d' date '17 April 2014' time '12:12:47.207836 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.26' message 'Added new feature NeoJSONWriter>>#nextPutAs: symmetrical to NeoJSONReader>>#next:as: More specifically NeoJSONPropertyMapping>>#writeObjectOn: now respects the valueSchema if it exists using NeoJSONStreamingWriter>>#writeKey:value:as: and NeoJSONWriter>>#encodeKey:value:as: Made both the reader and writer blocks in NeoJSONCustomMapping optional with a fallback to default behavior Refactoring: added NeoJSONMapping abstract superclass above NeoJSONObjectMapping and NeoJSONCustomMapping to better clarify the design' id '41d2075d-bca4-4c08-bdf8-ed0c8da9bcf2' date '24 March 2014' time '12:18:21.026173 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.25' message 'Added basic support for mapping using inheritance when using #neoJonMapping : (see #testObject3) Renamed #new[Custom|Object]MappingFor: to [custom|object]MappingFor: to better reflect the new behavior Thanks Philippe Back for making these suggestions!' id '3051cd7d-a857-4aee-b5ba-d56a4085517b' date '22 March 2014' time '11:03:31.510538 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.24' message 'New feature: NeoJSONWriter>>#asciiOnly: to escape all non ASCII characters in strings' id '9f2d3ef6-abbb-46c1-bce7-95a6bd8b4954' date '3 September 2013' time '12:21:28.781401 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.23' message 'Added NeoJSONCustomMapping>>#mapWithValueSchema:' id '6d0d538b-6fb1-41ac-92ee-05721924c5c4' date '30 August 2013' time '11:09:17.235312 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.22' message 'Fix more double dots in the source code of #printOn: that hampered Gemstone compatibility (thx Sebastian Heidbrink)' id 'd15895fc-5743-4ec8-b99f-76fa5f72baf4' date '4 July 2013' time '7:25:56.931 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.21' message 'Fix a double dot in the source code of NeoJSONCustomWrapper>>#printOn: that hampered Gemstone compatibility (thx Sebastian Heidbrink)' id '3fcb3755-32a9-4c17-ac08-6721bf37a301' date '4 July 2013' time '6:41:52.665 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.20' message 'Added NeoJSONReader>>#atEnd' id 'afd8e136-e594-4bef-ad4b-7d3bc48fc36e' date '6 March 2013' time '3:24:11.242 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.19' message 'added NeoJSONWriter>>#newLine: to customize the end of line convention when pretty printing' id 'bf3e7e59-8300-44a6-889e-1f866c8d2977' date '10 December 2012' time '5:11:36.655 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.18' message 'minor refactoring using #peekFor:' id 'e1330b1e-87f4-4ea3-b81c-5deb03652c0d' date '3 December 2012' time '11:10:22.335 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.17' message 'modified by accident, not really changed' id 'a18f519f-c220-4ea1-a6bb-163e2c70eab7' date '14 June 2012' time '10:01:07.225 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.16' message 'documented the character stream API being used' id '5ba3bcd2-e7a6-4b07-91af-af04c7f98624' date '13 June 2012' time '4:29:08.628 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.15' message 'bugfix in NeoJSONReader>>#match:do: added examples to class comments' id '89ad4ee7-3035-43af-9d5c-cbbef6bcb3f0' date '13 June 2012' time '2:58:00.219 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.14' message 'extended NeoJSONReader with settable listClass and mapClass as well as a propertyNamesAsSymbols option extended class and method comments' id '3f749c2c-b53b-4d56-bb65-bfe964b5a69b' date '13 June 2012' time '11:56:19.567 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.13' message 'made NeoJSONReader>>parseNumberInteger more strict' id '5233f22a-8653-43c2-8651-bf5fa274b3da' date '12 June 2012' time '4:19:27.63 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.12' message 'introduced some custom exceptions' id 'bb6ec6aa-4e5d-4fac-9aa4-629ea6f068b6' date '12 June 2012' time '3:57:32.274 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.11' message 'major simplification: removed NeoJSON[Composite|List|Map]Mapping, all to be handled by blocks in NeoJSONCustomMapping renamed forCustom:do: to for:customDo: accessor based mapping to NeoJSONObjectMapping ' id '82a72131-e968-4ffe-af32-60085b4ecc67' date '12 June 2012' time '1:36:03.263 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.10' message 'optimized NeoJSONWriter>>#encodeChar: to do minimal work' id 'a684bb8c-d2d0-4a4b-8af2-da24c3f5fda4' date '10 June 2012' time '9:27:46.001 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.9' message 'added NeoJSONTestObject1 with class side #neoJsonMapping: method' id '49129177-ee36-4e4b-890e-314e92f23d76' date '9 June 2012' time '6:56:12.413 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.8' message 'added custom mapping' id 'b02af4e3-7a91-471f-81a0-57db8b43a87d' date '8 June 2012' time '10:09:41.079 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.7' message 'adding valueSchema to propertyMapping' id '61c29ad0-e2a6-40af-8360-24952a5e6633' date '8 June 2012' time '8:35:55 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.6' message '1st version where list mapping works on some simple examples' id 'e3250e47-9c16-461e-8d2e-e8031e4cc2be' date '8 June 2012' time '4:40:26 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.5' message 'introduced NeoJSONMapper 1st simplified version of NeoJSONReader>>#nextAs:' id '8a4a2338-c728-4ec5-bae9-8232abd6d7f6' date '7 June 2012' time '3:52:29 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.4' message '1st version with working object mapping for writer' id '0208c7c7-3ab1-4081-9061-9c6ca9d7e7cf' date '6 June 2012' time '8:47:04 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.3' message 'added more tests and a simple benchmark' id '2567c409-eb97-428e-a865-e6d078d23dff' date '4 June 2012' time '6:52:34 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.2' message 'first simple version of NeoJSONWriter' id '7e6474b7-70ed-4cb0-8348-05adddc17853' date '3 June 2012' time '7:57:41 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.1' message 'first simple version of NeoJSONReader' id 'e0039613-c57d-47ae-8838-db64917ca722' date '2 June 2012' time '9:59:42 pm' author 'SvenVanCaekenberghe' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ()) \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/methodProperties.json b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/methodProperties.json index 9efc502..498f003 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/methodProperties.json +++ b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/methodProperties.json @@ -2,7 +2,9 @@ "class" : { }, "instance" : { + "testAllowNil" : "SvenVanCaekenberghe 12/30/2015 12:29", "testArrayOfPoints" : "SvenVanCaekenberghe 6/12/2012 12:32", + "testArrayOfPointsUsingNextListAs" : "SvenVanCaekenberghe 3/16/2016 10:58", "testAssociation" : "SvenVanCaekenberghe 6/12/2012 13:18", "testBooleans" : "SvenVanCaekenberghe 6/13/2012 14:44", "testByteArray" : "SvenVanCaekenberghe 6/12/2012 12:32", @@ -13,6 +15,7 @@ "testLists" : "SvenVanCaekenberghe 6/12/2012 16:16", "testMaps" : "SvenVanCaekenberghe 6/12/2012 16:16", "testNextStringAsHex" : "SvenVanCaekenberghe 3/24/2014 11:58", + "testNonBMPCharacterDecoding" : "SvenVanCaekenberghe 2/24/2016 14:15", "testNull" : "SvenVanCaekenberghe 6/13/2012 14:29", "testOrderedCollection" : "SvenVanCaekenberghe 6/13/2012 10:18", "testOrderedCollectionOfPoints" : "SvenVanCaekenberghe 6/12/2012 12:33", diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/methodProperties.json b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/methodProperties.json index df38c43..c2c77a4 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/methodProperties.json +++ b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/methodProperties.json @@ -13,12 +13,15 @@ "testLists" : "SvenVanCaekenberghe 6/3/2012 19:39", "testMaps" : "SvenVanCaekenberghe 6/3/2012 19:40", "testNextPutStringAsHex" : "SvenVanCaekenberghe 3/24/2014 11:57", + "testNonBMPCharacterEncoding" : "SvenVanCaekenberghe 2/24/2016 14:15", "testNull" : "SvenVanCaekenberghe 6/2/2012 22:23", "testPoint" : "SvenVanCaekenberghe 6/12/2012 15:58", "testPoint1" : "SvenVanCaekenberghe 6/8/2012 14:04", "testPoint2" : "SvenVanCaekenberghe 6/6/2012 17:29", "testPoint3" : "SvenVanCaekenberghe 6/8/2012 14:04", "testPointUsingAsString" : "SvenVanCaekenberghe 3/24/2014 10:41", + "testPointWriteNil" : "SvenVanCaekenberghe 5/28/2014 20:49", + "testPreservePropertyOrder" : "SvenVanCaekenberghe 7/1/2016 23:50", "testStrings" : "SvenVanCaekenberghe 6/10/2012 21:15", "testSymbol" : "SvenVanCaekenberghe 6/8/2012 21:56", "testTime" : "SvenVanCaekenberghe 6/12/2012 12:02" } } diff --git a/repository/Neo-JSON-Tests.package/monticello.meta/version b/repository/Neo-JSON-Tests.package/monticello.meta/version index d3b8752..1f66b2c 100644 --- a/repository/Neo-JSON-Tests.package/monticello.meta/version +++ b/repository/Neo-JSON-Tests.package/monticello.meta/version @@ -1 +1 @@ -(name 'Neo-JSON-Tests-SvenVanCaekenberghe.24' message 'Added new feature NeoJSONWriter>>#nextPutAs: symmetrical to NeoJSONReader>>#next:as: Added 4 unit test to exercise the new options' id '4c7461c1-82ea-4126-8b5c-ef307168120a' date '24 March 2014' time '12:19:53.503067 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.23' message 'Added basic support for mapping using inheritance when using #neoJonMapping : (see #testObject3) Renamed #new[Custom|Object]MappingFor: to [custom|object]MappingFor: to better reflect the new behavior Thanks Philippe Back for making these suggestions!' id '27fad240-c6b9-4d00-a4e6-6e49fd612dfb' date '22 March 2014' time '11:04:11.513921 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.22' message 'remove timing assertions from NeoJSONBenchmarkTests sinc they occasionally fail on the CI servers' id '3a07a705-816f-4981-9269-8d20620a00e2' date '15 January 2014' time '7:31:53.75366 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.21' message 'Increase the NeoJSONBenchmarkTests>>#testPrettyPrinter timeout even more' id '90807026-211d-4644-b211-1ea5bfd92bd6' date '27 December 2013' time '9:44:01.082714 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.20' message 'Give NeoJSONBenchmarksTests some more time to finish (on slow CI build slaves)' id 'f5f8f820-40d4-44ea-b5b6-8634e4cb7c5e' date '27 December 2013' time '7:01:23.816121 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.19' message 'New feature: NeoJSONWriter>>#asciiOnly: to escape all non ASCII characters in strings' id 'e1a69fdb-7e41-46f7-9f52-312eae3fab61' date '3 September 2013' time '12:21:56.262333 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.18' message 'Added tests for NeoJSONCustomMapping>>#mapWithValueSchema:' id '3f001444-6572-47d5-b656-96363c695522' date '30 August 2013' time '11:09:49.845805 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.17' message 'Make SmallDictionary optional in NeoJSONReaderTests>>#testSmallDictionary' id '5fa85190-9a4c-4b91-9747-f5e6a547e5ad' date '4 July 2013' time '6:43:12.874 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.16' message 'add NeoJSONMockStream>>#peekFor:' id 'baadfdb3-b8b4-4ce5-b072-0ebf67edd45f' date '3 December 2012' time '11:14:13.632 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.15' message 'added code to test the character stream API being used' id '696b4956-43ef-4fb8-a295-aa0bcc16685c' date '13 June 2012' time '4:29:41.988 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.14' message 'bugfix in NeoJSONReader>>#match:do: ' id '7e664c0d-c5c3-4e64-a784-c274a85a8230' date '13 June 2012' time '2:58:28.242 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.13' message 'extended NeoJSONReader with settable listClass and mapClass as well as a propertyNamesAsSymbols option extended class and method comments' id '4c90aab7-73c6-47fe-b52f-46954c06bf19' date '13 June 2012' time '11:57:09.49 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.12' message 'added tests for bogus input' id '50e7e260-7299-4ff8-880b-cbfd7bc8b30a' date '12 June 2012' time '4:20:02.239 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.11' message 'major simplification: removed NeoJSON[Composite|List|Map]Mapping, all to be handled by blocks in NeoJSONCustomMapping renamed forCustom:do: to for:customDo: accessor based mapping to NeoJSONObjectMapping ' id 'fcdc4252-6e15-4832-984f-84fbe1486163' date '12 June 2012' time '1:36:40.377 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.10' message 'added another benchmark' id '0f01e8f8-a367-4cb9-b730-1d8c0b411743' date '10 June 2012' time '9:28:30.577 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.9' message 'added NeoJSONTestObject1 with class side #neoJsonMapping: method' id 'ac3db680-73e6-4358-882c-e237697a7db4' date '9 June 2012' time '6:56:55.581 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.8' message 'added custom mapping tests' id '015e7c92-0411-4c7f-80b3-2d18a445250e' date '8 June 2012' time '10:10:24.734 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.7' message 'adding valueSchema to propertyMapping' id '9723e179-f1b9-4641-85ea-45ba89487b07' date '8 June 2012' time '8:36:25 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.6' message '1st version where list mapping works on some simple examples' id '6dbd0ade-2632-42a1-bd3c-45ef3fc0b596' date '8 June 2012' time '4:41:04 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.5' message '1st version with working object mapping for writer' id '59e0739f-bd31-4057-a366-2b5d27cf304c' date '6 June 2012' time '8:47:29 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.4' message 'added NeoJSONBenchmarkTests' id 'f36901e7-bb6d-4d6c-b4e8-5e70db8cce97' date '5 June 2012' time '5:30:17 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.3' message 'added more tests and a simple benchmark' id '5396d3f6-f1f0-46bc-961a-72a5919a9b79' date '4 June 2012' time '6:53:25 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.2' message 'first simple version of NeoJSONWriter' id '4b84c7e9-74d5-4b8b-bf9e-4be5fda1eb10' date '3 June 2012' time '7:58:06 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.1' message 'first simple version of NeoJSONReader' id '6927fec5-5a02-4ad2-8d4a-7be492da47da' date '2 June 2012' time '10:00:14 pm' author 'SvenVanCaekenberghe' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ()) \ No newline at end of file +(name 'Neo-JSON-Tests-SvenVanCaekenberghe.34' message 'Use an OrderedDictionary instead of a regular Dictionary to store the properties inside a NeoJSONObjectMapping - this allows the user to control the order of properties while writing, if needed Add NeoJSONWriterTests>>#testPreservePropertyOrder' id '883b6ef1-e5fc-4d85-b86c-b21c1b5a3d6c' date '2 July 2016' time '12:03:30.417248 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.33' message 'Added NeoJSONReader>>#nextListAs: as suggested by Norbert Hartl Added NeoJSONReaderTests>>#testArrayOfPointsUsingNextListAs' id '8f4620bc-d5f5-4b3a-aaf0-ee4b8b7a9ccf' date '16 March 2016' time '11:25:04.185192 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.32' message 'Added support for characters not in the Basic Multilingual Plane encoding as a UTF-16 surrogate pair See https://tools.ietf.org/html/rfc7159#section-7' id '484452d1-3d3b-414c-9c3a-fdfdd220ac65' date '24 February 2016' time '2:51:29.012947 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.31' message 'New #allowNil option to Object mapping so that null values are accepted and returned as nil when reading a schema using #nextAs: (off by default) Added NeoJSONObjectMapping>>#allowNil Added NeoJSONReaderTests>>#testAllowNil' id '650b4ecf-c9d9-40a5-a988-e4e3801faa42' date '30 December 2015' time '12:32:13.455009 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.30' message 'fix NeoJSONObjectTest>>#testJSON to no longer mix NeoJSONObject with Dictionary (due to changed equality tests)' id '8d78dfb8-9216-483f-9183-c4467fb351d2' date '25 November 2015' time '9:21:18.608509 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.26' message 'Added NeoJSONObject, a convencience subclass of Dictionary that mimics some JavaScript behavior' id 'a601b541-7f8b-4d10-9c57-2423b6c0a5fb' date '8 September 2014' time '2:26:47.985076 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.25' message 'Added NeoJSONWriterTests>>#testPointWriteNil Added NeoJSONWriter #writeNil property, defaulting to false; when true, nil instance variables will be written as null by NeoJSONPropertyMapping, else they will be skipped' id 'f1479d45-8d24-4bf6-b29a-aaf9f984c084' date '28 May 2014' time '8:54:10.767617 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.24' message 'Added new feature NeoJSONWriter>>#nextPutAs: symmetrical to NeoJSONReader>>#next:as: Added 4 unit test to exercise the new options' id '4c7461c1-82ea-4126-8b5c-ef307168120a' date '24 March 2014' time '12:19:53.503067 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.23' message 'Added basic support for mapping using inheritance when using #neoJonMapping : (see #testObject3) Renamed #new[Custom|Object]MappingFor: to [custom|object]MappingFor: to better reflect the new behavior Thanks Philippe Back for making these suggestions!' id '27fad240-c6b9-4d00-a4e6-6e49fd612dfb' date '22 March 2014' time '11:04:11.513921 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.22' message 'remove timing assertions from NeoJSONBenchmarkTests sinc they occasionally fail on the CI servers' id '3a07a705-816f-4981-9269-8d20620a00e2' date '15 January 2014' time '7:31:53.75366 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.21' message 'Increase the NeoJSONBenchmarkTests>>#testPrettyPrinter timeout even more' id '90807026-211d-4644-b211-1ea5bfd92bd6' date '27 December 2013' time '9:44:01.082714 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.20' message 'Give NeoJSONBenchmarksTests some more time to finish (on slow CI build slaves)' id 'f5f8f820-40d4-44ea-b5b6-8634e4cb7c5e' date '27 December 2013' time '7:01:23.816121 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.19' message 'New feature: NeoJSONWriter>>#asciiOnly: to escape all non ASCII characters in strings' id 'e1a69fdb-7e41-46f7-9f52-312eae3fab61' date '3 September 2013' time '12:21:56.262333 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.18' message 'Added tests for NeoJSONCustomMapping>>#mapWithValueSchema:' id '3f001444-6572-47d5-b656-96363c695522' date '30 August 2013' time '11:09:49.845805 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.17' message 'Make SmallDictionary optional in NeoJSONReaderTests>>#testSmallDictionary' id '5fa85190-9a4c-4b91-9747-f5e6a547e5ad' date '4 July 2013' time '6:43:12.874 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.16' message 'add NeoJSONMockStream>>#peekFor:' id 'baadfdb3-b8b4-4ce5-b072-0ebf67edd45f' date '3 December 2012' time '11:14:13.632 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.15' message 'added code to test the character stream API being used' id '696b4956-43ef-4fb8-a295-aa0bcc16685c' date '13 June 2012' time '4:29:41.988 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.14' message 'bugfix in NeoJSONReader>>#match:do: ' id '7e664c0d-c5c3-4e64-a784-c274a85a8230' date '13 June 2012' time '2:58:28.242 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.13' message 'extended NeoJSONReader with settable listClass and mapClass as well as a propertyNamesAsSymbols option extended class and method comments' id '4c90aab7-73c6-47fe-b52f-46954c06bf19' date '13 June 2012' time '11:57:09.49 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.12' message 'added tests for bogus input' id '50e7e260-7299-4ff8-880b-cbfd7bc8b30a' date '12 June 2012' time '4:20:02.239 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.11' message 'major simplification: removed NeoJSON[Composite|List|Map]Mapping, all to be handled by blocks in NeoJSONCustomMapping renamed forCustom:do: to for:customDo: accessor based mapping to NeoJSONObjectMapping ' id 'fcdc4252-6e15-4832-984f-84fbe1486163' date '12 June 2012' time '1:36:40.377 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.10' message 'added another benchmark' id '0f01e8f8-a367-4cb9-b730-1d8c0b411743' date '10 June 2012' time '9:28:30.577 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.9' message 'added NeoJSONTestObject1 with class side #neoJsonMapping: method' id 'ac3db680-73e6-4358-882c-e237697a7db4' date '9 June 2012' time '6:56:55.581 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.8' message 'added custom mapping tests' id '015e7c92-0411-4c7f-80b3-2d18a445250e' date '8 June 2012' time '10:10:24.734 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.7' message 'adding valueSchema to propertyMapping' id '9723e179-f1b9-4641-85ea-45ba89487b07' date '8 June 2012' time '8:36:25 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.6' message '1st version where list mapping works on some simple examples' id '6dbd0ade-2632-42a1-bd3c-45ef3fc0b596' date '8 June 2012' time '4:41:04 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.5' message '1st version with working object mapping for writer' id '59e0739f-bd31-4057-a366-2b5d27cf304c' date '6 June 2012' time '8:47:29 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.4' message 'added NeoJSONBenchmarkTests' id 'f36901e7-bb6d-4d6c-b4e8-5e70db8cce97' date '5 June 2012' time '5:30:17 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.3' message 'added more tests and a simple benchmark' id '5396d3f6-f1f0-46bc-961a-72a5919a9b79' date '4 June 2012' time '6:53:25 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.2' message 'first simple version of NeoJSONWriter' id '4b84c7e9-74d5-4b8b-bf9e-4be5fda1eb10' date '3 June 2012' time '7:58:06 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.1' message 'first simple version of NeoJSONReader' id '6927fec5-5a02-4ad2-8d4a-7be492da47da' date '2 June 2012' time '10:00:14 pm' author 'SvenVanCaekenberghe' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ()) \ No newline at end of file From dd0c2a8487e330e5a27ecb5c8f528047296b5fb1 Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Tue, 29 Aug 2017 19:00:14 +0200 Subject: [PATCH 02/90] sync with upstream repo --- .../class/catalogContactInfo.st | 3 +++ .../class/catalogDescription.st | 3 +++ .../class/catalogKeywords.st | 3 +++ .../instance/baseline2..st | 20 ++++++++++++++ .../instance/bleedingEdge..st | 3 +++ .../instance/development..st | 3 +++ .../instance/version10..st | 9 +++++++ .../instance/version11..st | 9 +++++++ .../instance/version12..st | 9 +++++++ .../instance/version13..st | 9 +++++++ .../NeoJSONObject.class/README.md | 24 +++++++++++++++++ .../NeoJSONObject.class/class/fromString..st | 8 ++++++ .../NeoJSONObject.class/instance/at..st | 6 +++++ .../instance/doesNotUnderstand..st | 12 +++++++++ .../NeoJSONObject.class/instance/name.st | 5 ++++ .../NeoJSONObject.class/instance/printOn..st | 5 ++++ .../NeoJSONObject.class/instance/value.st | 5 ++++ .../NeoJSONObject.class/methodProperties.json | 9 +++++++ .../NeoJSONObject.class/properties.json | 14 ++++++++++ .../instance/allowNil.st | 3 +++ .../instance/propertyName.st | 3 +++ .../instance/nextListAs..st | 8 ++++++ .../instance/parseCharacterHex4Value.st | 7 +++++ .../parseTrailingSurrogateHexEscape.st | 5 ++++ .../instance/writeNil.st | 3 +++ .../instance/escapeUnicode..st | 15 +++++++++++ .../instance/escapeUnicode4..st | 4 +++ .../NeoJSONWriter.class/instance/writeNil..st | 3 +++ .../NeoJSONWriter.class/instance/writeNil.st | 3 +++ .../instance/neoJsonOn..st | 3 +++ .../methodProperties.json | 5 ++++ .../properties.json | 2 ++ .../NeoJSONObjectTests.class/README.md | 1 + .../instance/testCRUD.st | 18 +++++++++++++ .../instance/testJSON.st | 10 +++++++ .../methodProperties.json | 6 +++++ .../NeoJSONObjectTests.class/properties.json | 14 ++++++++++ .../instance/testAllowNil.st | 21 +++++++++++++++ .../testArrayOfPointsUsingNextListAs.st | 10 +++++++ .../instance/testNonBMPCharacterDecoding.st | 8 ++++++ .../instance/testNonBMPCharacterEncoding.st | 9 +++++++ .../instance/testPointWriteNil.st | 11 ++++++++ .../instance/testPreservePropertyOrder.st | 26 +++++++++++++++++++ 43 files changed, 357 insertions(+) create mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogContactInfo.st create mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogDescription.st create mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogKeywords.st create mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline2..st create mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/bleedingEdge..st create mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/development..st create mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version10..st create mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version11..st create mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version12..st create mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version13..st create mode 100644 repository/Neo-JSON-Core.package/NeoJSONObject.class/README.md create mode 100644 repository/Neo-JSON-Core.package/NeoJSONObject.class/class/fromString..st create mode 100644 repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/at..st create mode 100644 repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/doesNotUnderstand..st create mode 100644 repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/name.st create mode 100644 repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/printOn..st create mode 100644 repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/value.st create mode 100644 repository/Neo-JSON-Core.package/NeoJSONObject.class/methodProperties.json create mode 100644 repository/Neo-JSON-Core.package/NeoJSONObject.class/properties.json create mode 100644 repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/allowNil.st create mode 100644 repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/propertyName.st create mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/nextListAs..st create mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacterHex4Value.st create mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseTrailingSurrogateHexEscape.st create mode 100644 repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeNil.st create mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/escapeUnicode..st create mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/escapeUnicode4..st create mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeNil..st create mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeNil.st create mode 100644 repository/Neo-JSON-Core.package/OrderedDictionary.extension/instance/neoJsonOn..st create mode 100644 repository/Neo-JSON-Core.package/OrderedDictionary.extension/methodProperties.json create mode 100644 repository/Neo-JSON-Core.package/OrderedDictionary.extension/properties.json create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/README.md create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testCRUD.st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testJSON.st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/methodProperties.json create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/properties.json create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testAllowNil.st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testArrayOfPointsUsingNextListAs.st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testNonBMPCharacterDecoding.st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testNonBMPCharacterEncoding.st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPointWriteNil.st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPreservePropertyOrder.st diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogContactInfo.st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogContactInfo.st new file mode 100644 index 0000000..ab72693 --- /dev/null +++ b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogContactInfo.st @@ -0,0 +1,3 @@ +accessing +catalogContactInfo + ^ 'Written and maintained by Sven Van Caekenberghe (http://stfx.eu) and the community. Discussions on the Pharo mailing lists.' \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogDescription.st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogDescription.st new file mode 100644 index 0000000..19d3548 --- /dev/null +++ b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogDescription.st @@ -0,0 +1,3 @@ +accessing +catalogDescription + ^ 'JSON (JavaScript Object Notation) is a popular data-interchange format. NeoJSON is an elegant and efficient standalone Smalltalk framework to read and write JSON converting to or from Smalltalk objects.' \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogKeywords.st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogKeywords.st new file mode 100644 index 0000000..6b63bcb --- /dev/null +++ b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogKeywords.st @@ -0,0 +1,3 @@ +accessing +catalogKeywords + ^ #(format input output json serialization encoding text javascript) \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline2..st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline2..st new file mode 100644 index 0000000..b553d76 --- /dev/null +++ b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline2..st @@ -0,0 +1,20 @@ +baselines +baseline2: spec + + spec + for: #common + do: [ + spec + blessing: #baseline; + repository: 'http://mc.stfx.eu/Neo'; + package: 'Neo-JSON-Core'; + package: 'Neo-JSON-Tests' with: [ spec requires: 'Neo-JSON-Core' ]; + group: 'default' with: #('Neo-JSON-Core' 'Neo-JSON-Tests'); + group: 'Core' with: #('Neo-JSON-Core'); + group: 'Tests' with: #('Neo-JSON-Tests') ]. + spec + for: #gemstone + do: [ + spec + baseline: 'NeoJSON' with: [ spec repository: 'github://GsDevKit/NeoJSON:master/repository' ]; + import: 'NeoJSON' ] \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/bleedingEdge..st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/bleedingEdge..st new file mode 100644 index 0000000..a61a59c --- /dev/null +++ b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/bleedingEdge..st @@ -0,0 +1,3 @@ +symbolic versions +bleedingEdge: spec + \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/development..st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/development..st new file mode 100644 index 0000000..0e26382 --- /dev/null +++ b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/development..st @@ -0,0 +1,3 @@ +symbolic versions +development: spec + \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version10..st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version10..st new file mode 100644 index 0000000..01fc11d --- /dev/null +++ b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version10..st @@ -0,0 +1,9 @@ +versions +version10: spec + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.29'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.26' ] \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version11..st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version11..st new file mode 100644 index 0000000..029a804 --- /dev/null +++ b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version11..st @@ -0,0 +1,9 @@ +versions +version11: spec + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.30'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.30' ] \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version12..st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version12..st new file mode 100644 index 0000000..5d52f09 --- /dev/null +++ b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version12..st @@ -0,0 +1,9 @@ +versions +version12: spec + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.31'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.31' ] \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version13..st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version13..st new file mode 100644 index 0000000..83dc556 --- /dev/null +++ b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version13..st @@ -0,0 +1,9 @@ +versions +version13: spec + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.33'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.33' ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObject.class/README.md b/repository/Neo-JSON-Core.package/NeoJSONObject.class/README.md new file mode 100644 index 0000000..9e97d4a --- /dev/null +++ b/repository/Neo-JSON-Core.package/NeoJSONObject.class/README.md @@ -0,0 +1,24 @@ +I am NeoJSONObject. +I am a Dictionary. + +I behave more like a JavaScript object. I return nil for missing keys. I allow any property to be read or set by using a normal accessor message. + +The following are equivalent: + + self foo. + self at: #foo. + +As are the following + + self foo: 1. + self at: #foo put: 1. + +I can optionally be used by NeoJSONReader as mapClass (see #mapClass:). + +For output, I act just like my superclass (it is thus not necessary to do any conversions). + +Example: + + NeoJSONObject fromString: '{"foo":1,"bar":-2}'. + +I use JSON as my printed representation. \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObject.class/class/fromString..st b/repository/Neo-JSON-Core.package/NeoJSONObject.class/class/fromString..st new file mode 100644 index 0000000..9748d24 --- /dev/null +++ b/repository/Neo-JSON-Core.package/NeoJSONObject.class/class/fromString..st @@ -0,0 +1,8 @@ +convenience +fromString: string + "Parse string as JSON, so that maps become instances of me" + + ^ (NeoJSONReader on: string readStream) + mapClass: NeoJSONObject; + propertyNamesAsSymbols: true; + next \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/at..st b/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/at..st new file mode 100644 index 0000000..ce6d923 --- /dev/null +++ b/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/at..st @@ -0,0 +1,6 @@ +accessing +at: key + "I return nil for missing keys. + My superclass would signal a KeyNotFound." + + ^ self at: key ifAbsent: [ nil ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/doesNotUnderstand..st b/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/doesNotUnderstand..st new file mode 100644 index 0000000..1308439 --- /dev/null +++ b/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/doesNotUnderstand..st @@ -0,0 +1,12 @@ +reflective operations +doesNotUnderstand: message + "Overwritten so that 'self foo' becomes 'self at: #foo' + and 'self foo: 1' becomes 'self at: #foo put: 1'" + + | key | + key := message selector. + key isUnary + ifTrue: [ ^ self at: key ]. + ^ (key isKeyword and: [ key numArgs = 1 ]) + ifTrue: [ self at: key allButLast asSymbol put: message arguments first ] + ifFalse: [ super doesNotUnderstand: message ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/name.st b/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/name.st new file mode 100644 index 0000000..7e63645 --- /dev/null +++ b/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/name.st @@ -0,0 +1,5 @@ +accessing +name + "Overwritten to make this accessor available as key" + + ^ self at: #name \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/printOn..st b/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/printOn..st new file mode 100644 index 0000000..df8cfa3 --- /dev/null +++ b/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/printOn..st @@ -0,0 +1,5 @@ +printing +printOn: stream + "I use my JSON representation when printing myself" + + (NeoJSONWriter on: stream) nextPut: self \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/value.st b/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/value.st new file mode 100644 index 0000000..fadaec3 --- /dev/null +++ b/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/value.st @@ -0,0 +1,5 @@ +evaluating +value + "Overwritten to make this accessor available as key" + + ^ self at: #value \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObject.class/methodProperties.json b/repository/Neo-JSON-Core.package/NeoJSONObject.class/methodProperties.json new file mode 100644 index 0000000..811f3fe --- /dev/null +++ b/repository/Neo-JSON-Core.package/NeoJSONObject.class/methodProperties.json @@ -0,0 +1,9 @@ +{ + "class" : { + "fromString:" : "SvenVanCaekenberghe 9/8/2014 13:33" }, + "instance" : { + "at:" : "SvenVanCaekenberghe 9/8/2014 11:43", + "doesNotUnderstand:" : "SvenVanCaekenberghe 9/8/2014 12:32", + "name" : "SvenVanCaekenberghe 9/8/2014 11:46", + "printOn:" : "SvenVanCaekenberghe 9/8/2014 11:45", + "value" : "SvenVanCaekenberghe 9/8/2014 11:46" } } diff --git a/repository/Neo-JSON-Core.package/NeoJSONObject.class/properties.json b/repository/Neo-JSON-Core.package/NeoJSONObject.class/properties.json new file mode 100644 index 0000000..75dcbe5 --- /dev/null +++ b/repository/Neo-JSON-Core.package/NeoJSONObject.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "Neo-JSON-Core", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "SvenVanCaekenberghe 9/8/2014 13:34", + "instvars" : [ + ], + "name" : "NeoJSONObject", + "pools" : [ + ], + "super" : "Dictionary", + "type" : "normal" } diff --git a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/allowNil.st b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/allowNil.st new file mode 100644 index 0000000..b6e59d1 --- /dev/null +++ b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/allowNil.st @@ -0,0 +1,3 @@ +initialize-release +allowNil + allowNil := true \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/propertyName.st b/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/propertyName.st new file mode 100644 index 0000000..2a727f6 --- /dev/null +++ b/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/propertyName.st @@ -0,0 +1,3 @@ +accessing +propertyName + ^ propertyName \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/nextListAs..st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/nextListAs..st new file mode 100644 index 0000000..564fd76 --- /dev/null +++ b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/nextListAs..st @@ -0,0 +1,8 @@ +accessing +nextListAs: schema + "Secondary interface to parse JSON. + Return a list of objects, each element according to schema." + + ^ self listClass streamContents: [ :stream | + self parseListDo: [ + stream nextPut: (self nextAs: schema) ] ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacterHex4Value.st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacterHex4Value.st new file mode 100644 index 0000000..00ccdc0 --- /dev/null +++ b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacterHex4Value.st @@ -0,0 +1,7 @@ +private +parseCharacterHex4Value + | value | + value := self parseCharacterHexDigit. + 3 timesRepeat: [ + value := (value << 4) + self parseCharacterHexDigit ]. + ^ value \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseTrailingSurrogateHexEscape.st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseTrailingSurrogateHexEscape.st new file mode 100644 index 0000000..00fbbda --- /dev/null +++ b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseTrailingSurrogateHexEscape.st @@ -0,0 +1,5 @@ +private +parseTrailingSurrogateHexEscape + (readStream next = $\ and: [ readStream next = $u ]) + ifTrue: [ ^ self parseCharacterHex4Value ] + ifFalse: [ self error: 'trailing surrogate hex escape expected' ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeNil.st b/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeNil.st new file mode 100644 index 0000000..eb17c6d --- /dev/null +++ b/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeNil.st @@ -0,0 +1,3 @@ +accessing +writeNil + ^ jsonWriter writeNil \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/escapeUnicode..st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/escapeUnicode..st new file mode 100644 index 0000000..37e598b --- /dev/null +++ b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/escapeUnicode..st @@ -0,0 +1,15 @@ +private +escapeUnicode: codePoint + codePoint <= 16rFFF + ifTrue: [ self escapeUnicode4: codePoint ] + ifFalse: [ + codePoint <= 16r10FFFF + ifTrue: [ | leadSurrogate trailSurrogate shifted | + "Characters not in the Basic Multilingual Plane are encoded as a UTF-16 surrogate pair" + "See https://tools.ietf.org/html/rfc7159#section-7" + shifted := codePoint - 16r10000. + leadSurrogate := 16rD800 + (shifted // 16r400). + trailSurrogate := 16rDC00 + (shifted \\ 16r400). + self escapeUnicode4: leadSurrogate. + self escapeUnicode4: trailSurrogate ] + ifFalse: [ self error: 'Character Unicode code point outside encoder range' ] ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/escapeUnicode4..st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/escapeUnicode4..st new file mode 100644 index 0000000..0bfa39c --- /dev/null +++ b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/escapeUnicode4..st @@ -0,0 +1,4 @@ +private +escapeUnicode4: codePoint + writeStream nextPutAll: '\u'. + codePoint printOn: writeStream base: 16 nDigits: 4 \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeNil..st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeNil..st new file mode 100644 index 0000000..cde89ff --- /dev/null +++ b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeNil..st @@ -0,0 +1,3 @@ +initialize-release +writeNil: boolean + writeNil := boolean \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeNil.st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeNil.st new file mode 100644 index 0000000..8feb602 --- /dev/null +++ b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeNil.st @@ -0,0 +1,3 @@ +accessing +writeNil + ^ writeNil \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/OrderedDictionary.extension/instance/neoJsonOn..st b/repository/Neo-JSON-Core.package/OrderedDictionary.extension/instance/neoJsonOn..st new file mode 100644 index 0000000..174eb53 --- /dev/null +++ b/repository/Neo-JSON-Core.package/OrderedDictionary.extension/instance/neoJsonOn..st @@ -0,0 +1,3 @@ +*neo-json-core +neoJsonOn: neoJSONWriter + neoJSONWriter writeMap: self \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/OrderedDictionary.extension/methodProperties.json b/repository/Neo-JSON-Core.package/OrderedDictionary.extension/methodProperties.json new file mode 100644 index 0000000..882c3bf --- /dev/null +++ b/repository/Neo-JSON-Core.package/OrderedDictionary.extension/methodProperties.json @@ -0,0 +1,5 @@ +{ + "class" : { + }, + "instance" : { + "neoJsonOn:" : "SvenVanCaekenberghe 8/26/2015 12:03" } } diff --git a/repository/Neo-JSON-Core.package/OrderedDictionary.extension/properties.json b/repository/Neo-JSON-Core.package/OrderedDictionary.extension/properties.json new file mode 100644 index 0000000..63f7607 --- /dev/null +++ b/repository/Neo-JSON-Core.package/OrderedDictionary.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "OrderedDictionary" } diff --git a/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/README.md b/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/README.md new file mode 100644 index 0000000..51b44cb --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/README.md @@ -0,0 +1 @@ +I am NeoJSONObjectTests, I hold unit tests for NeoJSONObject. diff --git a/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testCRUD.st b/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testCRUD.st new file mode 100644 index 0000000..43d355e --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testCRUD.st @@ -0,0 +1,18 @@ +testing +testCRUD + | object | + object := NeoJSONObject new. + self assert: object isEmpty. + self assert: object foo equals: nil. + object foo: 123. + self assert: object foo equals: 123. + self assert: object printString equals: '{"foo":123}'. + object name: 'test'. + object value: Float pi. + self assert: object name equals: 'test'. + self assert: (object value closeTo: Float pi). + self assert: object keys asSet equals: #(foo name value) asSet. + object removeKey: #foo. + self assert: object foo equals: nil. + object removeAll. + self assert: object isEmpty \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testJSON.st b/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testJSON.st new file mode 100644 index 0000000..3ca2a0f --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testJSON.st @@ -0,0 +1,10 @@ +testing +testJSON + | data json object | + data := { #foo->1. #bar->2. #str->'Str!'. #bool->true. #flt->1.5 } as: NeoJSONObject. + json := NeoJSONWriter toString: data . + object := NeoJSONObject fromString: json. + self assert: object class equals: NeoJSONObject. + self assert: object equals: data. + json := (NeoJSONWriter toString: object). + self assert: (NeoJSONObject fromString: json) equals: object \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/methodProperties.json b/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/methodProperties.json new file mode 100644 index 0000000..466bdcf --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/methodProperties.json @@ -0,0 +1,6 @@ +{ + "class" : { + }, + "instance" : { + "testCRUD" : "SvenVanCaekenberghe 9/8/2014 12:39", + "testJSON" : "SvenVanCaekenberghe 11/25/2015 09:19" } } diff --git a/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/properties.json b/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/properties.json new file mode 100644 index 0000000..c5f8809 --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "Neo-JSON-Tests", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "SvenVanCaekenberghe 9/8/2014 12:39", + "instvars" : [ + ], + "name" : "NeoJSONObjectTests", + "pools" : [ + ], + "super" : "TestCase", + "type" : "normal" } diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testAllowNil.st b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testAllowNil.st new file mode 100644 index 0000000..d8b650a --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testAllowNil.st @@ -0,0 +1,21 @@ +testing +testAllowNil + self + should: [ + (NeoJSONReader on: 'null' readStream) + mapInstVarsFor: Point; + nextAs: Point ] + raise: NeoJSONParseError. + self + assert: ((NeoJSONReader on: 'null' readStream) + mapInstVarsFor: Point; + for: Point do: [ :mapping | mapping allowNil ]; + nextAs: Point) + equals: nil. + self + assert: ((NeoJSONReader on: '[ { "x" : 1, "y" : 2 }, null, { "x" : 3, "y" : -1 } ]' readStream) + mapInstVarsFor: Point; + for: Point do: [ :mapping | mapping allowNil ]; + for: #ArrayOfPoints customDo: [ :mapping | mapping listOfElementSchema: Point ]; + nextAs: #ArrayOfPoints) + equals: { 1 @ 2. nil. 3 @ -1 }. \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testArrayOfPointsUsingNextListAs.st b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testArrayOfPointsUsingNextListAs.st new file mode 100644 index 0000000..3de946d --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testArrayOfPointsUsingNextListAs.st @@ -0,0 +1,10 @@ +testing +testArrayOfPointsUsingNextListAs + | reader | + reader := [ :string | + (NeoJSONReader on: string readStream) + mapInstVarsFor: Point; + nextListAs: Point ]. + self assert: (reader value: '[ { "x":1, "y":2 }, { "y":-2, "x":-1 } ]') equals: { 1@2. -1@ -2 }. + self assert: (reader value: '[ ]') equals: #(). + self assert: (reader value: '[ { } ]') equals: { Point new } \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testNonBMPCharacterDecoding.st b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testNonBMPCharacterDecoding.st new file mode 100644 index 0000000..9de3845 --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testNonBMPCharacterDecoding.st @@ -0,0 +1,8 @@ +testing +testNonBMPCharacterDecoding + "Characters not in the Basic Multilingual Plane are encoded as a UTF-16 surrogate pair" + + | string object | + string := String with: 16r1D11E asCharacter. "MUSICAL SYMBOL G CLEF" + object := (NeoJSONReader fromString: '"\uD834\uDD1E"'). + self assert: object equals: string \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testNonBMPCharacterEncoding.st b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testNonBMPCharacterEncoding.st new file mode 100644 index 0000000..360b8a2 --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testNonBMPCharacterEncoding.st @@ -0,0 +1,9 @@ +testing +testNonBMPCharacterEncoding + "Characters not in the Basic Multilingual Plane are encoded as a UTF-16 surrogate pair" + + | string json | + string := String with: 16r1D11E asCharacter. "MUSICAL SYMBOL G CLEF" + json := String streamContents: [ :out | + (NeoJSONWriter on: out) asciiOnly: true; nextPut: string ]. + self assert: json equals: '"\uD834\uDD1E"' \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPointWriteNil.st b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPointWriteNil.st new file mode 100644 index 0000000..de64211 --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPointWriteNil.st @@ -0,0 +1,11 @@ +testing +testPointWriteNil + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) + writeNil: true; + mapAllInstVarsFor: Point; + nextPut: object ] ]. + self assert: (writer value: 1@2) equals: '{"x":1,"y":2}'. + self assert: (writer value: Point new) equals: '{"x":null,"y":null}' \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPreservePropertyOrder.st b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPreservePropertyOrder.st new file mode 100644 index 0000000..42d5bb9 --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPreservePropertyOrder.st @@ -0,0 +1,26 @@ +testing +testPreservePropertyOrder + | writer testObject | + (testObject := NeoJSONTestObject2 new) + id: 123; + width: 100; + height: 50; + data: 'test'. + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) + for: NeoJSONTestObject2 do: [ :mapping | mapping mapInstVars: #(id width height data) ]; + nextPut: object ] ]. + self assert: (writer value: testObject) equals: '{"id":123,"width":100,"height":50,"data":"test"}'. + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) + for: NeoJSONTestObject2 do: [ :mapping | mapping mapInstVars: #(width height data id) ]; + nextPut: object ] ]. + self assert: (writer value: testObject) equals: '{"width":100,"height":50,"data":"test","id":123}'. + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) + for: NeoJSONTestObject2 do: [ :mapping | mapping mapInstVars: #(data id height width) ]; + nextPut: object ] ]. + self assert: (writer value: testObject) equals: '{"data":"test","id":123,"height":50,"width":100}'. From fa9ae45adc1a127ed3bb1c516909362f32dd9419 Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Mon, 1 Oct 2018 22:55:40 +0200 Subject: [PATCH 03/90] sync with upstream MC repo (with mariano's reorg) --- .filetree | 2 + .../ConfigurationOfNeoJSON.package/.filetree | 5 +- .../instance/baseline3..st | 44 +++++++++++ .../instance/stable..st | 2 +- .../instance/version14..st | 9 +++ .../instance/version15..st | 9 +++ .../instance/version16..st | 9 +++ .../instance/version17..st | 9 +++ .../instance/version30..st | 7 ++ .../methodProperties.json | 65 +++++++++------- .../properties.json | 19 ++--- .../monticello.meta/version | 2 +- .../properties.json | 3 +- repository/Neo-JSON-Core.package/.filetree | 5 +- .../Boolean.extension/methodProperties.json | 7 +- .../Boolean.extension/properties.json | 3 +- .../methodProperties.json | 7 +- .../Collection.extension/properties.json | 3 +- .../methodProperties.json | 7 +- .../Dictionary.extension/properties.json | 3 +- .../Integer.extension/methodProperties.json | 7 +- .../Integer.extension/properties.json | 3 +- .../instance/listOfElementSchema..st | 6 +- .../instance/listOfType..st | 2 +- .../instance/listOfType.andElementSchema..st | 7 +- .../instance/mapWithValueSchema..st | 7 +- .../methodProperties.json | 23 +++--- .../properties.json | 19 +++-- .../NeoJSONMapper.class/methodProperties.json | 15 ++-- .../NeoJSONMapper.class/properties.json | 19 +++-- .../methodProperties.json | 11 +-- .../NeoJSONMapping.class/properties.json | 19 ++--- .../NeoJSONMappingNotFound.class/README.md | 5 +- .../class/signalFor..st | 7 ++ .../class/signalFor.in..st | 8 ++ .../instance/collection..st | 5 ++ .../instance/collection.st | 5 ++ .../instance/messageText.st | 5 ++ .../instance/object..st | 5 ++ .../instance/object.st | 5 ++ .../instance/standardMessageText.st | 2 +- .../methodProperties.json | 15 +++- .../properties.json | 20 ++--- .../NeoJSONObject.class/README.md | 17 ++++- .../NeoJSONObject.class/instance/atPath..st | 10 +++ .../instance/atPath.put..st | 12 +++ .../instance/doesNotUnderstand..st | 4 +- .../NeoJSONObject.class/instance/printOn..st | 9 ++- .../NeoJSONObject.class/methodProperties.json | 17 +++-- .../NeoJSONObject.class/properties.json | 19 ++--- .../instance/allowNil.st | 2 + .../instance/mapAccessors..st | 3 +- .../instance/mapAllInstVars.st | 2 +- .../instance/mapInstVar.to..st | 15 ++-- .../instance/mapInstVars..st | 3 +- .../instance/mapInstVars.st | 2 +- .../instance/mapProperty.getter.setter..st | 2 +- .../instance/propertyNamed.ifAbsent..st | 4 +- .../methodProperties.json | 33 +++++---- .../properties.json | 19 +++-- .../methodProperties.json | 7 +- .../NeoJSONParseError.class/properties.json | 19 ++--- .../instance/propertyName..st | 4 +- .../methodProperties.json | 17 +++-- .../properties.json | 19 +++-- .../instance/failIfNotAtEnd.st | 4 + .../instance/parseCharacter.st | 4 +- .../instance/parseListDo..st | 5 +- .../instance/parseMapDo..st | 5 +- .../instance/parseNumberExponent.st | 5 ++ .../instance/parseString.st | 10 +-- .../NeoJSONReader.class/methodProperties.json | 74 ++++++++++--------- .../NeoJSONReader.class/properties.json | 19 +++-- .../instance/writeElement.as..st | 9 +++ .../methodProperties.json | 16 ++-- .../properties.json | 19 +++-- .../instance/asciiOnly..st | 2 + .../NeoJSONWriter.class/instance/close.st | 2 + .../instance/escapeUnicode..st | 2 +- .../instance/initialize.st | 3 +- .../NeoJSONWriter.class/instance/newLine..st | 2 + .../NeoJSONWriter.class/instance/nextPut..st | 2 + .../instance/nextPut.as..st | 2 +- .../instance/prettyPrint..st | 2 + .../NeoJSONWriter.class/instance/writeNil..st | 2 + .../NeoJSONWriter.class/instance/writeNil.st | 2 + .../instance/writeString..st | 4 +- .../NeoJSONWriter.class/methodProperties.json | 63 ++++++++-------- .../NeoJSONWriter.class/properties.json | 19 +++-- .../Number.extension/methodProperties.json | 7 +- .../Number.extension/properties.json | 3 +- .../Object.extension/methodProperties.json | 7 +- .../Object.extension/properties.json | 3 +- .../methodProperties.json | 5 -- .../properties.json | 2 - .../methodProperties.json | 5 -- .../SmallDictionary.extension/properties.json | 2 - .../String.extension/methodProperties.json | 7 +- .../String.extension/properties.json | 3 +- .../methodProperties.json | 7 +- .../UndefinedObject.extension/properties.json | 3 +- .../monticello.meta/version | 2 +- .../Neo-JSON-Core.package/properties.json | 3 +- .../Neo-JSON-Pharo-Core.package/.filetree | 5 ++ .../instance/neoJsonOn..st | 2 +- .../methodProperties.json | 6 ++ .../properties.json | 3 + .../instance/neoJsonOn..st | 2 +- .../methodProperties.json | 6 ++ .../SmallDictionary.extension/properties.json | 3 + .../monticello.meta/categories.st | 1 + .../monticello.meta/initializers.st | 0 .../monticello.meta/package | 1 + .../monticello.meta/version | 1 + .../properties.json | 1 + .../Neo-JSON-Pharo-Examples.package/.filetree | 5 ++ .../Attachment.class/README.md | 0 .../Attachment.class/instance/fileName..st | 3 + .../Attachment.class/instance/url..st | 3 + .../Attachment.class/methodProperties.json | 7 ++ .../Attachment.class/properties.json | 14 ++++ .../BittrexResponse.class/README.md | 0 .../methodProperties.json | 4 + .../BittrexResponse.class/properties.json | 15 ++++ .../Market.class/README.md | 0 .../Market.class/methodProperties.json | 4 + .../Market.class/properties.json | 23 ++++++ .../NeoJSONPharoExamples.class/README.md | 0 .../testAccessingTheNewYorkPublicLibrary.st | 13 ++++ .../instance/testAttachmentsExample.st | 31 ++++++++ .../testBittrexLitecoinAsDictionary.st | 10 +++ .../testBittrexLitecoinAsDomainObjects.st | 16 ++++ .../instance/testDoomtownDBCards.st | 4 + .../instance/testFeed.st | 12 +++ .../instance/testGetWorldCapitals.st | 4 + .../instance/testGoogleMapsAPI.st | 7 ++ .../instance/testParsingUserAgentStrings.st | 9 +++ .../instance/testStackOverflowInfo.st | 6 ++ .../methodProperties.json | 15 ++++ .../properties.json | 11 +++ .../monticello.meta/categories.st | 1 + .../monticello.meta/initializers.st | 0 .../monticello.meta/package | 1 + .../monticello.meta/version | 1 + .../properties.json | 1 + .../Neo-JSON-Pharo-Tests.package/.filetree | 5 ++ .../monticello.meta/categories.st | 1 + .../monticello.meta/initializers.st | 0 .../monticello.meta/package | 1 + .../monticello.meta/version | 1 + .../properties.json | 1 + repository/Neo-JSON-Tests.package/.filetree | 5 +- .../methodProperties.json | 9 ++- .../NeoJSONBenchmark.class/properties.json | 19 +++-- .../methodProperties.json | 9 ++- .../properties.json | 19 ++--- .../NeoJSONExamplesTests.class/README.md | 1 + .../instance/testPoints.st | 33 +++++++++ .../instance/testRectanglePoints.st | 29 ++++++++ .../instance/testRectanglePointsWithNils.st | 23 ++++++ .../methodProperties.json | 8 ++ .../properties.json | 11 +++ .../NeoJSONMappingTests.class/README.md | 1 + .../instance/testDynamicTyping.st | 25 +++++++ .../testSymbolOrStringInstVarMapping.st | 20 +++++ .../instance/testVirtualTransferObject.st | 27 +++++++ .../methodProperties.json | 8 ++ .../NeoJSONMappingTests.class/properties.json | 11 +++ .../methodProperties.json | 17 +++-- .../NeoJSONMockStream.class/properties.json | 19 +++-- .../instance/testAtPath.st | 17 +++++ .../instance/testAtPathPut.st | 20 +++++ .../instance/testJSON.st | 2 +- .../methodProperties.json | 9 ++- .../NeoJSONObjectTests.class/properties.json | 19 ++--- .../instance/testAllowNil.st | 2 +- .../instance/testArrayOfPoints.st | 4 +- .../testArrayOfPointsUsingNextListAs.st | 4 +- .../instance/testDate.st | 2 +- .../instance/testNonBMPCharacterDecoding.st | 2 +- .../instance/testOrderedCollectionOfPoints.st | 2 +- .../instance/testParseErrors.st | 6 +- .../instance/testSmallDictionary.st | 2 +- .../instance/testStrings.st | 13 +++- .../methodProperties.json | 49 ++++++------ .../NeoJSONReaderTests.class/properties.json | 19 ++--- .../class/example1.st | 2 +- .../methodProperties.json | 25 ++++--- .../NeoJSONTestObject1.class/properties.json | 19 +++-- .../class/benchmark..st | 4 +- .../class/benchmarkAsDictionary..st | 4 +- .../methodProperties.json | 33 +++++---- .../NeoJSONTestObject2.class/properties.json | 19 +++-- .../methodProperties.json | 15 ++-- .../NeoJSONTestObject3.class/properties.json | 19 +++-- .../NeoJSONValidation.class/README.md | 27 +++++++ .../instance/closeLog.st | 8 ++ .../instance/ensureLog.st | 6 ++ .../instance/gitDirectory..st | 3 + .../instance/gitDirectory.st | 3 + .../instance/jsonTestSuiteDirectory.st | 3 + .../jsonTestSuiteTestParsingDirectory.st | 3 + .../jsonTestSuiteTestParsingFailFiles.st | 3 + .../jsonTestSuiteTestParsingInfoFiles.st | 3 + .../jsonTestSuiteTestParsingPassFiles.st | 3 + .../jsonTestSuiteTestTransformDirectory.st | 3 + .../NeoJSONValidation.class/instance/log..st | 4 + .../instance/logFile.st | 3 + .../nativeJsonBenchmarkDataDirectory.st | 3 + .../instance/nativeJsonBenchmarkDirectory.st | 3 + ...nativeJsonBenchmarkJsonCheckerDirectory.st | 3 + ...nativeJsonBenchmarkJsonCheckerFailFiles.st | 3 + ...nativeJsonBenchmarkJsonCheckerPassFiles.st | 3 + .../nativeJsonBenchmarkRoundTripDirectory.st | 3 + .../nativeJsonBenchmarkRoundTripFiles.st | 3 + .../runJsonTestSuiteTestParsingFailures.st | 11 +++ .../runJsonTestSuiteTestParsingInfo.st | 11 +++ .../runJsonTestSuiteTestParsingPasses.st | 11 +++ ...nNativeJsonBenchmarkJsonCheckerFailures.st | 11 +++ ...runNativeJsonBenchmarkJsonCheckerPasses.st | 11 +++ .../runNativeJsonBenchmarkRoundTrip.st | 9 +++ .../instance/validateFiles.usingTest..st | 18 +++++ .../methodProperties.json | 31 ++++++++ .../NeoJSONValidation.class/properties.json | 14 ++++ .../README.md | 1 + .../instance/writeRead..st | 6 ++ .../methodProperties.json | 6 ++ .../properties.json | 11 +++ .../README.md | 1 + .../methodProperties.json | 7 +- .../properties.json | 19 ++--- .../instance/testDictionaryOfObject2.st | 4 +- .../methodProperties.json | 11 +-- .../properties.json | 19 ++--- .../instance/testDictionaryOfObject2.st | 4 +- .../instance/testFloats.st | 2 +- .../instance/testIntegers.st | 2 +- .../instance/testLists.st | 2 +- .../instance/testMaps.st | 8 +- .../instance/testSpecials.st | 2 +- .../instance/testStrings.st | 7 +- .../methodProperties.json | 23 +++--- .../properties.json | 19 ++--- .../instance/testAsciiOnlyStrings.st | 12 ++- .../instance/testDate.st | 2 +- .../instance/testListsExtra.st | 10 +++ .../instance/testMaps.st | 3 +- .../instance/testMapsExtra.st | 14 ++++ .../instance/testNonBMPCharacterEncoding.st | 2 +- .../instance/testStrings.st | 13 +++- .../instance/testTime.st | 4 +- .../methodProperties.json | 39 +++++----- .../NeoJSONWriterTests.class/properties.json | 19 ++--- .../monticello.meta/version | 2 +- .../Neo-JSON-Tests.package/properties.json | 3 +- 255 files changed, 1708 insertions(+), 670 deletions(-) create mode 100644 .filetree create mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline3..st create mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version14..st create mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version15..st create mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version16..st create mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version17..st create mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version30..st create mode 100644 repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/class/signalFor..st create mode 100644 repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/class/signalFor.in..st create mode 100644 repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/collection..st create mode 100644 repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/collection.st create mode 100644 repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/messageText.st create mode 100644 repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/object..st create mode 100644 repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/object.st create mode 100644 repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/atPath..st create mode 100644 repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/atPath.put..st create mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/failIfNotAtEnd.st create mode 100644 repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeElement.as..st delete mode 100644 repository/Neo-JSON-Core.package/OrderedDictionary.extension/methodProperties.json delete mode 100644 repository/Neo-JSON-Core.package/OrderedDictionary.extension/properties.json delete mode 100644 repository/Neo-JSON-Core.package/SmallDictionary.extension/methodProperties.json delete mode 100644 repository/Neo-JSON-Core.package/SmallDictionary.extension/properties.json create mode 100644 repository/Neo-JSON-Pharo-Core.package/.filetree rename repository/{Neo-JSON-Core.package => Neo-JSON-Pharo-Core.package}/OrderedDictionary.extension/instance/neoJsonOn..st (72%) create mode 100644 repository/Neo-JSON-Pharo-Core.package/OrderedDictionary.extension/methodProperties.json create mode 100644 repository/Neo-JSON-Pharo-Core.package/OrderedDictionary.extension/properties.json rename repository/{Neo-JSON-Core.package => Neo-JSON-Pharo-Core.package}/SmallDictionary.extension/instance/neoJsonOn..st (72%) create mode 100644 repository/Neo-JSON-Pharo-Core.package/SmallDictionary.extension/methodProperties.json create mode 100644 repository/Neo-JSON-Pharo-Core.package/SmallDictionary.extension/properties.json create mode 100644 repository/Neo-JSON-Pharo-Core.package/monticello.meta/categories.st create mode 100644 repository/Neo-JSON-Pharo-Core.package/monticello.meta/initializers.st create mode 100644 repository/Neo-JSON-Pharo-Core.package/monticello.meta/package create mode 100644 repository/Neo-JSON-Pharo-Core.package/monticello.meta/version create mode 100644 repository/Neo-JSON-Pharo-Core.package/properties.json create mode 100644 repository/Neo-JSON-Pharo-Examples.package/.filetree create mode 100644 repository/Neo-JSON-Pharo-Examples.package/Attachment.class/README.md create mode 100644 repository/Neo-JSON-Pharo-Examples.package/Attachment.class/instance/fileName..st create mode 100644 repository/Neo-JSON-Pharo-Examples.package/Attachment.class/instance/url..st create mode 100644 repository/Neo-JSON-Pharo-Examples.package/Attachment.class/methodProperties.json create mode 100644 repository/Neo-JSON-Pharo-Examples.package/Attachment.class/properties.json create mode 100644 repository/Neo-JSON-Pharo-Examples.package/BittrexResponse.class/README.md create mode 100644 repository/Neo-JSON-Pharo-Examples.package/BittrexResponse.class/methodProperties.json create mode 100644 repository/Neo-JSON-Pharo-Examples.package/BittrexResponse.class/properties.json create mode 100644 repository/Neo-JSON-Pharo-Examples.package/Market.class/README.md create mode 100644 repository/Neo-JSON-Pharo-Examples.package/Market.class/methodProperties.json create mode 100644 repository/Neo-JSON-Pharo-Examples.package/Market.class/properties.json create mode 100644 repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/README.md create mode 100644 repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testAccessingTheNewYorkPublicLibrary.st create mode 100644 repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testAttachmentsExample.st create mode 100644 repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testBittrexLitecoinAsDictionary.st create mode 100644 repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testBittrexLitecoinAsDomainObjects.st create mode 100644 repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testDoomtownDBCards.st create mode 100644 repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testFeed.st create mode 100644 repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testGetWorldCapitals.st create mode 100644 repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testGoogleMapsAPI.st create mode 100644 repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testParsingUserAgentStrings.st create mode 100644 repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testStackOverflowInfo.st create mode 100644 repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/methodProperties.json create mode 100644 repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/properties.json create mode 100644 repository/Neo-JSON-Pharo-Examples.package/monticello.meta/categories.st create mode 100644 repository/Neo-JSON-Pharo-Examples.package/monticello.meta/initializers.st create mode 100644 repository/Neo-JSON-Pharo-Examples.package/monticello.meta/package create mode 100644 repository/Neo-JSON-Pharo-Examples.package/monticello.meta/version create mode 100644 repository/Neo-JSON-Pharo-Examples.package/properties.json create mode 100644 repository/Neo-JSON-Pharo-Tests.package/.filetree create mode 100644 repository/Neo-JSON-Pharo-Tests.package/monticello.meta/categories.st create mode 100644 repository/Neo-JSON-Pharo-Tests.package/monticello.meta/initializers.st create mode 100644 repository/Neo-JSON-Pharo-Tests.package/monticello.meta/package create mode 100644 repository/Neo-JSON-Pharo-Tests.package/monticello.meta/version create mode 100644 repository/Neo-JSON-Pharo-Tests.package/properties.json create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/README.md create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testPoints.st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testRectanglePoints.st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testRectanglePointsWithNils.st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/methodProperties.json create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/properties.json create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/README.md create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/instance/testDynamicTyping.st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/instance/testSymbolOrStringInstVarMapping.st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/instance/testVirtualTransferObject.st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/methodProperties.json create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/properties.json create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testAtPath.st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testAtPathPut.st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/README.md create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/closeLog.st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/ensureLog.st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/gitDirectory..st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/gitDirectory.st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteDirectory.st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingDirectory.st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingFailFiles.st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingInfoFiles.st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingPassFiles.st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestTransformDirectory.st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/log..st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/logFile.st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkDataDirectory.st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkDirectory.st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkJsonCheckerDirectory.st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkJsonCheckerFailFiles.st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkJsonCheckerPassFiles.st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkRoundTripDirectory.st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkRoundTripFiles.st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runJsonTestSuiteTestParsingFailures.st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runJsonTestSuiteTestParsingInfo.st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runJsonTestSuiteTestParsingPasses.st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runNativeJsonBenchmarkJsonCheckerFailures.st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runNativeJsonBenchmarkJsonCheckerPasses.st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runNativeJsonBenchmarkRoundTrip.st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/validateFiles.usingTest..st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/methodProperties.json create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/properties.json create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/README.md create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/instance/writeRead..st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/methodProperties.json create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/properties.json create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testListsExtra.st create mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testMapsExtra.st diff --git a/.filetree b/.filetree new file mode 100644 index 0000000..c6704e5 --- /dev/null +++ b/.filetree @@ -0,0 +1,2 @@ +{"packageExtension" : ".package", +"propertyFileExtension" : ".json" } \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/.filetree b/repository/ConfigurationOfNeoJSON.package/.filetree index 8998102..57a6797 100644 --- a/repository/ConfigurationOfNeoJSON.package/.filetree +++ b/repository/ConfigurationOfNeoJSON.package/.filetree @@ -1,4 +1,5 @@ { - "noMethodMetaData" : true, "separateMethodMetaAndSource" : false, - "useCypressPropertiesFile" : true } + "noMethodMetaData" : true, + "useCypressPropertiesFile" : true +} \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline3..st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline3..st new file mode 100644 index 0000000..0ccdffd --- /dev/null +++ b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline3..st @@ -0,0 +1,44 @@ +baselines +baseline3: spec + + spec + for: #common + do: [ + spec + blessing: #baseline; + repository: 'http://mc.stfx.eu/Neo'; + package: 'Neo-JSON-Core'; + package: 'Neo-JSON-Tests' with: [ spec requires: 'Neo-JSON-Core' ]; + group: 'default' with: #('Core' 'Tests'); + group: 'Core' with: #('Neo-JSON-Core'); + group: 'Tests' with: #('Neo-JSON-Tests') ]. + + + spec + for: #pharo + do: [ + + spec + package: 'Neo-JSON-Pharo-Examples' with: [ spec requires: 'Neo-JSON-Core' ]; + group: 'Examples' with: #('Neo-JSON-Pharo-Examples'). + + "So far, it only contains Pharo-Specific extensions" + spec + package: 'Neo-JSON-Pharo-Core' with: [ spec requires: #( 'Neo-JSON-Core') ]; + package: 'Neo-JSON-Pharo-Tests' with: [ spec requires: #( 'Neo-JSON-Tests') ]; + group: 'Core' with: #('Neo-JSON-Core' 'Neo-JSON-Pharo-Core'). + + "CoreVASTExport group is used when we are exporting code to be later imported in VAST/ENVY via Monticello Importer. 'Neo-JSON-VASTMock' should not be imported in ENVY....its goal is that in 'Neo-JSON-VAST-Core' we can define extension methods to classes defined in VAST but not existing in Pharo. So in 'Neo-JSON-VASTMock' we simply create dummy classes with the sole purpose of being able to define extension methods for it. " + spec + package: 'Neo-JSON-VASTMock'; + package: 'Neo-JSON-VAST-Core' with: [ spec requires: #('Neo-JSON-VASTMock' 'Neo-JSON-Core') ]; + package: 'Neo-JSON-VAST-Tests' with: [ spec requires: #( 'Neo-JSON-Tests') ]; + group: 'CoreVASTExport' with: #('Neo-JSON-Core' 'Neo-JSON-VAST-Core' 'Tests' 'Neo-JSON-VAST-Tests' ). + ]. + + spec + for: #gemstone + do: [ + spec + baseline: 'NeoJSON' with: [ spec repository: 'github://GsDevKit/NeoJSON:master/repository' ]; + import: 'NeoJSON' ] \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/stable..st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/stable..st index 5df5d45..75b8772 100644 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/stable..st +++ b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/stable..st @@ -2,6 +2,6 @@ symbolic versions stable: spec - spec for: #common version: '13'. + spec for: #common version: '17'. spec for: #gemstone version: '13'. \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version14..st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version14..st new file mode 100644 index 0000000..ab5ba02 --- /dev/null +++ b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version14..st @@ -0,0 +1,9 @@ +versions +version14: spec + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.37'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.35' ] \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version15..st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version15..st new file mode 100644 index 0000000..1b2daac --- /dev/null +++ b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version15..st @@ -0,0 +1,9 @@ +versions +version15: spec + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.37'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.36' ] \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version16..st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version16..st new file mode 100644 index 0000000..2da79b3 --- /dev/null +++ b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version16..st @@ -0,0 +1,9 @@ +versions +version16: spec + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.42'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.39' ] \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version17..st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version17..st new file mode 100644 index 0000000..aae7af6 --- /dev/null +++ b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version17..st @@ -0,0 +1,9 @@ +versions +version17: spec + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.46'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.44' ] \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version30..st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version30..st new file mode 100644 index 0000000..a33fb3b --- /dev/null +++ b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version30..st @@ -0,0 +1,7 @@ +versions +version30: spec + + + spec for: #common do: [ + spec + blessing: #development ] \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/methodProperties.json b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/methodProperties.json index 9808d89..864e369 100644 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/methodProperties.json +++ b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/methodProperties.json @@ -1,35 +1,44 @@ { - "class" : { - "DevelopmentSupport" : "SvenVanCaekenberghe 6/22/2012 16:48", - "baseConfigurationClassIfAbsent:" : "SvenVanCaekenberghe 6/22/2012 16:48", - "catalogContactInfo" : "SvenVanCaekenberghe 1/5/2016 09:38", - "catalogDescription" : "SvenVanCaekenberghe 1/5/2016 09:39", - "catalogKeywords" : "SvenVanCaekenberghe 1/5/2016 09:39", - "ensureMetacello" : "SvenVanCaekenberghe 6/22/2012 16:48", - "ensureMetacelloBaseConfiguration" : "SvenVanCaekenberghe 6/22/2012 16:48", - "isMetacelloConfig" : "SvenVanCaekenberghe 6/22/2012 16:48", - "load" : "SvenVanCaekenberghe 6/22/2012 16:48", - "loadBleedingEdge" : "SvenVanCaekenberghe 6/22/2012 16:48", - "loadDevelopment" : "SvenVanCaekenberghe 6/22/2012 16:48", - "project" : "SvenVanCaekenberghe 6/22/2012 16:48", - "validate" : "SvenVanCaekenberghe 6/22/2012 16:48" }, "instance" : { - "baseline1:" : "SvenVanCaekenberghe 6/22/2012 16:53", - "baseline2:" : "PaulDeBruicker 11/2/2014 20:39", - "bleedingEdge:" : "SvenVanCaekenberghe 7/11/2016 10:22", - "development:" : "SvenVanCaekenberghe 7/11/2016 10:22", - "project" : "SvenVanCaekenberghe 6/22/2012 16:48", - "stable:" : "SvenVanCaekenberghe 7/11/2016 10:22", "version10:" : "SvenVanCaekenberghe 3/29/2015 11:39", - "version11:" : "SvenVanCaekenberghe 11/25/2015 09:34", + "version4:" : "SvenVanCaekenberghe 8/30/2013 11:12", + "version17:" : "SvenVanCaekenberghe 12/19/2017 15:30", + "version30:" : "MarianoMartinezPeck 1/30/2018 11:08", + "project" : "SvenVanCaekenberghe 6/22/2012 16:48", + "development:" : "SvenVanCaekenberghe 7/11/2016 10:22", "version12:" : "SvenVanCaekenberghe 1/22/2016 12:58", - "version13:" : "SvenVanCaekenberghe 7/4/2016 14:58", + "version6:" : "SvenVanCaekenberghe 12/27/2013 19:02", + "baseline2:" : "PaulDeBruicker 11/2/2014 20:39", "version1:" : "SvenVanCaekenberghe 9/27/2012 20:29", - "version2:" : "SvenVanCaekenberghe 12/18/2012 10:27", - "version3:" : "SvenVanCaekenberghe 5/29/2013 15:54", - "version4:" : "SvenVanCaekenberghe 8/30/2013 11:12", + "version14:" : "SvenVanCaekenberghe 2/2/2017 13:46", + "version8:" : "SvenVanCaekenberghe 1/21/2014 20:08", "version5:" : "SvenVanCaekenberghe 9/3/2013 12:22", - "version6:" : "SvenVanCaekenberghe 12/27/2013 19:02", + "version3:" : "SvenVanCaekenberghe 5/29/2013 15:54", + "baseline1:" : "SvenVanCaekenberghe 6/22/2012 16:53", + "version16:" : "SvenVanCaekenberghe 5/29/2017 14:40", + "version13:" : "SvenVanCaekenberghe 7/4/2016 14:58", "version7:" : "SvenVanCaekenberghe 12/27/2013 21:44", - "version8:" : "SvenVanCaekenberghe 1/21/2014 20:08", - "version9:" : "SvenVanCaekenberghe 4/24/2014 13:29" } } + "version11:" : "SvenVanCaekenberghe 11/25/2015 09:34", + "bleedingEdge:" : "SvenVanCaekenberghe 7/11/2016 10:22", + "version2:" : "SvenVanCaekenberghe 12/18/2012 10:27", + "baseline3:" : "SvenVanCaekenberghe 2/6/2018 20:39", + "version15:" : "SvenVanCaekenberghe 2/2/2017 13:50", + "stable:" : "SvenVanCaekenberghe 12/19/2017 15:30", + "version9:" : "SvenVanCaekenberghe 4/24/2014 13:29" + }, + "class" : { + "load" : "SvenVanCaekenberghe 6/22/2012 16:48", + "catalogDescription" : "SvenVanCaekenberghe 1/5/2016 09:39", + "baseConfigurationClassIfAbsent:" : "SvenVanCaekenberghe 6/22/2012 16:48", + "DevelopmentSupport" : "SvenVanCaekenberghe 6/22/2012 16:48", + "ensureMetacello" : "SvenVanCaekenberghe 6/22/2012 16:48", + "catalogKeywords" : "SvenVanCaekenberghe 1/5/2016 09:39", + "loadDevelopment" : "SvenVanCaekenberghe 6/22/2012 16:48", + "isMetacelloConfig" : "SvenVanCaekenberghe 6/22/2012 16:48", + "ensureMetacelloBaseConfiguration" : "SvenVanCaekenberghe 6/22/2012 16:48", + "loadBleedingEdge" : "SvenVanCaekenberghe 6/22/2012 16:48", + "catalogContactInfo" : "SvenVanCaekenberghe 1/5/2016 09:38", + "validate" : "SvenVanCaekenberghe 6/22/2012 16:48", + "project" : "SvenVanCaekenberghe 6/22/2012 16:48" + } +} \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/properties.json b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/properties.json index 9ba2659..11c01c1 100644 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/properties.json +++ b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/properties.json @@ -1,14 +1,15 @@ { + "commentStamp" : "", + "super" : "Object", "category" : "ConfigurationOfNeoJSON", - "classinstvars" : [ - ], + "classinstvars" : [ ], + "pools" : [ ], "classvars" : [ - "LastVersionLoad" ], - "commentStamp" : "", + "LastVersionLoad" + ], "instvars" : [ - "project" ], + "project" + ], "name" : "ConfigurationOfNeoJSON", - "pools" : [ - ], - "super" : "Object", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/monticello.meta/version b/repository/ConfigurationOfNeoJSON.package/monticello.meta/version index c98b642..d2d83ff 100644 --- a/repository/ConfigurationOfNeoJSON.package/monticello.meta/version +++ b/repository/ConfigurationOfNeoJSON.package/monticello.meta/version @@ -1 +1 @@ -(name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.18' message 'remove fixed version for Pharo 2' id 'd0a7ed10-3489-4c44-8660-a32ca7e310f9' date '11 July 2016' time '10:24:09.934133 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.17' message 'new stable v13 fixed v13 as development & bleedingEdge for pharo 2' id 'e3db452a-9cb1-4905-8137-7d2000bffc5c' date '4 July 2016' time '3:05:08.240172 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.16' message 'new #stable version 12' id '01f3f962-be93-4c82-8202-811cb23ee382' date '22 January 2016' time '12:59:31.613337 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.15' message 'Added Pharo Catalog methods' id 'a72d39e2-a388-4a8b-bcd1-befe683fcd54' date '5 January 2016' time '9:44:59.254937 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.14' message 'updated to #stable version 11' id '02843207-1071-4d38-965e-9be4f6d00dd3' date '25 November 2015' time '9:35:11.431058 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.12' message 'upgrade to #stable version 10 for #common' id '556e99db-c3b6-4fe8-9aa4-dd6d254cc358' date '29 March 2015' time '11:40:22.992972 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-PaulDeBruicker.11' message 'Added GemStone to the configuration' id '568062a9-b890-418e-91f1-428f5ed94522' date '2 November 2014' time '8:40:58.359238 pm' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.10' message 'updated to #stable v9' id '14b025d0-da85-481f-924f-39f5fbdbc929' date '24 April 2014' time '1:30:05.463071 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.9' message 'v8' id '7ed1d4a7-e738-401a-9cac-69b85aa16b2e' date '21 January 2014' time '8:08:56.986201 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.8' message 'updated to stable v7' id '679ab4c1-1a64-426f-89ca-21722fc74519' date '27 December 2013' time '9:45:29.870451 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.7' message 'updated to stable v6' id '820b367a-f793-4fac-b5a2-1dd1ac73e48e' date '27 December 2013' time '7:03:35.869612 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.6' message 'New feature: NeoJSONWriter>>#asciiOnly: to escape all non ASCII characters in strings' id '27393a62-ca8a-4ad4-808c-ab2f6af1eff3' date '3 September 2013' time '12:23:21.522443 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.5' message 'updated to v4' id '7a79620f-07ab-4204-b37d-160779d1b946' date '30 August 2013' time '11:12:49.896139 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.4' message 'stable v3' id '8351f635-abd1-44eb-803b-05ae75b962d8' date '29 May 2013' time '3:54:34.113576 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.3' message 'stable version 2' id '4b6f70ed-72be-4f87-82a6-2f9745d99eba' date '18 December 2012' time '10:28:02.924 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.2' message 'added spec blessing: #release to all versiosn' id 'da8a252c-180e-4245-84d6-c0f0b3c43d8d' date '27 September 2012' time '8:30:34.121 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.1' message '1st version' id '43b49eb6-24b6-4665-a7b7-88fafe008cf9' date '22 June 2012' time '4:56:37.24 pm' author 'SvenVanCaekenberghe' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ()) \ No newline at end of file +(name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.29' message 'move #baseline3 back to http://mc.stfx.eu/Neo' id 'c353c015-f220-0d00-ab86-a69d0a2967d2' date '6 February 2018' time '8:40:16.339097 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-marianopeck.28' message 'Added a ''Examples'' group for Pharo and added Neo-JSON-Pharo-Examples for it. ' id 'a830278b-d720-0d00-8338-267f05c229b0' date '5 February 2018' time '9:00:21.897581 am' author 'marianopeck' ancestors ((name 'ConfigurationOfNeoJSON-marianopeck.27' message 'Also add the ability to have platform specific pacakges for Tests package. ' id 'a6d303b8-6120-0d00-a478-dd000e1160ba' date '30 January 2018' time '12:26:08.413849 pm' author 'marianopeck' ancestors ((name 'ConfigurationOfNeoJSON-MarianoMartinezPeck.26' message 'Added Tests group to CoreVASTExport' id 'f990cf75-6120-0d00-b4bb-02180ea1a7a7' date '30 January 2018' time '12:07:37.692677 pm' author 'MarianoMartinezPeck' ancestors ((name 'ConfigurationOfNeoJSON-MarianoMartinezPeck.25' message '* Make ''Default'' group load groups (''Core'' and ''Tests'') rather than pacakges directly. * Added new #version30: to be filled later * changed repo url of baseline3: to be ''http://smalltalkhub.com/mc/SvenVanCaekenberghe/Neo/main'' until we find another way. ' id '2c3c4acb-6020-0d00-b8b7-7fa50ea1a7a7' date '30 January 2018' time '11:19:56.827936 am' author 'MarianoMartinezPeck' ancestors ((name 'ConfigurationOfNeoJSON-MarianoMartinezPeck.24' message '* Make ''Default'' group load groups (''Core'' and ''Tests'') rather than pacakges directly. * Added new #version30: to be filled later * changed repo url of baseline3: to be ''http://smalltalkhub.com/mc/SvenVanCaekenberghe/Neo/main'' until we find another way. ' id 'e0f63ec5-6020-0d00-b8b6-a3ee0ea1a7a7' date '30 January 2018' time '11:18:15.425957 am' author 'MarianoMartinezPeck' ancestors ((name 'ConfigurationOfNeoJSON-marianopeck.23' message 'This commits aims to make NeoJSON more portable to other Smalltalk dialects like VAST. * Moved OrderedCollection and SmallDictionary neoJsonOn: to a new separate package ''Neo-JSON-Pharo-Core''. * Created new separate packages ''Neo-JSON-Pharo-Core'' and ''Neo-JSON-VASTMock''. ''Neo-JSON-VASTMock'' should not be imported in ENVY....its goal is that in ''Neo-JSON-VAST-Core'' we can define extension methods to classes defined in VAST but not existing in Pharo. So in ''Neo-JSON-VASTMock'' we simply create dummy classes with the sole purpose of being able to define extension methods for it. * Update ConfigurationOfNeoJSON so that it reflects this new package organization. This was done under a new #baseline3: ' id 'e748c783-6020-0d00-a474-14600e1160ba' date '30 January 2018' time '10:59:57.063606 am' author 'marianopeck' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.22' message 'stable version 17' id '1d5c2116-141d-0d00-9b74-78760f1f500e' date '19 December 2017' time '3:33:25.075282 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.21' message 'stable version 16' id '5085cfbb-0a0d-0d00-b0c5-ecd007d9622d' date '29 May 2017' time '2:40:49.012273 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.20' message 'stable version 15' id '9d33b13f-914f-4bdc-a0d4-7f921d1d939e' date '2 February 2017' time '1:50:59.42841 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.19' message 'stable version 14' id 'c70aff66-749a-4d5b-bba8-5dae3634439c' date '2 February 2017' time '1:47:00.840545 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.18' message 'remove fixed version for Pharo 2' id 'd0a7ed10-3489-4c44-8660-a32ca7e310f9' date '11 July 2016' time '10:24:09.934133 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.17' message 'new stable v13 fixed v13 as development & bleedingEdge for pharo 2' id 'e3db452a-9cb1-4905-8137-7d2000bffc5c' date '4 July 2016' time '3:05:08.240172 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.16' message 'new #stable version 12' id '01f3f962-be93-4c82-8202-811cb23ee382' date '22 January 2016' time '12:59:31.613337 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.15' message 'Added Pharo Catalog methods' id 'a72d39e2-a388-4a8b-bcd1-befe683fcd54' date '5 January 2016' time '9:44:59.254937 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.14' message 'updated to #stable version 11' id '02843207-1071-4d38-965e-9be4f6d00dd3' date '25 November 2015' time '9:35:11.431058 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.12' message 'upgrade to #stable version 10 for #common' id '556e99db-c3b6-4fe8-9aa4-dd6d254cc358' date '29 March 2015' time '11:40:22.992972 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-PaulDeBruicker.11' message 'Added GemStone to the configuration' id '568062a9-b890-418e-91f1-428f5ed94522' date '2 November 2014' time '8:40:58.359238 pm' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.10' message 'updated to #stable v9' id '14b025d0-da85-481f-924f-39f5fbdbc929' date '24 April 2014' time '1:30:05.463071 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.9' message 'v8' id '7ed1d4a7-e738-401a-9cac-69b85aa16b2e' date '21 January 2014' time '8:08:56.986201 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.8' message 'updated to stable v7' id '679ab4c1-1a64-426f-89ca-21722fc74519' date '27 December 2013' time '9:45:29.870451 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.7' message 'updated to stable v6' id '820b367a-f793-4fac-b5a2-1dd1ac73e48e' date '27 December 2013' time '7:03:35.869612 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.6' message 'New feature: NeoJSONWriter>>#asciiOnly: to escape all non ASCII characters in strings' id '27393a62-ca8a-4ad4-808c-ab2f6af1eff3' date '3 September 2013' time '12:23:21.522443 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.5' message 'updated to v4' id '7a79620f-07ab-4204-b37d-160779d1b946' date '30 August 2013' time '11:12:49.896139 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.4' message 'stable v3' id '8351f635-abd1-44eb-803b-05ae75b962d8' date '29 May 2013' time '3:54:34.113576 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.3' message 'stable version 2' id '4b6f70ed-72be-4f87-82a6-2f9745d99eba' date '18 December 2012' time '10:28:02.924 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.2' message 'added spec blessing: #release to all versiosn' id 'da8a252c-180e-4245-84d6-c0f0b3c43d8d' date '27 September 2012' time '8:30:34.121 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.1' message '1st version' id '43b49eb6-24b6-4665-a7b7-88fafe008cf9' date '22 June 2012' time '4:56:37.24 pm' author 'SvenVanCaekenberghe' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ()) \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/properties.json b/repository/ConfigurationOfNeoJSON.package/properties.json index f037444..6f31cf5 100644 --- a/repository/ConfigurationOfNeoJSON.package/properties.json +++ b/repository/ConfigurationOfNeoJSON.package/properties.json @@ -1,2 +1 @@ -{ - } +{ } \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/.filetree b/repository/Neo-JSON-Core.package/.filetree index 8998102..57a6797 100644 --- a/repository/Neo-JSON-Core.package/.filetree +++ b/repository/Neo-JSON-Core.package/.filetree @@ -1,4 +1,5 @@ { - "noMethodMetaData" : true, "separateMethodMetaAndSource" : false, - "useCypressPropertiesFile" : true } + "noMethodMetaData" : true, + "useCypressPropertiesFile" : true +} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/Boolean.extension/methodProperties.json b/repository/Neo-JSON-Core.package/Boolean.extension/methodProperties.json index 7893d0b..1bb304b 100644 --- a/repository/Neo-JSON-Core.package/Boolean.extension/methodProperties.json +++ b/repository/Neo-JSON-Core.package/Boolean.extension/methodProperties.json @@ -1,5 +1,6 @@ { - "class" : { - }, "instance" : { - "neoJsonOn:" : "SvenVanCaekenberghe 6/2/2012 22:14" } } + "neoJsonOn:" : "SvenVanCaekenberghe 6/2/2012 22:14" + }, + "class" : { } +} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/Boolean.extension/properties.json b/repository/Neo-JSON-Core.package/Boolean.extension/properties.json index c15542b..dd25360 100644 --- a/repository/Neo-JSON-Core.package/Boolean.extension/properties.json +++ b/repository/Neo-JSON-Core.package/Boolean.extension/properties.json @@ -1,2 +1,3 @@ { - "name" : "Boolean" } + "name" : "Boolean" +} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/Collection.extension/methodProperties.json b/repository/Neo-JSON-Core.package/Collection.extension/methodProperties.json index 46d377c..11d075d 100644 --- a/repository/Neo-JSON-Core.package/Collection.extension/methodProperties.json +++ b/repository/Neo-JSON-Core.package/Collection.extension/methodProperties.json @@ -1,5 +1,6 @@ { - "class" : { - }, "instance" : { - "neoJsonOn:" : "SvenVanCaekenberghe 6/3/2012 19:29" } } + "neoJsonOn:" : "SvenVanCaekenberghe 6/3/2012 19:29" + }, + "class" : { } +} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/Collection.extension/properties.json b/repository/Neo-JSON-Core.package/Collection.extension/properties.json index 93b0dc3..48f9f8d 100644 --- a/repository/Neo-JSON-Core.package/Collection.extension/properties.json +++ b/repository/Neo-JSON-Core.package/Collection.extension/properties.json @@ -1,2 +1,3 @@ { - "name" : "Collection" } + "name" : "Collection" +} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/Dictionary.extension/methodProperties.json b/repository/Neo-JSON-Core.package/Dictionary.extension/methodProperties.json index 28999eb..9a93cbf 100644 --- a/repository/Neo-JSON-Core.package/Dictionary.extension/methodProperties.json +++ b/repository/Neo-JSON-Core.package/Dictionary.extension/methodProperties.json @@ -1,5 +1,6 @@ { - "class" : { - }, "instance" : { - "neoJsonOn:" : "SvenVanCaekenberghe 6/3/2012 19:30" } } + "neoJsonOn:" : "SvenVanCaekenberghe 6/3/2012 19:30" + }, + "class" : { } +} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/Dictionary.extension/properties.json b/repository/Neo-JSON-Core.package/Dictionary.extension/properties.json index cb1bf50..3201c8d 100644 --- a/repository/Neo-JSON-Core.package/Dictionary.extension/properties.json +++ b/repository/Neo-JSON-Core.package/Dictionary.extension/properties.json @@ -1,2 +1,3 @@ { - "name" : "Dictionary" } + "name" : "Dictionary" +} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/Integer.extension/methodProperties.json b/repository/Neo-JSON-Core.package/Integer.extension/methodProperties.json index b55faec..d597374 100644 --- a/repository/Neo-JSON-Core.package/Integer.extension/methodProperties.json +++ b/repository/Neo-JSON-Core.package/Integer.extension/methodProperties.json @@ -1,5 +1,6 @@ { - "class" : { - }, "instance" : { - "neoJsonOn:" : "SvenVanCaekenberghe 6/2/2012 22:17" } } + "neoJsonOn:" : "SvenVanCaekenberghe 6/2/2012 22:17" + }, + "class" : { } +} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/Integer.extension/properties.json b/repository/Neo-JSON-Core.package/Integer.extension/properties.json index d27420b..a8c2b93 100644 --- a/repository/Neo-JSON-Core.package/Integer.extension/properties.json +++ b/repository/Neo-JSON-Core.package/Integer.extension/properties.json @@ -1,2 +1,3 @@ { - "name" : "Integer" } + "name" : "Integer" +} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfElementSchema..st b/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfElementSchema..st index 6d53d08..d1bad0f 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfElementSchema..st +++ b/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfElementSchema..st @@ -7,5 +7,7 @@ listOfElementSchema: elementSchema jsonReader listClass streamContents: [ :stream | jsonReader parseListDo: [ | element | element := jsonReader nextAs: elementSchema. - stream nextPut: element ] ] ] - "we do not set a writer, #neoJsonOn: should be sufficient" + stream nextPut: element ] ] ]. + self writer: [ :jsonWriter :list | + jsonWriter writeListStreamingDo: [ :listWriter | + list do: [ :each | listWriter writeElement: each as: elementSchema ] ] ] diff --git a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfType..st b/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfType..st index 6d96fbf..9788690 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfType..st +++ b/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfType..st @@ -8,4 +8,4 @@ listOfType: collectionClass jsonReader parseListDo: [ | element | element := jsonReader next. stream nextPut: element ] ] ] - "we do not set a writer, #neoJsonOn: should be sufficient" + "we do not set a writer, #neoJsonOn: should be sufficient, no element type known anyway" diff --git a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfType.andElementSchema..st b/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfType.andElementSchema..st index 3b2c98e..c06433b 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfType.andElementSchema..st +++ b/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfType.andElementSchema..st @@ -7,5 +7,8 @@ listOfType: collectionClass andElementSchema: elementSchema collectionClass streamContents: [ :stream | jsonReader parseListDo: [ | element | element := jsonReader nextAs: elementSchema. - stream nextPut: element ] ] ] - "we do not set a writer, #neoJsonOn: should be sufficient" + stream nextPut: element ] ] ]. + self writer: [ :jsonWriter :list | + jsonWriter writeListStreamingDo: [ :listWriter | + list do: [ :each | + listWriter writeElement: each as: elementSchema ] ] ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/mapWithValueSchema..st b/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/mapWithValueSchema..st index 154f4cb..0b7e3fd 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/mapWithValueSchema..st +++ b/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/mapWithValueSchema..st @@ -9,5 +9,8 @@ mapWithValueSchema: valueSchema jsonReader parseMapKeysDo: [ :key | | value | value := jsonReader nextAs: valueSchema. map at: key put: value ]. - map ] - "we do not set a writer, #neoJsonOn: should be sufficient" + map ]. + self writer: [ :jsonWriter :map | + jsonWriter writeMapStreamingDo: [ :mapWriter | + map keysAndValuesDo: [ :key :value | + mapWriter writeKey: key value: value as: valueSchema ] ] ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/methodProperties.json b/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/methodProperties.json index 2710d00..3cdc199 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/methodProperties.json +++ b/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/methodProperties.json @@ -1,16 +1,17 @@ { - "class" : { - }, "instance" : { "decoder:" : "SvenVanCaekenberghe 6/13/2012 11:14", - "encoder:" : "SvenVanCaekenberghe 6/13/2012 11:14", - "identifier" : "SvenVanCaekenberghe 3/23/2014 19:24", - "listOfElementSchema:" : "SvenVanCaekenberghe 6/13/2012 11:38", - "listOfType:" : "SvenVanCaekenberghe 6/13/2012 11:25", - "listOfType:andElementSchema:" : "SvenVanCaekenberghe 6/13/2012 11:39", - "mapWithValueSchema:" : "SvenVanCaekenberghe 8/30/2013 11:04", "readFrom:" : "SvenVanCaekenberghe 3/24/2014 10:34", - "reader:" : "SvenVanCaekenberghe 3/24/2014 10:36", - "schemaName:" : "SvenVanCaekenberghe 6/8/2012 21:09", + "writer:" : "SvenVanCaekenberghe 3/23/2014 22:12", + "mapWithValueSchema:" : "SvenVanCaekenberghe 9/22/2017 14:45", "writeObject:on:" : "SvenVanCaekenberghe 3/23/2014 22:10", - "writer:" : "SvenVanCaekenberghe 3/23/2014 22:12" } } + "schemaName:" : "SvenVanCaekenberghe 6/8/2012 21:09", + "listOfElementSchema:" : "SvenVanCaekenberghe 9/22/2017 14:46", + "encoder:" : "SvenVanCaekenberghe 6/13/2012 11:14", + "listOfType:andElementSchema:" : "SvenVanCaekenberghe 9/22/2017 14:46", + "reader:" : "SvenVanCaekenberghe 3/24/2014 10:36", + "identifier" : "SvenVanCaekenberghe 3/23/2014 19:24", + "listOfType:" : "SvenVanCaekenberghe 9/22/2017 14:45" + }, + "class" : { } +} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/properties.json b/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/properties.json index c9d3ad2..c3a0763 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/properties.json +++ b/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/properties.json @@ -1,16 +1,15 @@ { - "category" : "Neo-JSON-Core", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "", + "super" : "NeoJSONMapping", + "category" : "Neo-JSON-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ "schemaName", "reader", - "writer" ], + "writer" + ], "name" : "NeoJSONCustomMapping", - "pools" : [ - ], - "super" : "NeoJSONMapping", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMapper.class/methodProperties.json b/repository/Neo-JSON-Core.package/NeoJSONMapper.class/methodProperties.json index 58809e0..e576626 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONMapper.class/methodProperties.json +++ b/repository/Neo-JSON-Core.package/NeoJSONMapper.class/methodProperties.json @@ -1,14 +1,15 @@ { - "class" : { - }, "instance" : { + "mapAllInstVarsFor:" : "SvenVanCaekenberghe 3/22/2014 10:54", "customMappingFor:" : "SvenVanCaekenberghe 3/22/2014 10:57", "for:customDo:" : "SvenVanCaekenberghe 3/22/2014 10:56", - "for:do:" : "SvenVanCaekenberghe 3/22/2014 10:57", - "mapAllInstVarsFor:" : "SvenVanCaekenberghe 3/22/2014 10:54", - "mapInstVarsFor:" : "SvenVanCaekenberghe 3/22/2014 10:54", - "mappingFor:" : "SvenVanCaekenberghe 6/12/2012 15:48", "mappingFor:ifAbsent:" : "SvenVanCaekenberghe 6/9/2012 18:24", "mappings" : "SvenVanCaekenberghe 6/7/2012 14:55", + "resolveMappingFor:" : "SvenVanCaekenberghe 6/9/2012 18:29", + "for:do:" : "SvenVanCaekenberghe 3/22/2014 10:57", "objectMappingFor:" : "SvenVanCaekenberghe 3/22/2014 10:54", - "resolveMappingFor:" : "SvenVanCaekenberghe 6/9/2012 18:29" } } + "mapInstVarsFor:" : "SvenVanCaekenberghe 3/22/2014 10:54", + "mappingFor:" : "SvenVanCaekenberghe 6/12/2012 15:48" + }, + "class" : { } +} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMapper.class/properties.json b/repository/Neo-JSON-Core.package/NeoJSONMapper.class/properties.json index d2d448a..38de404 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONMapper.class/properties.json +++ b/repository/Neo-JSON-Core.package/NeoJSONMapper.class/properties.json @@ -1,14 +1,13 @@ { - "category" : "Neo-JSON-Core", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "", + "super" : "Object", + "category" : "Neo-JSON-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ - "mappings" ], + "mappings" + ], "name" : "NeoJSONMapper", - "pools" : [ - ], - "super" : "Object", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMapping.class/methodProperties.json b/repository/Neo-JSON-Core.package/NeoJSONMapping.class/methodProperties.json index eda1e34..4d08e6a 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONMapping.class/methodProperties.json +++ b/repository/Neo-JSON-Core.package/NeoJSONMapping.class/methodProperties.json @@ -1,8 +1,9 @@ { - "class" : { - }, "instance" : { - "identifier" : "SvenVanCaekenberghe 3/23/2014 19:22", - "printOn:" : "SvenVanCaekenberghe 3/23/2014 19:24", "readFrom:" : "SvenVanCaekenberghe 3/23/2014 19:23", - "writeObject:on:" : "SvenVanCaekenberghe 3/23/2014 19:23" } } + "writeObject:on:" : "SvenVanCaekenberghe 3/23/2014 19:23", + "identifier" : "SvenVanCaekenberghe 3/23/2014 19:22", + "printOn:" : "SvenVanCaekenberghe 3/23/2014 19:24" + }, + "class" : { } +} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMapping.class/properties.json b/repository/Neo-JSON-Core.package/NeoJSONMapping.class/properties.json index 9c8edce..cbf27a9 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONMapping.class/properties.json +++ b/repository/Neo-JSON-Core.package/NeoJSONMapping.class/properties.json @@ -1,14 +1,11 @@ { - "category" : "Neo-JSON-Core", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "SvenVanCaekenberghe 3/23/2014 19:22", - "instvars" : [ - ], - "name" : "NeoJSONMapping", - "pools" : [ - ], "super" : "Object", - "type" : "normal" } + "category" : "Neo-JSON-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "NeoJSONMapping", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/README.md b/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/README.md index 9e28acc..5ce2759 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/README.md +++ b/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/README.md @@ -1,4 +1,3 @@ -I am NeoJSONMappingNotFound. -I am a NotFound exception. +I am NeoJSONMappingNotFound. I am signalled when no mapping is found for a schema. -I am signalled when no mapping is found for a schema. \ No newline at end of file +Portability comment: In Pharo, I could technically subclass from NotFound directly, avoid all my defined methods and only keep #messageText and #standardMessageText. However, NotFound exception does not exist in other dialects. To keep NeoJSON as portable as possible we duplicate some Pharo code into myself. \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/class/signalFor..st b/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/class/signalFor..st new file mode 100644 index 0000000..9c1dc48 --- /dev/null +++ b/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/class/signalFor..st @@ -0,0 +1,7 @@ +instance creation +signalFor: anObject + "Create and signal an exception for anObject in the default receiver." + + ^ self new + object: anObject; + signal \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/class/signalFor.in..st b/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/class/signalFor.in..st new file mode 100644 index 0000000..e016a6a --- /dev/null +++ b/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/class/signalFor.in..st @@ -0,0 +1,8 @@ +instance creation +signalFor: anObject in: aCollection + "Create and signal an exception for anObject in aCollection." + + ^ self new + object: anObject; + collection: aCollection; + signal \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/collection..st b/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/collection..st new file mode 100644 index 0000000..1cbebd7 --- /dev/null +++ b/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/collection..st @@ -0,0 +1,5 @@ +accessing +collection: aCollection + "Set the collection where something is not found in" + + collection := aCollection \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/collection.st b/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/collection.st new file mode 100644 index 0000000..c2192ab --- /dev/null +++ b/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/collection.st @@ -0,0 +1,5 @@ +accessing +collection + "Return the collection where something is not found in" + + ^ collection \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/messageText.st b/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/messageText.st new file mode 100644 index 0000000..89c4479 --- /dev/null +++ b/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/messageText.st @@ -0,0 +1,5 @@ +accessing +messageText + "Overwritten with standard text. To ease portability to other Smalltalk dialects we do not access the instVar 'messageText' as not all dialects have it. Not caching the value on the instVar shouldn't bring any performance hit in this case. " + + ^ self standardMessageText \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/object..st b/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/object..st new file mode 100644 index 0000000..17b79eb --- /dev/null +++ b/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/object..st @@ -0,0 +1,5 @@ +accessing +object: anObject + "Set the object that was not found" + + object := anObject \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/object.st b/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/object.st new file mode 100644 index 0000000..44ae0b9 --- /dev/null +++ b/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/object.st @@ -0,0 +1,5 @@ +accessing +object + "Return the object that was not found" + + ^ object \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/standardMessageText.st b/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/standardMessageText.st index a4cce37..182f3fe 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/standardMessageText.st +++ b/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/standardMessageText.st @@ -1,4 +1,4 @@ -printing +private standardMessageText ^ String streamContents: [ :stream | stream << 'No mapping found for '. diff --git a/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/methodProperties.json b/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/methodProperties.json index fa2cbf5..d51c37f 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/methodProperties.json +++ b/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/methodProperties.json @@ -1,5 +1,14 @@ { - "class" : { - }, "instance" : { - "standardMessageText" : "SvenVanCaekenberghe 6/12/2012 15:47" } } + "collection" : "marianopeck 1/31/2018 09:10", + "collection:" : "marianopeck 1/31/2018 09:10", + "object:" : "MarianoMartinezPeck 1/25/2018 09:35", + "object" : "MarianoMartinezPeck 1/25/2018 09:35", + "messageText" : "MarianoMartinezPeck 1/30/2018 08:46", + "standardMessageText" : "MarianoMartinezPeck 1/25/2018 09:36" + }, + "class" : { + "signalFor:" : "MarianoMartinezPeck 1/30/2018 09:48", + "signalFor:in:" : "MarianoMartinezPeck 1/30/2018 09:48" + } +} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/properties.json b/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/properties.json index 1c4e243..85ff1ed 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/properties.json +++ b/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/properties.json @@ -1,14 +1,14 @@ { + "commentStamp" : "MarianoMartinezPeck 1/30/2018 09:47", + "super" : "Error", "category" : "Neo-JSON-Core", - "classinstvars" : [ - ], - "classvars" : [ - ], - "commentStamp" : "", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ - ], + "object", + "collection" + ], "name" : "NeoJSONMappingNotFound", - "pools" : [ - ], - "super" : "NotFound", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObject.class/README.md b/repository/Neo-JSON-Core.package/NeoJSONObject.class/README.md index 9e97d4a..41426e0 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONObject.class/README.md +++ b/repository/Neo-JSON-Core.package/NeoJSONObject.class/README.md @@ -13,6 +13,8 @@ As are the following self foo: 1. self at: #foo put: 1. +Except that in the first case, self is returned. + I can optionally be used by NeoJSONReader as mapClass (see #mapClass:). For output, I act just like my superclass (it is thus not necessary to do any conversions). @@ -20,5 +22,16 @@ For output, I act just like my superclass (it is thus not necessary to do any co Example: NeoJSONObject fromString: '{"foo":1,"bar":-2}'. - -I use JSON as my printed representation. \ No newline at end of file + NeoJSONObject new foo: 1; bar: -2. + { #x -> 100. #y -> 200 } as: NeoJSONObject. + (NeoJSONObject new data: (NeoJSONObject new id: #sensor1; value: 37.5)) asString. + +I use JSON as my printed representation. To convert me to JSON, use #printString or #asString. + +Additionally, I support path access for nested instances of me, using #atPath: and #atPath:put: + +The first is special because it returns nil as soon as a key is missing. The second is special because it creates extra levels (instances of me) as needed to follow the path of keys. + + NeoJSONObject new atPath: #(one two three) put: 42; yourself. + NeoJSONObject new atPath: #(one two three) put: 42; atPath: #(one two three). + \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/atPath..st b/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/atPath..st new file mode 100644 index 0000000..65d2520 --- /dev/null +++ b/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/atPath..st @@ -0,0 +1,10 @@ +accessing +atPath: keyCollection + "Use each key in keyCollection recursively, stop when nil is encountered" + + | value | + value := self. + keyCollection do: [ :each | + value := value at: each. + value ifNil: [ ^ nil ] ]. + ^ value \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/atPath.put..st b/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/atPath.put..st new file mode 100644 index 0000000..9c01d25 --- /dev/null +++ b/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/atPath.put..st @@ -0,0 +1,12 @@ +accessing +atPath: keyCollection put: newValue + "Use each key in keyCollection recursively, create new levels when needed" + + | target | + keyCollection ifEmpty: [ ^ self ]. + target := self. + keyCollection allButLastDo: [ :each | + (target at: each) + ifNil: [ target := target at: each put: target species new ] + ifNotNil: [ :subValue | target := subValue ] ]. + ^ target at: keyCollection last put: newValue \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/doesNotUnderstand..st b/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/doesNotUnderstand..st index 1308439..19f6e76 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/doesNotUnderstand..st +++ b/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/doesNotUnderstand..st @@ -1,12 +1,12 @@ reflective operations doesNotUnderstand: message "Overwritten so that 'self foo' becomes 'self at: #foo' - and 'self foo: 1' becomes 'self at: #foo put: 1'" + and 'self foo: 1' becomes 'self at: #foo put: 1' except that self is returned" | key | key := message selector. key isUnary ifTrue: [ ^ self at: key ]. ^ (key isKeyword and: [ key numArgs = 1 ]) - ifTrue: [ self at: key allButLast asSymbol put: message arguments first ] + ifTrue: [ self at: key allButLast asSymbol put: message arguments first; yourself ] ifFalse: [ super doesNotUnderstand: message ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/printOn..st b/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/printOn..st index df8cfa3..b48cac6 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/printOn..st +++ b/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/printOn..st @@ -1,5 +1,10 @@ printing printOn: stream "I use my JSON representation when printing myself" - - (NeoJSONWriter on: stream) nextPut: self \ No newline at end of file + + [ (NeoJSONWriter on: stream) nextPut: self ] + on: Error + do: [ :exception | + stream + nextPutAll: ' Error printing JSON: '; + nextPutAll: exception printString ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObject.class/methodProperties.json b/repository/Neo-JSON-Core.package/NeoJSONObject.class/methodProperties.json index 811f3fe..8fa5dc8 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONObject.class/methodProperties.json +++ b/repository/Neo-JSON-Core.package/NeoJSONObject.class/methodProperties.json @@ -1,9 +1,14 @@ { - "class" : { - "fromString:" : "SvenVanCaekenberghe 9/8/2014 13:33" }, "instance" : { + "atPath:put:" : "SvenVanCaekenberghe 4/26/2017 11:29", + "value" : "SvenVanCaekenberghe 9/8/2014 11:46", + "printOn:" : "marianopeck 1/31/2018 11:33", "at:" : "SvenVanCaekenberghe 9/8/2014 11:43", - "doesNotUnderstand:" : "SvenVanCaekenberghe 9/8/2014 12:32", - "name" : "SvenVanCaekenberghe 9/8/2014 11:46", - "printOn:" : "SvenVanCaekenberghe 9/8/2014 11:45", - "value" : "SvenVanCaekenberghe 9/8/2014 11:46" } } + "doesNotUnderstand:" : "SvenVanCaekenberghe 2/3/2017 14:29", + "atPath:" : "SvenVanCaekenberghe 4/26/2017 09:06", + "name" : "SvenVanCaekenberghe 9/8/2014 11:46" + }, + "class" : { + "fromString:" : "SvenVanCaekenberghe 9/8/2014 13:33" + } +} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObject.class/properties.json b/repository/Neo-JSON-Core.package/NeoJSONObject.class/properties.json index 75dcbe5..6400592 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONObject.class/properties.json +++ b/repository/Neo-JSON-Core.package/NeoJSONObject.class/properties.json @@ -1,14 +1,11 @@ { + "commentStamp" : "SvenVanCaekenberghe 4/26/2017 10:53", + "super" : "Dictionary", "category" : "Neo-JSON-Core", - "classinstvars" : [ - ], - "classvars" : [ - ], - "commentStamp" : "SvenVanCaekenberghe 9/8/2014 13:34", - "instvars" : [ - ], + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], "name" : "NeoJSONObject", - "pools" : [ - ], - "super" : "Dictionary", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/allowNil.st b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/allowNil.st index b6e59d1..58dca2b 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/allowNil.st +++ b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/allowNil.st @@ -1,3 +1,5 @@ initialize-release allowNil + "Set that I will allow nil/null values when I read/expect an object" + allowNil := true \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAccessors..st b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAccessors..st index c465b85..e9552cd 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAccessors..st +++ b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAccessors..st @@ -1,4 +1,3 @@ mapping mapAccessors: accessors - accessors do: [ :each | - self mapAccessor: each ] \ No newline at end of file + ^ accessors collect: [ :each | self mapAccessor: each ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAllInstVars.st b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAllInstVars.st index b54e25b..740548c 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAllInstVars.st +++ b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAllInstVars.st @@ -1,3 +1,3 @@ convenience mapAllInstVars - self mapInstVars: subjectClass allInstVarNames \ No newline at end of file + ^ self mapInstVars: subjectClass allInstVarNames \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVar.to..st b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVar.to..st index 00018cb..36ee121 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVar.to..st +++ b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVar.to..st @@ -1,10 +1,15 @@ mapping mapInstVar: instVarName to: propertyName | index | - index := subjectClass - instVarIndexFor: instVarName - ifAbsent: [ self error: 'Inst var not found: ', instVarName printString ]. + index := + "For portability reasons, do not use instVarIndexFor:ifAbsent: + (it doesn't exist in all Smalltalk dialects) but the below approach. + Also, convert to symbols for portability reasons" + (subjectClass allInstVarNames collect: [ :each | each asSymbol ]) + indexOf: instVarName asSymbol + ifAbsent: [ self error: 'Inst var not found: ', instVarName printString ]. ^ self - mapProperty: propertyName + mapProperty: propertyName asString getter: [ :object | object instVarAt: index ] - setter: [ :object :value | object instVarAt: index put: value ] \ No newline at end of file + setter: [ :object :value | object instVarAt: index put: value ] + diff --git a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVars..st b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVars..st index f098c59..240320e 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVars..st +++ b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVars..st @@ -1,4 +1,3 @@ mapping mapInstVars: instVarNames - instVarNames do: [ :each | - self mapInstVar: each ] \ No newline at end of file + ^ instVarNames collect: [ :each | self mapInstVar: each ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVars.st b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVars.st index afc5979..c7296cb 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVars.st +++ b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVars.st @@ -1,3 +1,3 @@ convenience mapInstVars - self mapInstVars: subjectClass instVarNames \ No newline at end of file + ^ self mapInstVars: subjectClass instVarNames \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapProperty.getter.setter..st b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapProperty.getter.setter..st index 0674e13..88161b6 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapProperty.getter.setter..st +++ b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapProperty.getter.setter..st @@ -6,6 +6,6 @@ mapProperty: propertyName getter: readBlock setter: writeBlock propertyName: propertyName; getter: readBlock; setter: writeBlock. - properties removeAllSuchThat: [ :each | each propertyName = propertyName ]. + properties removeAllSuchThat: [ :each | each propertyName = propertyMapping propertyName ]. properties addLast: propertyMapping. ^ propertyMapping \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/propertyNamed.ifAbsent..st b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/propertyNamed.ifAbsent..st index 242dceb..975f27a 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/propertyNamed.ifAbsent..st +++ b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/propertyNamed.ifAbsent..st @@ -1,3 +1,5 @@ accessing propertyNamed: propertyName ifAbsent: block - ^ properties detect: [ :each | each propertyName = propertyName ] ifNone: block \ No newline at end of file + | symbolPropertyName | + symbolPropertyName := propertyName asSymbol. + ^ properties detect: [ :each | each propertyName = symbolPropertyName ] ifNone: block \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/methodProperties.json b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/methodProperties.json index abe87b8..c5f0be9 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/methodProperties.json +++ b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/methodProperties.json @@ -1,21 +1,22 @@ { - "class" : { - }, "instance" : { - "allowNil" : "SvenVanCaekenberghe 12/30/2015 11:44", - "identifier" : "SvenVanCaekenberghe 3/23/2014 19:25", - "initialize" : "SvenVanCaekenberghe 7/11/2016 10:54", - "mapAccessor:" : "SvenVanCaekenberghe 6/12/2012 13:13", - "mapAccessor:mutator:to:" : "SvenVanCaekenberghe 6/12/2012 13:12", - "mapAccessor:to:" : "SvenVanCaekenberghe 6/12/2012 13:13", - "mapAccessors:" : "SvenVanCaekenberghe 6/12/2012 13:14", - "mapAllInstVars" : "SvenVanCaekenberghe 6/6/2012 16:00", + "propertyNamed:ifAbsent:" : "SvenVanCaekenberghe 2/6/2018 17:31", "mapInstVar:" : "SvenVanCaekenberghe 6/9/2012 18:37", - "mapInstVar:to:" : "SvenVanCaekenberghe 6/9/2012 18:36", - "mapInstVars" : "SvenVanCaekenberghe 6/6/2012 15:59", - "mapInstVars:" : "SvenVanCaekenberghe 6/6/2012 16:00", - "mapProperty:getter:setter:" : "SvenVanCaekenberghe 7/11/2016 11:01", - "propertyNamed:ifAbsent:" : "SvenVanCaekenberghe 7/11/2016 10:58", + "mapInstVars:" : "SvenVanCaekenberghe 7/6/2017 09:55", + "mapAccessor:" : "SvenVanCaekenberghe 6/12/2012 13:13", + "allowNil" : "SvenVanCaekenberghe 11/13/2017 18:40", "readFrom:" : "SvenVanCaekenberghe 12/30/2015 11:48", + "writeObject:on:" : "SvenVanCaekenberghe 7/11/2016 10:54", + "mapAccessors:" : "SvenVanCaekenberghe 7/6/2017 09:55", + "identifier" : "SvenVanCaekenberghe 3/23/2014 19:25", + "initialize" : "SvenVanCaekenberghe 7/11/2016 10:54", + "mapAllInstVars" : "SvenVanCaekenberghe 7/6/2017 09:55", + "mapInstVars" : "SvenVanCaekenberghe 7/6/2017 09:55", "subjectClass:" : "SvenVanCaekenberghe 6/6/2012 15:32", - "writeObject:on:" : "SvenVanCaekenberghe 7/11/2016 10:54" } } + "mapProperty:getter:setter:" : "SvenVanCaekenberghe 2/6/2018 17:28", + "mapInstVar:to:" : "SvenVanCaekenberghe 2/6/2018 17:30", + "mapAccessor:mutator:to:" : "SvenVanCaekenberghe 6/12/2012 13:12", + "mapAccessor:to:" : "SvenVanCaekenberghe 6/12/2012 13:13" + }, + "class" : { } +} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/properties.json b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/properties.json index 7f6beda..bc5f668 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/properties.json +++ b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/properties.json @@ -1,16 +1,15 @@ { - "category" : "Neo-JSON-Core", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "", + "super" : "NeoJSONMapping", + "category" : "Neo-JSON-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ "subjectClass", "properties", - "allowNil" ], + "allowNil" + ], "name" : "NeoJSONObjectMapping", - "pools" : [ - ], - "super" : "NeoJSONMapping", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONParseError.class/methodProperties.json b/repository/Neo-JSON-Core.package/NeoJSONParseError.class/methodProperties.json index 0e4a662..d158391 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONParseError.class/methodProperties.json +++ b/repository/Neo-JSON-Core.package/NeoJSONParseError.class/methodProperties.json @@ -1,5 +1,4 @@ { - "class" : { - }, - "instance" : { - } } + "instance" : { }, + "class" : { } +} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONParseError.class/properties.json b/repository/Neo-JSON-Core.package/NeoJSONParseError.class/properties.json index 08bfd8d..94c249b 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONParseError.class/properties.json +++ b/repository/Neo-JSON-Core.package/NeoJSONParseError.class/properties.json @@ -1,14 +1,11 @@ { - "category" : "Neo-JSON-Core", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "", - "instvars" : [ - ], - "name" : "NeoJSONParseError", - "pools" : [ - ], "super" : "Error", - "type" : "normal" } + "category" : "Neo-JSON-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "NeoJSONParseError", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/propertyName..st b/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/propertyName..st index 91f9ff5..7b044f7 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/propertyName..st +++ b/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/propertyName..st @@ -1,3 +1,3 @@ accessing -propertyName: string - propertyName := string \ No newline at end of file +propertyName: symbolOrString + propertyName := symbolOrString asSymbol \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/methodProperties.json b/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/methodProperties.json index 417cca5..8ce6b72 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/methodProperties.json +++ b/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/methodProperties.json @@ -1,12 +1,13 @@ { - "class" : { - }, "instance" : { - "getter:" : "SvenVanCaekenberghe 6/6/2012 15:34", - "printOn:" : "SvenVanCaekenberghe 7/4/2013 19:07", - "propertyName" : "SvenVanCaekenberghe 7/11/2016 10:59", - "propertyName:" : "SvenVanCaekenberghe 6/6/2012 15:34", - "readObject:from:" : "SvenVanCaekenberghe 6/8/2012 17:04", "setter:" : "SvenVanCaekenberghe 6/6/2012 15:34", "valueSchema:" : "SvenVanCaekenberghe 6/8/2012 17:01", - "writeObject:on:" : "SvenVanCaekenberghe 5/28/2014 20:46" } } + "printOn:" : "SvenVanCaekenberghe 7/4/2013 19:07", + "writeObject:on:" : "SvenVanCaekenberghe 5/28/2014 20:46", + "getter:" : "SvenVanCaekenberghe 6/6/2012 15:34", + "readObject:from:" : "SvenVanCaekenberghe 6/8/2012 17:04", + "propertyName:" : "SvenVanCaekenberghe 2/6/2018 17:26", + "propertyName" : "SvenVanCaekenberghe 7/11/2016 10:59" + }, + "class" : { } +} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/properties.json b/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/properties.json index 6af8544..c0e543e 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/properties.json +++ b/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/properties.json @@ -1,17 +1,16 @@ { - "category" : "Neo-JSON-Core", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "", + "super" : "Object", + "category" : "Neo-JSON-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ "propertyName", "valueSchema", "getter", - "setter" ], + "setter" + ], "name" : "NeoJSONPropertyMapping", - "pools" : [ - ], - "super" : "Object", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/failIfNotAtEnd.st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/failIfNotAtEnd.st new file mode 100644 index 0000000..2db27e9 --- /dev/null +++ b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/failIfNotAtEnd.st @@ -0,0 +1,4 @@ +parsing +failIfNotAtEnd + self atEnd + ifFalse: [ self error: 'extraneous input detected' ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacter.st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacter.st index 5aff6a9..b71f65f 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacter.st +++ b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacter.st @@ -9,4 +9,6 @@ parseCharacter ifTrue: [ ^ self unescapeChar: char ]. char = $u ifTrue: [ ^ self parseCharacterHex ]. - self error: 'invalid escape character \' , (String with: char) \ No newline at end of file + char + ifNil: [ self error: 'invalid escape, end of file' ] + ifNotNil: [ self error: 'invalid escape character \' , char asString ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseListDo..st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseListDo..st index f5593b7..4eb0a50 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseListDo..st +++ b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseListDo..st @@ -8,5 +8,6 @@ parseListDo: block block value. (self matchChar: $]) ifTrue: [ ^ self ]. - self expectChar: $, ]. - self error: 'end of list expected' \ No newline at end of file + (self matchChar: $,) + ifFalse: [ self error: ', or ] expected' ] ]. + self error: 'incomplete list' \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseMapDo..st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseMapDo..st index a95eb50..df2fdf2 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseMapDo..st +++ b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseMapDo..st @@ -7,5 +7,6 @@ parseMapDo: block block value. (self matchChar: $}) ifTrue: [ ^ self ]. - self expectChar: $, ]. - self error: 'end of map expected' \ No newline at end of file + (self matchChar: $,) + ifFalse: [ self error: ', or } expected' ] ]. + self error: 'incomplete map' \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseNumberExponent.st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseNumberExponent.st index 8df2f4c..e5a310a 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseNumberExponent.st +++ b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseNumberExponent.st @@ -4,8 +4,13 @@ parseNumberExponent number := 0. (negated := readStream peekFor: $-) ifFalse: [ readStream peekFor: $+ ]. + (readStream atEnd or: [ readStream peek isDigit not ]) + ifTrue: [ self error: 'number exponent expected' ]. [ readStream atEnd not and: [ readStream peek isDigit ] ] whileTrue: [ number := 10 * number + readStream next digitValue ]. negated ifTrue: [ number := number negated ]. + number positive + ifTrue: [ number > Float emax ifTrue: [ self error: 'number exponent too large' ] ] + ifFalse: [ number < Float emin ifTrue: [ self error: 'number exponent too small' ] ]. ^ 10 raisedTo: number \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseString.st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseString.st index 5bde180..ea36a0f 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseString.st +++ b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseString.st @@ -1,10 +1,10 @@ parsing parseString | result | - self expectChar: $". - result := self stringStreamContents: [ :stream | - [ readStream atEnd or: [ readStream peek = $"] ] - whileFalse: [ - stream nextPut: self parseCharacter ] ]. + (readStream peekFor: $") + ifFalse: [ self error: '" expected' ]. + result := self stringStreamContents: [ :stream | + [ readStream atEnd or: [ readStream peek = $" ] ] + whileFalse: [ stream nextPut: self parseCharacter ] ]. self expectChar: $". ^ result \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/methodProperties.json b/repository/Neo-JSON-Core.package/NeoJSONReader.class/methodProperties.json index 2ce8a27..bb6cde8 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/methodProperties.json +++ b/repository/Neo-JSON-Core.package/NeoJSONReader.class/methodProperties.json @@ -1,45 +1,49 @@ { - "class" : { - "fromString:" : "SvenVanCaekenberghe 6/9/2012 18:26", - "fromString:as:" : "SvenVanCaekenberghe 6/9/2012 18:30", - "on:" : "SvenVanCaekenberghe 6/13/2012 16:10" }, "instance" : { - "atEnd" : "SvenVanCaekenberghe 3/6/2013 14:46", - "close" : "SvenVanCaekenberghe 6/2/2012 13:50", - "consumeWhitespace" : "SvenVanCaekenberghe 6/2/2012 21:26", "error:" : "SvenVanCaekenberghe 6/12/2012 15:54", - "expectChar:" : "SvenVanCaekenberghe 6/2/2012 14:01", - "initialize" : "SvenVanCaekenberghe 6/13/2012 09:39", - "listClass" : "SvenVanCaekenberghe 6/13/2012 09:37", - "listClass:" : "SvenVanCaekenberghe 6/13/2012 09:38", - "mapClass" : "SvenVanCaekenberghe 6/13/2012 09:37", - "mapClass:" : "SvenVanCaekenberghe 6/13/2012 09:38", - "match:do:" : "SvenVanCaekenberghe 12/3/2012 10:57", - "matchChar:" : "SvenVanCaekenberghe 12/3/2012 10:51", - "next" : "SvenVanCaekenberghe 6/7/2012 16:56", - "nextAs:" : "SvenVanCaekenberghe 3/16/2016 11:21", + "parseNumberFraction" : "SvenVanCaekenberghe 6/2/2012 14:00", + "parseValue" : "SvenVanCaekenberghe 6/12/2012 15:56", "nextListAs:" : "SvenVanCaekenberghe 3/16/2016 10:58", - "on:" : "SvenVanCaekenberghe 6/13/2012 16:10", - "parseCharacter" : "SvenVanCaekenberghe 6/7/2012 16:59", - "parseCharacterHex" : "SvenVanCaekenberghe 2/24/2016 14:48", - "parseCharacterHex4Value" : "SvenVanCaekenberghe 2/24/2016 14:41", - "parseCharacterHexDigit" : "SvenVanCaekenberghe 6/2/2012 14:21", "parseConstantDo:" : "SvenVanCaekenberghe 6/2/2012 14:16", - "parseList" : "SvenVanCaekenberghe 6/7/2012 17:17", - "parseListDo:" : "SvenVanCaekenberghe 6/7/2012 17:15", + "consumeWhitespace" : "SvenVanCaekenberghe 6/2/2012 21:26", + "mapClass:" : "SvenVanCaekenberghe 6/13/2012 09:38", "parseListElementsDo:" : "SvenVanCaekenberghe 6/7/2012 17:16", - "parseMap" : "SvenVanCaekenberghe 6/7/2012 17:23", - "parseMapDo:" : "SvenVanCaekenberghe 6/7/2012 17:23", - "parseMapKeysAndValuesDo:" : "SvenVanCaekenberghe 6/7/2012 17:22", + "stringStreamContents:" : "SvenVanCaekenberghe 6/7/2012 16:54", + "parseCharacterHexDigit" : "SvenVanCaekenberghe 6/2/2012 14:21", + "listClass:" : "SvenVanCaekenberghe 6/13/2012 09:38", + "failIfNotAtEnd" : "SvenVanCaekenberghe 5/29/2017 09:38", "parseMapKeysDo:" : "SvenVanCaekenberghe 6/7/2012 17:23", "parseNumber" : "SvenVanCaekenberghe 12/3/2012 11:08", - "parseNumberExponent" : "SvenVanCaekenberghe 12/3/2012 11:08", - "parseNumberFraction" : "SvenVanCaekenberghe 6/2/2012 14:00", + "unescapeChar:" : "SvenVanCaekenberghe 6/7/2012 16:55", + "parseListDo:" : "SvenVanCaekenberghe 5/29/2017 10:56", + "parseCharacter" : "SvenVanCaekenberghe 5/29/2017 10:25", + "parseMapDo:" : "SvenVanCaekenberghe 5/29/2017 10:56", + "listClass" : "SvenVanCaekenberghe 6/13/2012 09:37", + "propertyNamesAsSymbols:" : "SvenVanCaekenberghe 6/13/2012 09:39", + "initialize" : "SvenVanCaekenberghe 6/13/2012 09:39", + "parseList" : "SvenVanCaekenberghe 6/7/2012 17:17", + "mapClass" : "SvenVanCaekenberghe 6/13/2012 09:37", "parseNumberInteger" : "SvenVanCaekenberghe 6/12/2012 16:15", + "matchChar:" : "SvenVanCaekenberghe 12/3/2012 10:51", + "on:" : "SvenVanCaekenberghe 6/13/2012 16:10", + "atEnd" : "SvenVanCaekenberghe 3/6/2013 14:46", + "parseNumberExponent" : "SvenVanCaekenberghe 5/29/2017 09:45", + "nextAs:" : "SvenVanCaekenberghe 3/16/2016 11:21", + "expectChar:" : "SvenVanCaekenberghe 6/2/2012 14:01", + "match:do:" : "SvenVanCaekenberghe 12/3/2012 10:57", "parsePropertyName" : "SvenVanCaekenberghe 6/13/2012 09:40", - "parseString" : "SvenVanCaekenberghe 6/2/2012 13:58", - "parseTrailingSurrogateHexEscape" : "SvenVanCaekenberghe 2/24/2016 14:49", - "parseValue" : "SvenVanCaekenberghe 6/12/2012 15:56", - "propertyNamesAsSymbols:" : "SvenVanCaekenberghe 6/13/2012 09:39", - "stringStreamContents:" : "SvenVanCaekenberghe 6/7/2012 16:54", - "unescapeChar:" : "SvenVanCaekenberghe 6/7/2012 16:55" } } + "parseString" : "SvenVanCaekenberghe 3/10/2017 13:51", + "next" : "SvenVanCaekenberghe 6/7/2012 16:56", + "parseMapKeysAndValuesDo:" : "SvenVanCaekenberghe 6/7/2012 17:22", + "parseMap" : "SvenVanCaekenberghe 6/7/2012 17:23", + "parseCharacterHex4Value" : "SvenVanCaekenberghe 2/24/2016 14:41", + "close" : "SvenVanCaekenberghe 6/2/2012 13:50", + "parseCharacterHex" : "SvenVanCaekenberghe 2/24/2016 14:48", + "parseTrailingSurrogateHexEscape" : "SvenVanCaekenberghe 2/24/2016 14:49" + }, + "class" : { + "fromString:as:" : "SvenVanCaekenberghe 6/9/2012 18:30", + "fromString:" : "SvenVanCaekenberghe 6/9/2012 18:26", + "on:" : "SvenVanCaekenberghe 6/13/2012 16:10" + } +} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/properties.json b/repository/Neo-JSON-Core.package/NeoJSONReader.class/properties.json index e32ffd6..eef6e54 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/properties.json +++ b/repository/Neo-JSON-Core.package/NeoJSONReader.class/properties.json @@ -1,18 +1,17 @@ { - "category" : "Neo-JSON-Core", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "SvenVanCaekenberghe 3/16/2016 11:23", + "super" : "NeoJSONMapper", + "category" : "Neo-JSON-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ "readStream", "stringStream", "listClass", "mapClass", - "propertyNamesAsSymbols" ], + "propertyNamesAsSymbols" + ], "name" : "NeoJSONReader", - "pools" : [ - ], - "super" : "NeoJSONMapper", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeElement.as..st b/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeElement.as..st new file mode 100644 index 0000000..e3c7106 --- /dev/null +++ b/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeElement.as..st @@ -0,0 +1,9 @@ +writing +writeElement: value as: valueSchema + first + ifTrue: [ + jsonWriter newlineIndent. + first := false ] + ifFalse: [ + jsonWriter listElementSeparator ]. + jsonWriter nextPut: value as: valueSchema \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/methodProperties.json b/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/methodProperties.json index 2b433d9..2f819d8 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/methodProperties.json +++ b/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/methodProperties.json @@ -1,11 +1,15 @@ { - "class" : { - "on:" : "SvenVanCaekenberghe 6/6/2012 15:05" }, "instance" : { - "initialize" : "SvenVanCaekenberghe 6/6/2012 14:48", "on:" : "SvenVanCaekenberghe 6/6/2012 14:49", + "writeKey:value:as:" : "SvenVanCaekenberghe 3/23/2014 21:53", "wasUsed" : "SvenVanCaekenberghe 6/6/2012 15:00", + "initialize" : "SvenVanCaekenberghe 6/6/2012 14:48", + "writeNil" : "SvenVanCaekenberghe 5/28/2014 20:45", "writeElement:" : "SvenVanCaekenberghe 6/6/2012 15:15", - "writeKey:value:" : "SvenVanCaekenberghe 6/6/2012 15:01", - "writeKey:value:as:" : "SvenVanCaekenberghe 3/23/2014 21:53", - "writeNil" : "SvenVanCaekenberghe 5/28/2014 20:45" } } + "writeElement:as:" : "SvenVanCaekenberghe 9/22/2017 14:38", + "writeKey:value:" : "SvenVanCaekenberghe 6/6/2012 15:01" + }, + "class" : { + "on:" : "SvenVanCaekenberghe 6/6/2012 15:05" + } +} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/properties.json b/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/properties.json index 21df003..8f93742 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/properties.json +++ b/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/properties.json @@ -1,15 +1,14 @@ { - "category" : "Neo-JSON-Core", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "", + "super" : "Object", + "category" : "Neo-JSON-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ "jsonWriter", - "first" ], + "first" + ], "name" : "NeoJSONStreamingWriter", - "pools" : [ - ], - "super" : "Object", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/asciiOnly..st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/asciiOnly..st index 8ad846e..14b2730 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/asciiOnly..st +++ b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/asciiOnly..st @@ -1,3 +1,5 @@ initialize-release asciiOnly: boolean + "Set whether I should escape all non ASCII characters or not" + asciiOnly := boolean \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/close.st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/close.st index 2754652..73b1b7d 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/close.st +++ b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/close.st @@ -1,5 +1,7 @@ initialize-release close + "Close the stream that I write to" + writeStream ifNotNil: [ writeStream close. writeStream := nil ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/escapeUnicode..st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/escapeUnicode..st index 37e598b..702458f 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/escapeUnicode..st +++ b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/escapeUnicode..st @@ -1,6 +1,6 @@ private escapeUnicode: codePoint - codePoint <= 16rFFF + codePoint <= 16rFFFF ifTrue: [ self escapeUnicode4: codePoint ] ifFalse: [ codePoint <= 16r10FFFF diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/initialize.st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/initialize.st index aa1c0c6..f6b84a0 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/initialize.st +++ b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/initialize.st @@ -1,7 +1,8 @@ initialize-release initialize super initialize. - self newLine: String cr. + "For portability reasons use `Character cr asString` rather than `String cr`" + self newLine: Character cr asString. self prettyPrint: false. self asciiOnly: false. self writeNil: false. diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/newLine..st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/newLine..st index 5c734ed..16be4fb 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/newLine..st +++ b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/newLine..st @@ -1,3 +1,5 @@ initialize-release newLine: string + "Set the newline string that I should use when pretty printing" + newLine := string \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/nextPut..st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/nextPut..st index 0fc2fc0..3bee296 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/nextPut..st +++ b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/nextPut..st @@ -1,3 +1,5 @@ accessing nextPut: anObject + "Primary interface. Write a JSON representation of anObject to my stream." + anObject neoJsonOn: self \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/nextPut.as..st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/nextPut.as..st index c7e698d..e13f80c 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/nextPut.as..st +++ b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/nextPut.as..st @@ -4,6 +4,6 @@ nextPut: anObject as: schema Write objects according to schema." | mapping | - schema ifNil: [ ^ self nextPut: anObject ]. + (schema isNil or: [ anObject isNil ]) ifTrue: [ ^ self nextPut: anObject ]. mapping := self mappingFor: schema. ^ mapping writeObject: anObject on: self \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/prettyPrint..st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/prettyPrint..st index 413ae6e..4f00d06 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/prettyPrint..st +++ b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/prettyPrint..st @@ -1,3 +1,5 @@ initialize-release prettyPrint: boolean + "Set whether I should pretty print the JSON that I write" + prettyPrint := boolean \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeNil..st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeNil..st index cde89ff..c51986c 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeNil..st +++ b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeNil..st @@ -1,3 +1,5 @@ initialize-release writeNil: boolean + "Set whether I will write nil/null properties of objects or skip them." + writeNil := boolean \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeNil.st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeNil.st index 8feb602..f6d78d5 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeNil.st +++ b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeNil.st @@ -1,3 +1,5 @@ accessing writeNil + "Return whether I will write nil/null properties of objects or skip them." + ^ writeNil \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeString..st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeString..st index 9b56502..e2107ed 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeString..st +++ b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeString..st @@ -1,6 +1,6 @@ writing writeString: string writeStream nextPut: $". - string do: [ :each | - self encodeChar: each ]. + 1 to: string size do: [ :index | + self encodeChar: (string at: index) ]. writeStream nextPut: $" \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/methodProperties.json b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/methodProperties.json index 33d9372..5c2ef92 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/methodProperties.json +++ b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/methodProperties.json @@ -1,40 +1,43 @@ { - "class" : { - "on:" : "SvenVanCaekenberghe 6/14/2012 09:54", - "toString:" : "SvenVanCaekenberghe 6/9/2012 18:27", - "toStringPretty:" : "SvenVanCaekenberghe 6/9/2012 18:28" }, "instance" : { - "asciiOnly:" : "SvenVanCaekenberghe 9/3/2013 12:00", - "close" : "SvenVanCaekenberghe 6/2/2012 22:06", + "close" : "SvenVanCaekenberghe 11/13/2017 18:37", + "writeStreamingDo:" : "SvenVanCaekenberghe 6/6/2012 15:19", + "initialize" : "marianopeck 1/30/2018 12:49", + "newlineIndent" : "SvenVanCaekenberghe 4/17/2014 11:55", "doesCodePointNeedEscaping:" : "SvenVanCaekenberghe 9/3/2013 11:58", + "writeList:" : "SvenVanCaekenberghe 6/6/2012 15:20", + "mapElementSeparator" : "SvenVanCaekenberghe 6/3/2012 19:32", + "newline" : "SvenVanCaekenberghe 4/17/2014 11:58", + "prettyPrint:" : "SvenVanCaekenberghe 11/13/2017 18:38", + "newLine:" : "SvenVanCaekenberghe 11/13/2017 18:38", + "writeFloat:" : "SvenVanCaekenberghe 6/2/2012 22:19", "encodeChar:" : "SvenVanCaekenberghe 9/3/2013 11:55", + "writeMap:" : "SvenVanCaekenberghe 6/6/2012 15:04", + "writeNil" : "SvenVanCaekenberghe 11/13/2017 18:35", + "prettyPrintSpace" : "SvenVanCaekenberghe 12/10/2012 16:33", + "escapeUnicode4:" : "SvenVanCaekenberghe 2/24/2016 14:29", "encodeKey:value:" : "SvenVanCaekenberghe 6/3/2012 19:41", - "encodeKey:value:as:" : "SvenVanCaekenberghe 3/23/2014 21:53", + "writeListStreamingDo:" : "SvenVanCaekenberghe 6/6/2012 15:19", + "escapeUnicode:" : "SvenVanCaekenberghe 11/24/2016 10:06", + "writeNull" : "SvenVanCaekenberghe 6/2/2012 22:15", "escapeChar:" : "SvenVanCaekenberghe 2/24/2016 14:17", - "escapeUnicode4:" : "SvenVanCaekenberghe 2/24/2016 14:29", - "escapeUnicode:" : "SvenVanCaekenberghe 2/24/2016 14:48", - "indentedDo:" : "SvenVanCaekenberghe 6/3/2012 19:31", - "initialize" : "SvenVanCaekenberghe 5/28/2014 20:43", + "asciiOnly:" : "SvenVanCaekenberghe 11/13/2017 18:37", "listElementSeparator" : "SvenVanCaekenberghe 6/3/2012 19:32", - "mapElementSeparator" : "SvenVanCaekenberghe 6/3/2012 19:32", - "newLine:" : "SvenVanCaekenberghe 12/10/2012 16:27", - "newline" : "SvenVanCaekenberghe 4/17/2014 11:58", - "newlineIndent" : "SvenVanCaekenberghe 4/17/2014 11:55", - "nextPut:" : "SvenVanCaekenberghe 6/2/2012 22:11", - "nextPut:as:" : "SvenVanCaekenberghe 3/23/2014 21:57", + "writeMapStreamingDo:" : "SvenVanCaekenberghe 6/6/2012 15:19", + "writeNil:" : "SvenVanCaekenberghe 11/13/2017 18:39", + "writeString:" : "MaxLeske 4/30/2017 13:40", + "writeInteger:" : "SvenVanCaekenberghe 6/2/2012 22:18", "on:" : "SvenVanCaekenberghe 6/14/2012 09:54", - "prettyPrint:" : "SvenVanCaekenberghe 6/2/2012 22:06", - "prettyPrintSpace" : "SvenVanCaekenberghe 12/10/2012 16:33", + "nextPut:" : "SvenVanCaekenberghe 11/13/2017 18:34", + "indentedDo:" : "SvenVanCaekenberghe 6/3/2012 19:31", "writeBoolean:" : "SvenVanCaekenberghe 6/2/2012 22:18", - "writeFloat:" : "SvenVanCaekenberghe 6/2/2012 22:19", - "writeInteger:" : "SvenVanCaekenberghe 6/2/2012 22:18", - "writeList:" : "SvenVanCaekenberghe 6/6/2012 15:20", - "writeListStreamingDo:" : "SvenVanCaekenberghe 6/6/2012 15:19", - "writeMap:" : "SvenVanCaekenberghe 6/6/2012 15:04", - "writeMapStreamingDo:" : "SvenVanCaekenberghe 6/6/2012 15:19", - "writeNil" : "SvenVanCaekenberghe 5/28/2014 20:44", - "writeNil:" : "SvenVanCaekenberghe 5/28/2014 20:43", - "writeNull" : "SvenVanCaekenberghe 6/2/2012 22:15", "writeObject:" : "SvenVanCaekenberghe 6/7/2012 15:55", - "writeStreamingDo:" : "SvenVanCaekenberghe 6/6/2012 15:19", - "writeString:" : "SvenVanCaekenberghe 6/3/2012 19:42" } } + "encodeKey:value:as:" : "SvenVanCaekenberghe 3/23/2014 21:53", + "nextPut:as:" : "SvenVanCaekenberghe 11/13/2017 18:30" + }, + "class" : { + "toString:" : "SvenVanCaekenberghe 6/9/2012 18:27", + "on:" : "SvenVanCaekenberghe 6/14/2012 09:54", + "toStringPretty:" : "SvenVanCaekenberghe 6/9/2012 18:28" + } +} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/properties.json b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/properties.json index 5e1d475..8607a8e 100644 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/properties.json +++ b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/properties.json @@ -1,19 +1,18 @@ { - "category" : "Neo-JSON-Core", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "", + "super" : "NeoJSONMapper", + "category" : "Neo-JSON-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ "writeStream", "prettyPrint", "level", "newLine", "asciiOnly", - "writeNil" ], + "writeNil" + ], "name" : "NeoJSONWriter", - "pools" : [ - ], - "super" : "NeoJSONMapper", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/Number.extension/methodProperties.json b/repository/Neo-JSON-Core.package/Number.extension/methodProperties.json index b55faec..d597374 100644 --- a/repository/Neo-JSON-Core.package/Number.extension/methodProperties.json +++ b/repository/Neo-JSON-Core.package/Number.extension/methodProperties.json @@ -1,5 +1,6 @@ { - "class" : { - }, "instance" : { - "neoJsonOn:" : "SvenVanCaekenberghe 6/2/2012 22:17" } } + "neoJsonOn:" : "SvenVanCaekenberghe 6/2/2012 22:17" + }, + "class" : { } +} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/Number.extension/properties.json b/repository/Neo-JSON-Core.package/Number.extension/properties.json index 1d2c94d..71dace8 100644 --- a/repository/Neo-JSON-Core.package/Number.extension/properties.json +++ b/repository/Neo-JSON-Core.package/Number.extension/properties.json @@ -1,2 +1,3 @@ { - "name" : "Number" } + "name" : "Number" +} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/Object.extension/methodProperties.json b/repository/Neo-JSON-Core.package/Object.extension/methodProperties.json index 2a386f5..b08a45e 100644 --- a/repository/Neo-JSON-Core.package/Object.extension/methodProperties.json +++ b/repository/Neo-JSON-Core.package/Object.extension/methodProperties.json @@ -1,5 +1,6 @@ { - "class" : { - }, "instance" : { - "neoJsonOn:" : "SvenVanCaekenberghe 6/5/2012 22:29" } } + "neoJsonOn:" : "SvenVanCaekenberghe 6/5/2012 22:29" + }, + "class" : { } +} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/Object.extension/properties.json b/repository/Neo-JSON-Core.package/Object.extension/properties.json index 3d3b9ec..f30a86e 100644 --- a/repository/Neo-JSON-Core.package/Object.extension/properties.json +++ b/repository/Neo-JSON-Core.package/Object.extension/properties.json @@ -1,2 +1,3 @@ { - "name" : "Object" } + "name" : "Object" +} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/OrderedDictionary.extension/methodProperties.json b/repository/Neo-JSON-Core.package/OrderedDictionary.extension/methodProperties.json deleted file mode 100644 index 882c3bf..0000000 --- a/repository/Neo-JSON-Core.package/OrderedDictionary.extension/methodProperties.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "neoJsonOn:" : "SvenVanCaekenberghe 8/26/2015 12:03" } } diff --git a/repository/Neo-JSON-Core.package/OrderedDictionary.extension/properties.json b/repository/Neo-JSON-Core.package/OrderedDictionary.extension/properties.json deleted file mode 100644 index 63f7607..0000000 --- a/repository/Neo-JSON-Core.package/OrderedDictionary.extension/properties.json +++ /dev/null @@ -1,2 +0,0 @@ -{ - "name" : "OrderedDictionary" } diff --git a/repository/Neo-JSON-Core.package/SmallDictionary.extension/methodProperties.json b/repository/Neo-JSON-Core.package/SmallDictionary.extension/methodProperties.json deleted file mode 100644 index 28999eb..0000000 --- a/repository/Neo-JSON-Core.package/SmallDictionary.extension/methodProperties.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "neoJsonOn:" : "SvenVanCaekenberghe 6/3/2012 19:30" } } diff --git a/repository/Neo-JSON-Core.package/SmallDictionary.extension/properties.json b/repository/Neo-JSON-Core.package/SmallDictionary.extension/properties.json deleted file mode 100644 index 82b9f93..0000000 --- a/repository/Neo-JSON-Core.package/SmallDictionary.extension/properties.json +++ /dev/null @@ -1,2 +0,0 @@ -{ - "name" : "SmallDictionary" } diff --git a/repository/Neo-JSON-Core.package/String.extension/methodProperties.json b/repository/Neo-JSON-Core.package/String.extension/methodProperties.json index 3d4dab5..2cc7a54 100644 --- a/repository/Neo-JSON-Core.package/String.extension/methodProperties.json +++ b/repository/Neo-JSON-Core.package/String.extension/methodProperties.json @@ -1,5 +1,6 @@ { - "class" : { - }, "instance" : { - "neoJsonOn:" : "SvenVanCaekenberghe 6/2/2012 22:26" } } + "neoJsonOn:" : "SvenVanCaekenberghe 6/2/2012 22:26" + }, + "class" : { } +} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/String.extension/properties.json b/repository/Neo-JSON-Core.package/String.extension/properties.json index c213850..b20f2de 100644 --- a/repository/Neo-JSON-Core.package/String.extension/properties.json +++ b/repository/Neo-JSON-Core.package/String.extension/properties.json @@ -1,2 +1,3 @@ { - "name" : "String" } + "name" : "String" +} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/UndefinedObject.extension/methodProperties.json b/repository/Neo-JSON-Core.package/UndefinedObject.extension/methodProperties.json index a894ee8..df8767c 100644 --- a/repository/Neo-JSON-Core.package/UndefinedObject.extension/methodProperties.json +++ b/repository/Neo-JSON-Core.package/UndefinedObject.extension/methodProperties.json @@ -1,5 +1,6 @@ { - "class" : { - }, "instance" : { - "neoJsonOn:" : "SvenVanCaekenberghe 6/2/2012 22:15" } } + "neoJsonOn:" : "SvenVanCaekenberghe 6/2/2012 22:15" + }, + "class" : { } +} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/UndefinedObject.extension/properties.json b/repository/Neo-JSON-Core.package/UndefinedObject.extension/properties.json index 508a24a..b2d2e56 100644 --- a/repository/Neo-JSON-Core.package/UndefinedObject.extension/properties.json +++ b/repository/Neo-JSON-Core.package/UndefinedObject.extension/properties.json @@ -1,2 +1,3 @@ { - "name" : "UndefinedObject" } + "name" : "UndefinedObject" +} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/monticello.meta/version b/repository/Neo-JSON-Core.package/monticello.meta/version index 7098ba4..6439520 100644 --- a/repository/Neo-JSON-Core.package/monticello.meta/version +++ b/repository/Neo-JSON-Core.package/monticello.meta/version @@ -1 +1 @@ -(name 'Neo-JSON-Core-SvenVanCaekenberghe.36' message 'Use an OrderedCollection instead of a some Dictionary to store the properties inside a NeoJSONObjectMapping ' id 'aab6c89f-0fbc-4f3c-8aa9-4da1c71f72b2' date '11 July 2016' time '11:03:30.192353 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.35' message 'Add NeoJSONObjectMapping>>#dictionaryForProperties with hack to cover more Pharo versions' id 'a137c050-87c4-4d1c-89c3-d558cfe78ff5' date '11 July 2016' time '10:23:25.017843 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.34' message 'Use an OrderedDictionary instead of a regular Dictionary to store the properties inside a NeoJSONObjectMapping - this allows the user to control the order of properties while writing, if needed Add NeoJSONWriterTests>>#testPreservePropertyOrder' id 'ded70581-c06f-4687-936c-11a029a39ba4' date '2 July 2016' time '12:03:08.919979 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.33' message 'Added NeoJSONReader>>#nextListAs: as suggested by Norbert Hartl Added NeoJSONReaderTests>>#testArrayOfPointsUsingNextListAs' id '34aac279-4fef-4476-9201-95a64efaea6f' date '16 March 2016' time '11:24:47.837176 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.32' message 'Added support for characters not in the Basic Multilingual Plane encoding as a UTF-16 surrogate pair See https://tools.ietf.org/html/rfc7159#section-7' id 'fd9330ff-1b0e-4e0c-b011-defc809a9a9e' date '24 February 2016' time '2:51:06.880365 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.31' message 'New #allowNil option to Object mapping so that null values are accepted and returned as nil when reading a schema using #nextAs: (off by default) Added NeoJSONObjectMapping>>#allowNil Added NeoJSONReaderTests>>#testAllowNil' id 'fb235526-3c04-4e5f-a543-9a7e9eaaac2a' date '30 December 2015' time '12:31:59.303349 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.30' message 'Add OrderedDictionary>>#neoJsonOn: to write it as a map (Thx Paul Wilke)' id '9f42a6bd-1b9f-4ecd-99de-d9283fac6920' date '26 August 2015' time '12:42:05.743206 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.29' message 'Added NeoJSONObject, a convencience subclass of Dictionary that mimics some JavaScript behavior' id '4d5a39e4-c7f3-48ee-9366-36d9e45068ce' date '8 September 2014' time '2:26:09.557335 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.28' message 'Added NeoJSONWriter #writeNil property, defaulting to false; when true, nil instance variables will be written as null by NeoJSONPropertyMapping, else they will be skipped' id 'd6927f86-5b87-4ba2-99c1-cfe5b58ed22f' date '28 May 2014' time '8:52:57.799163 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.27' message 'Added NeoJSONWriter>>#newline to write an end of line on the wrapped stream depending on the #newLine: setting' id '5a262fd6-a42d-4102-b554-26e4f1eade3d' date '17 April 2014' time '12:12:47.207836 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.26' message 'Added new feature NeoJSONWriter>>#nextPutAs: symmetrical to NeoJSONReader>>#next:as: More specifically NeoJSONPropertyMapping>>#writeObjectOn: now respects the valueSchema if it exists using NeoJSONStreamingWriter>>#writeKey:value:as: and NeoJSONWriter>>#encodeKey:value:as: Made both the reader and writer blocks in NeoJSONCustomMapping optional with a fallback to default behavior Refactoring: added NeoJSONMapping abstract superclass above NeoJSONObjectMapping and NeoJSONCustomMapping to better clarify the design' id '41d2075d-bca4-4c08-bdf8-ed0c8da9bcf2' date '24 March 2014' time '12:18:21.026173 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.25' message 'Added basic support for mapping using inheritance when using #neoJonMapping : (see #testObject3) Renamed #new[Custom|Object]MappingFor: to [custom|object]MappingFor: to better reflect the new behavior Thanks Philippe Back for making these suggestions!' id '3051cd7d-a857-4aee-b5ba-d56a4085517b' date '22 March 2014' time '11:03:31.510538 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.24' message 'New feature: NeoJSONWriter>>#asciiOnly: to escape all non ASCII characters in strings' id '9f2d3ef6-abbb-46c1-bce7-95a6bd8b4954' date '3 September 2013' time '12:21:28.781401 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.23' message 'Added NeoJSONCustomMapping>>#mapWithValueSchema:' id '6d0d538b-6fb1-41ac-92ee-05721924c5c4' date '30 August 2013' time '11:09:17.235312 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.22' message 'Fix more double dots in the source code of #printOn: that hampered Gemstone compatibility (thx Sebastian Heidbrink)' id 'd15895fc-5743-4ec8-b99f-76fa5f72baf4' date '4 July 2013' time '7:25:56.931 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.21' message 'Fix a double dot in the source code of NeoJSONCustomWrapper>>#printOn: that hampered Gemstone compatibility (thx Sebastian Heidbrink)' id '3fcb3755-32a9-4c17-ac08-6721bf37a301' date '4 July 2013' time '6:41:52.665 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.20' message 'Added NeoJSONReader>>#atEnd' id 'afd8e136-e594-4bef-ad4b-7d3bc48fc36e' date '6 March 2013' time '3:24:11.242 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.19' message 'added NeoJSONWriter>>#newLine: to customize the end of line convention when pretty printing' id 'bf3e7e59-8300-44a6-889e-1f866c8d2977' date '10 December 2012' time '5:11:36.655 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.18' message 'minor refactoring using #peekFor:' id 'e1330b1e-87f4-4ea3-b81c-5deb03652c0d' date '3 December 2012' time '11:10:22.335 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.17' message 'modified by accident, not really changed' id 'a18f519f-c220-4ea1-a6bb-163e2c70eab7' date '14 June 2012' time '10:01:07.225 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.16' message 'documented the character stream API being used' id '5ba3bcd2-e7a6-4b07-91af-af04c7f98624' date '13 June 2012' time '4:29:08.628 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.15' message 'bugfix in NeoJSONReader>>#match:do: added examples to class comments' id '89ad4ee7-3035-43af-9d5c-cbbef6bcb3f0' date '13 June 2012' time '2:58:00.219 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.14' message 'extended NeoJSONReader with settable listClass and mapClass as well as a propertyNamesAsSymbols option extended class and method comments' id '3f749c2c-b53b-4d56-bb65-bfe964b5a69b' date '13 June 2012' time '11:56:19.567 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.13' message 'made NeoJSONReader>>parseNumberInteger more strict' id '5233f22a-8653-43c2-8651-bf5fa274b3da' date '12 June 2012' time '4:19:27.63 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.12' message 'introduced some custom exceptions' id 'bb6ec6aa-4e5d-4fac-9aa4-629ea6f068b6' date '12 June 2012' time '3:57:32.274 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.11' message 'major simplification: removed NeoJSON[Composite|List|Map]Mapping, all to be handled by blocks in NeoJSONCustomMapping renamed forCustom:do: to for:customDo: accessor based mapping to NeoJSONObjectMapping ' id '82a72131-e968-4ffe-af32-60085b4ecc67' date '12 June 2012' time '1:36:03.263 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.10' message 'optimized NeoJSONWriter>>#encodeChar: to do minimal work' id 'a684bb8c-d2d0-4a4b-8af2-da24c3f5fda4' date '10 June 2012' time '9:27:46.001 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.9' message 'added NeoJSONTestObject1 with class side #neoJsonMapping: method' id '49129177-ee36-4e4b-890e-314e92f23d76' date '9 June 2012' time '6:56:12.413 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.8' message 'added custom mapping' id 'b02af4e3-7a91-471f-81a0-57db8b43a87d' date '8 June 2012' time '10:09:41.079 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.7' message 'adding valueSchema to propertyMapping' id '61c29ad0-e2a6-40af-8360-24952a5e6633' date '8 June 2012' time '8:35:55 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.6' message '1st version where list mapping works on some simple examples' id 'e3250e47-9c16-461e-8d2e-e8031e4cc2be' date '8 June 2012' time '4:40:26 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.5' message 'introduced NeoJSONMapper 1st simplified version of NeoJSONReader>>#nextAs:' id '8a4a2338-c728-4ec5-bae9-8232abd6d7f6' date '7 June 2012' time '3:52:29 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.4' message '1st version with working object mapping for writer' id '0208c7c7-3ab1-4081-9061-9c6ca9d7e7cf' date '6 June 2012' time '8:47:04 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.3' message 'added more tests and a simple benchmark' id '2567c409-eb97-428e-a865-e6d078d23dff' date '4 June 2012' time '6:52:34 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.2' message 'first simple version of NeoJSONWriter' id '7e6474b7-70ed-4cb0-8348-05adddc17853' date '3 June 2012' time '7:57:41 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.1' message 'first simple version of NeoJSONReader' id 'e0039613-c57d-47ae-8838-db64917ca722' date '2 June 2012' time '9:59:42 pm' author 'SvenVanCaekenberghe' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ()) \ No newline at end of file +(name 'Neo-JSON-Core-SvenVanCaekenberghe.57' message 'Always store #propertyName in NeoJSONPropertyMapping as Symbol. Use this invariant in NeoJSONObjectMapping, specifically in #propertyNamed:ifAbsent: #mapProperty:getter:setter: and #mapInstVar:to: to minimize the number of conversions needed. Add NeoJSONMappingTests>>#testSymbolOrStringInstVarMapping to make sure both String and Symbols are allowed as instance variable mapping specification. ' id '8f26cb9d-ef20-0d00-9ccb-0dac050dd8ac' date '6 February 2018' time '5:43:33.847976 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-marianopeck.56' message '* Make a more robuts NeoJSONObject >> printOn: * Last 2 small edits for string vs symbol ' id 'dd16df1d-7520-0d00-bd5b-447e0307cbab' date '31 January 2018' time '11:34:41.660838 am' author 'marianopeck' ancestors ((name 'Neo-JSON-Core-marianopeck.55' message '* Added ''collection'' instVar to NeoJSONMappingNotFound and not use ''signaler''. ' id '9527791e-7320-0d00-be53-6ad8006b589b' date '31 January 2018' time '9:11:41.823112 am' author 'marianopeck' ancestors ((name 'Neo-JSON-Core-marianopeck.54' message 'NeoJSON was assuming that #x = ''x'' is always true, which is correct in Pharo, but not so in GemStone, VAST, VW, etc. So we tried to force a #asString in a few places so that regardless of the impementation we are always safe. This might have a small performance (to be later checked via benchmarks). ' id 'c310cc64-6820-0d00-be52-3323006b589b' date '30 January 2018' time '8:23:57.021603 pm' author 'marianopeck' ancestors ((name 'Neo-JSON-Core-marianopeck.53' message 'For portability reasons use `Character cr asString` rather than `String cr`' id 'e1afc10e-6220-0d00-a479-595d0e1160ba' date '30 January 2018' time '12:50:23.697085 pm' author 'marianopeck' ancestors ((name 'Neo-JSON-Core-marianopeck.52' message 'This commits aims to make NeoJSON more portable to other Smalltalk dialects like VAST. * Moved OrderedCollection and SmallDictionary neoJsonOn: to a new separate package ''Neo-JSON-Pharo-Core''. * Duplicate code from Pharo-specific NotFound to NeoJSONMappingNotFound and make the later subclass from Error (any other Smalltalk have NotFound exception). See NeoJSONMappingNotFound class comment for more details. ' id '6b05827e-6020-0d00-a470-708e0e1160ba' date '30 January 2018' time '10:58:28.638268 am' author 'marianopeck' ancestors ((name 'Neo-JSON-Core-marianopeck.51' message 'This commits aims to make NeoJSON more portable to other Smalltalk dialects like VAST. * Moved OrderedCollection and SmallDictionary neoJsonOn: to a new separate package ''Neo-JSON-Pharo-Core''. * Duplicate code from Pharo-specific NotFound to NeoJSONMappingNotFound and make the later subclass from Error (any other Smalltalk have NotFound exception). See NeoJSONMappingNotFound class comment for more details. ' id '26b6eb6e-6020-0d00-a46f-04550e1160ba' date '30 January 2018' time '10:54:07.129344 am' author 'marianopeck' ancestors ((name 'Neo-JSON-Core-MarianoMartinezPeck.50' message 'MonticelloPreparation' id '9d84b6d8-fa1f-0d00-b8c0-f00b00e5ebf6' date '25 January 2018' time '9:42:15.363973 am' author 'MarianoMartinezPeck' ancestors ((name 'Neo-JSON-Core-MarianoMartinezPeck.49' message 'MonticelloPreparation' id 'c85bb7c6-fa1f-0d00-b8bf-775a00e5ebf6' date '25 January 2018' time '9:37:13.429169 am' author 'MarianoMartinezPeck' ancestors ((name 'Neo-JSON-Core-MarianoMartinezPeck.48' message 'MonticelloPreparation' id '1fd55aa9-fa1f-0d00-b8be-da9100e5ebf6' date '25 January 2018' time '9:29:00.826099 am' author 'MarianoMartinezPeck' ancestors ((name 'Neo-JSON-Core-MarianoMartinezPeck.47' message 'MonticelloPreparation' id '25c20ba3-fa1f-0d00-b8bd-455500e5ebf6' date '25 January 2018' time '9:27:14.98062 am' author 'MarianoMartinezPeck' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.46' message 'Fix the NeoJSONWriter>>#writeNil: true option by adding a short circuit to NeoJSONWriter>>nextPut:as: (as reported by Juraj Kubelka) Add #testRectanglePointsWithNil' id 'f412799a-431a-0d00-850e-5c3c05ce5378' date '13 November 2017' time '6:59:13.995868 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.45' message 'merge' id '8601ddc6-7716-0d00-beb9-5e2a04c5ff7e' date '26 September 2017' time '1:33:10.530717 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.44' message 'Implement some missing code in NeoJSONCustomMapping (the writing part of #listOfElementSchema: #listOfType:andElementSchema: #mapWithValueSchema:) Add NeoJSONStreamingWriter>>#writeElementAs: Add NeoJSONMappingTests>>#testDynamicTyping as an example' id 'f1ebeade-2816-0d00-a04c-ae370e598362' date '22 September 2017' time '3:24:51.679449 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.42' message 'Improve error handling and compliance. Added NeoJSONValidation that uses some external positive/negative specifications Added NeoJSONReader>>#failIfNotAtEnd to optionally force correct end of input parsing and catch extraneous input Improve NeoJSONReader>>#parseCharacter error reporting in case of incomplete escapes Improve NeoJSONReader>>#parseListDo: & #parseMapDo: error reporting NeoJSONReader>>#parseNumberExponent (1) add error for missing exponents (2) add errors for too large & too small exponents versus Float limits' id 'bbc9c32b-080d-0d00-a713-b0590189d909' date '29 May 2017' time '11:37:22.389793 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-MaxLeske.41' message '* changed NeoJSONWriter>>writeString: to use #to:do: instead of #do: to improve performance when writing large strings' id 'e525dc7a-f6f4-4107-94d9-621d7ad184c6' date '30 April 2017' time '1:41:23.628708 pm' author 'MaxLeske' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.40' message 'Add NeoJSONObject>>#atPath: and #atPath:put: Add NeoJSONObjectTests>>#testAtPath and #testAtPathPut' id 'c336587e-740a-0d00-b51a-dacd0088e41c' date '26 April 2017' time '4:35:49.433269 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.39' message 'Fix a bug where initial whitespace when reading a string was consumed (thx Max Leske) Patch NeoJSONReader>>#parseString to simply #peekFor: $"' id 'c6e689c2-c106-0d00-9800-d9b20c8d4a06' date '10 March 2017' time '2:05:59.511 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.38' message 'Change NeoJSONObjects'' #doesNotUnderstand: behavour for setters to return self which makes for easier usage. Extend NeoJSONObjects'' class comment' id '9817797c-3dd7-43a5-a936-7964a1effb90' date '3 February 2017' time '3:33:07.073384 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.37' message 'Bugfix to NeoJSONWriter>>#escapeUnicode: [thank you, Tomohiro Oda] code points between 16rFFF and 16rFFFF where encoded wrongly when #asciiOnly was true Add high code point string to NeoJSONWriteReadTests>>#testStrings and add new NeoJSONWriteReadAsciiOnlyTests subclass' id '788cd6b1-71ed-474c-b387-e005a7137896' date '24 November 2016' time '10:30:16.165149 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.36' message 'Use an OrderedCollection instead of a some Dictionary to store the properties inside a NeoJSONObjectMapping ' id 'aab6c89f-0fbc-4f3c-8aa9-4da1c71f72b2' date '11 July 2016' time '11:03:30.192353 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.35' message 'Add NeoJSONObjectMapping>>#dictionaryForProperties with hack to cover more Pharo versions' id 'a137c050-87c4-4d1c-89c3-d558cfe78ff5' date '11 July 2016' time '10:23:25.017843 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.34' message 'Use an OrderedDictionary instead of a regular Dictionary to store the properties inside a NeoJSONObjectMapping - this allows the user to control the order of properties while writing, if needed Add NeoJSONWriterTests>>#testPreservePropertyOrder' id 'ded70581-c06f-4687-936c-11a029a39ba4' date '2 July 2016' time '12:03:08.919979 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.33' message 'Added NeoJSONReader>>#nextListAs: as suggested by Norbert Hartl Added NeoJSONReaderTests>>#testArrayOfPointsUsingNextListAs' id '34aac279-4fef-4476-9201-95a64efaea6f' date '16 March 2016' time '11:24:47.837176 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.32' message 'Added support for characters not in the Basic Multilingual Plane encoding as a UTF-16 surrogate pair See https://tools.ietf.org/html/rfc7159#section-7' id 'fd9330ff-1b0e-4e0c-b011-defc809a9a9e' date '24 February 2016' time '2:51:06.880365 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.31' message 'New #allowNil option to Object mapping so that null values are accepted and returned as nil when reading a schema using #nextAs: (off by default) Added NeoJSONObjectMapping>>#allowNil Added NeoJSONReaderTests>>#testAllowNil' id 'fb235526-3c04-4e5f-a543-9a7e9eaaac2a' date '30 December 2015' time '12:31:59.303349 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.30' message 'Add OrderedDictionary>>#neoJsonOn: to write it as a map (Thx Paul Wilke)' id '9f42a6bd-1b9f-4ecd-99de-d9283fac6920' date '26 August 2015' time '12:42:05.743206 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.29' message 'Added NeoJSONObject, a convencience subclass of Dictionary that mimics some JavaScript behavior' id '4d5a39e4-c7f3-48ee-9366-36d9e45068ce' date '8 September 2014' time '2:26:09.557335 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.28' message 'Added NeoJSONWriter #writeNil property, defaulting to false; when true, nil instance variables will be written as null by NeoJSONPropertyMapping, else they will be skipped' id 'd6927f86-5b87-4ba2-99c1-cfe5b58ed22f' date '28 May 2014' time '8:52:57.799163 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.27' message 'Added NeoJSONWriter>>#newline to write an end of line on the wrapped stream depending on the #newLine: setting' id '5a262fd6-a42d-4102-b554-26e4f1eade3d' date '17 April 2014' time '12:12:47.207836 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.26' message 'Added new feature NeoJSONWriter>>#nextPutAs: symmetrical to NeoJSONReader>>#next:as: More specifically NeoJSONPropertyMapping>>#writeObjectOn: now respects the valueSchema if it exists using NeoJSONStreamingWriter>>#writeKey:value:as: and NeoJSONWriter>>#encodeKey:value:as: Made both the reader and writer blocks in NeoJSONCustomMapping optional with a fallback to default behavior Refactoring: added NeoJSONMapping abstract superclass above NeoJSONObjectMapping and NeoJSONCustomMapping to better clarify the design' id '41d2075d-bca4-4c08-bdf8-ed0c8da9bcf2' date '24 March 2014' time '12:18:21.026173 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.25' message 'Added basic support for mapping using inheritance when using #neoJonMapping : (see #testObject3) Renamed #new[Custom|Object]MappingFor: to [custom|object]MappingFor: to better reflect the new behavior Thanks Philippe Back for making these suggestions!' id '3051cd7d-a857-4aee-b5ba-d56a4085517b' date '22 March 2014' time '11:03:31.510538 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.24' message 'New feature: NeoJSONWriter>>#asciiOnly: to escape all non ASCII characters in strings' id '9f2d3ef6-abbb-46c1-bce7-95a6bd8b4954' date '3 September 2013' time '12:21:28.781401 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.23' message 'Added NeoJSONCustomMapping>>#mapWithValueSchema:' id '6d0d538b-6fb1-41ac-92ee-05721924c5c4' date '30 August 2013' time '11:09:17.235312 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.22' message 'Fix more double dots in the source code of #printOn: that hampered Gemstone compatibility (thx Sebastian Heidbrink)' id 'd15895fc-5743-4ec8-b99f-76fa5f72baf4' date '4 July 2013' time '7:25:56.931 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.21' message 'Fix a double dot in the source code of NeoJSONCustomWrapper>>#printOn: that hampered Gemstone compatibility (thx Sebastian Heidbrink)' id '3fcb3755-32a9-4c17-ac08-6721bf37a301' date '4 July 2013' time '6:41:52.665 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.20' message 'Added NeoJSONReader>>#atEnd' id 'afd8e136-e594-4bef-ad4b-7d3bc48fc36e' date '6 March 2013' time '3:24:11.242 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.19' message 'added NeoJSONWriter>>#newLine: to customize the end of line convention when pretty printing' id 'bf3e7e59-8300-44a6-889e-1f866c8d2977' date '10 December 2012' time '5:11:36.655 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.18' message 'minor refactoring using #peekFor:' id 'e1330b1e-87f4-4ea3-b81c-5deb03652c0d' date '3 December 2012' time '11:10:22.335 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.17' message 'modified by accident, not really changed' id 'a18f519f-c220-4ea1-a6bb-163e2c70eab7' date '14 June 2012' time '10:01:07.225 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.16' message 'documented the character stream API being used' id '5ba3bcd2-e7a6-4b07-91af-af04c7f98624' date '13 June 2012' time '4:29:08.628 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.15' message 'bugfix in NeoJSONReader>>#match:do: added examples to class comments' id '89ad4ee7-3035-43af-9d5c-cbbef6bcb3f0' date '13 June 2012' time '2:58:00.219 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.14' message 'extended NeoJSONReader with settable listClass and mapClass as well as a propertyNamesAsSymbols option extended class and method comments' id '3f749c2c-b53b-4d56-bb65-bfe964b5a69b' date '13 June 2012' time '11:56:19.567 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.13' message 'made NeoJSONReader>>parseNumberInteger more strict' id '5233f22a-8653-43c2-8651-bf5fa274b3da' date '12 June 2012' time '4:19:27.63 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.12' message 'introduced some custom exceptions' id 'bb6ec6aa-4e5d-4fac-9aa4-629ea6f068b6' date '12 June 2012' time '3:57:32.274 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.11' message 'major simplification: removed NeoJSON[Composite|List|Map]Mapping, all to be handled by blocks in NeoJSONCustomMapping renamed forCustom:do: to for:customDo: accessor based mapping to NeoJSONObjectMapping ' id '82a72131-e968-4ffe-af32-60085b4ecc67' date '12 June 2012' time '1:36:03.263 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.10' message 'optimized NeoJSONWriter>>#encodeChar: to do minimal work' id 'a684bb8c-d2d0-4a4b-8af2-da24c3f5fda4' date '10 June 2012' time '9:27:46.001 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.9' message 'added NeoJSONTestObject1 with class side #neoJsonMapping: method' id '49129177-ee36-4e4b-890e-314e92f23d76' date '9 June 2012' time '6:56:12.413 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.8' message 'added custom mapping' id 'b02af4e3-7a91-471f-81a0-57db8b43a87d' date '8 June 2012' time '10:09:41.079 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.7' message 'adding valueSchema to propertyMapping' id '61c29ad0-e2a6-40af-8360-24952a5e6633' date '8 June 2012' time '8:35:55 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.6' message '1st version where list mapping works on some simple examples' id 'e3250e47-9c16-461e-8d2e-e8031e4cc2be' date '8 June 2012' time '4:40:26 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.5' message 'introduced NeoJSONMapper 1st simplified version of NeoJSONReader>>#nextAs:' id '8a4a2338-c728-4ec5-bae9-8232abd6d7f6' date '7 June 2012' time '3:52:29 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.4' message '1st version with working object mapping for writer' id '0208c7c7-3ab1-4081-9061-9c6ca9d7e7cf' date '6 June 2012' time '8:47:04 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.3' message 'added more tests and a simple benchmark' id '2567c409-eb97-428e-a865-e6d078d23dff' date '4 June 2012' time '6:52:34 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.2' message 'first simple version of NeoJSONWriter' id '7e6474b7-70ed-4cb0-8348-05adddc17853' date '3 June 2012' time '7:57:41 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.1' message 'first simple version of NeoJSONReader' id 'e0039613-c57d-47ae-8838-db64917ca722' date '2 June 2012' time '9:59:42 pm' author 'SvenVanCaekenberghe' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())(name 'Neo-JSON-Core-SvenVanCaekenberghe.43' message 'Added NeoJSONExamplesTests with #testPoints and #testRectanglePoints Changed NeoJSONObjectMapping #mapAccessors: #mapAllInstVars #mapInstVars and #mapInstVars: to return a collection of the generated mappings Thanks Juraj Kubelka ! ' id 'aa59f5b6-0310-0d00-8c5f-00ce0702b82a' date '6 July 2017' time '10:33:57.717792 am' author 'SvenVanCaekenberghe' ancestors ((id 'bbc9c32b-080d-0d00-a713-b0590189d909')) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ()) \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/properties.json b/repository/Neo-JSON-Core.package/properties.json index f037444..6f31cf5 100644 --- a/repository/Neo-JSON-Core.package/properties.json +++ b/repository/Neo-JSON-Core.package/properties.json @@ -1,2 +1 @@ -{ - } +{ } \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Core.package/.filetree b/repository/Neo-JSON-Pharo-Core.package/.filetree new file mode 100644 index 0000000..57a6797 --- /dev/null +++ b/repository/Neo-JSON-Pharo-Core.package/.filetree @@ -0,0 +1,5 @@ +{ + "separateMethodMetaAndSource" : false, + "noMethodMetaData" : true, + "useCypressPropertiesFile" : true +} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/OrderedDictionary.extension/instance/neoJsonOn..st b/repository/Neo-JSON-Pharo-Core.package/OrderedDictionary.extension/instance/neoJsonOn..st similarity index 72% rename from repository/Neo-JSON-Core.package/OrderedDictionary.extension/instance/neoJsonOn..st rename to repository/Neo-JSON-Pharo-Core.package/OrderedDictionary.extension/instance/neoJsonOn..st index 174eb53..61a9c65 100644 --- a/repository/Neo-JSON-Core.package/OrderedDictionary.extension/instance/neoJsonOn..st +++ b/repository/Neo-JSON-Pharo-Core.package/OrderedDictionary.extension/instance/neoJsonOn..st @@ -1,3 +1,3 @@ -*neo-json-core +*neo-json-pharo-core neoJsonOn: neoJSONWriter neoJSONWriter writeMap: self \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Core.package/OrderedDictionary.extension/methodProperties.json b/repository/Neo-JSON-Pharo-Core.package/OrderedDictionary.extension/methodProperties.json new file mode 100644 index 0000000..9175e3e --- /dev/null +++ b/repository/Neo-JSON-Pharo-Core.package/OrderedDictionary.extension/methodProperties.json @@ -0,0 +1,6 @@ +{ + "instance" : { + "neoJsonOn:" : "MarianoMartinezPeck 1/30/2018 09:19" + }, + "class" : { } +} \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Core.package/OrderedDictionary.extension/properties.json b/repository/Neo-JSON-Pharo-Core.package/OrderedDictionary.extension/properties.json new file mode 100644 index 0000000..d25bad0 --- /dev/null +++ b/repository/Neo-JSON-Pharo-Core.package/OrderedDictionary.extension/properties.json @@ -0,0 +1,3 @@ +{ + "name" : "OrderedDictionary" +} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/SmallDictionary.extension/instance/neoJsonOn..st b/repository/Neo-JSON-Pharo-Core.package/SmallDictionary.extension/instance/neoJsonOn..st similarity index 72% rename from repository/Neo-JSON-Core.package/SmallDictionary.extension/instance/neoJsonOn..st rename to repository/Neo-JSON-Pharo-Core.package/SmallDictionary.extension/instance/neoJsonOn..st index 174eb53..61a9c65 100644 --- a/repository/Neo-JSON-Core.package/SmallDictionary.extension/instance/neoJsonOn..st +++ b/repository/Neo-JSON-Pharo-Core.package/SmallDictionary.extension/instance/neoJsonOn..st @@ -1,3 +1,3 @@ -*neo-json-core +*neo-json-pharo-core neoJsonOn: neoJSONWriter neoJSONWriter writeMap: self \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Core.package/SmallDictionary.extension/methodProperties.json b/repository/Neo-JSON-Pharo-Core.package/SmallDictionary.extension/methodProperties.json new file mode 100644 index 0000000..9175e3e --- /dev/null +++ b/repository/Neo-JSON-Pharo-Core.package/SmallDictionary.extension/methodProperties.json @@ -0,0 +1,6 @@ +{ + "instance" : { + "neoJsonOn:" : "MarianoMartinezPeck 1/30/2018 09:19" + }, + "class" : { } +} \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Core.package/SmallDictionary.extension/properties.json b/repository/Neo-JSON-Pharo-Core.package/SmallDictionary.extension/properties.json new file mode 100644 index 0000000..47f0739 --- /dev/null +++ b/repository/Neo-JSON-Pharo-Core.package/SmallDictionary.extension/properties.json @@ -0,0 +1,3 @@ +{ + "name" : "SmallDictionary" +} \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Core.package/monticello.meta/categories.st b/repository/Neo-JSON-Pharo-Core.package/monticello.meta/categories.st new file mode 100644 index 0000000..3eed96e --- /dev/null +++ b/repository/Neo-JSON-Pharo-Core.package/monticello.meta/categories.st @@ -0,0 +1 @@ +SystemOrganization addCategory: #'Neo-JSON-Pharo-Core'! diff --git a/repository/Neo-JSON-Pharo-Core.package/monticello.meta/initializers.st b/repository/Neo-JSON-Pharo-Core.package/monticello.meta/initializers.st new file mode 100644 index 0000000..e69de29 diff --git a/repository/Neo-JSON-Pharo-Core.package/monticello.meta/package b/repository/Neo-JSON-Pharo-Core.package/monticello.meta/package new file mode 100644 index 0000000..414908e --- /dev/null +++ b/repository/Neo-JSON-Pharo-Core.package/monticello.meta/package @@ -0,0 +1 @@ +(name 'Neo-JSON-Pharo-Core') \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Core.package/monticello.meta/version b/repository/Neo-JSON-Pharo-Core.package/monticello.meta/version new file mode 100644 index 0000000..3861103 --- /dev/null +++ b/repository/Neo-JSON-Pharo-Core.package/monticello.meta/version @@ -0,0 +1 @@ +(name 'Neo-JSON-Pharo-Core-marianopeck.5' message '* Remove Date newDay:monthIndex:year: and change tests to use #fromString: ' id '0808b7e4-eb20-0d00-8085-371f07903797' date '6 February 2018' time '9:17:03.842522 am' author 'marianopeck' ancestors ((name 'Neo-JSON-Pharo-Core-marianopeck.4' message 'Sorry includesSubString: should have been in tests package' id 'dfa8fbb7-7920-0d00-bd67-46830307cbab' date '31 January 2018' time '5:04:07.093681 pm' author 'marianopeck' ancestors ((name 'Neo-JSON-Pharo-Core-marianopeck.3' message 'Added includesSubString for compatibility. Will try to remove it soon. ' id 'bae2f9af-7920-0d00-bd64-a73b0307cbab' date '31 January 2018' time '5:01:52.759683 pm' author 'marianopeck' ancestors ((name 'Neo-JSON-Pharo-Core-marianopeck.2' message 'Use newDay: day monthIndex: month year: year' id '6ae7ff91-7920-0d00-bd63-ed880307cbab' date '31 January 2018' time '4:53:29.837641 pm' author 'marianopeck' ancestors ((name 'Neo-JSON-Pharo-Core-marianopeck.1' message 'This commits aims to make NeoJSON more portable to other Smalltalk dialects like VAST. * Moved OrderedCollection and SmallDictionary neoJsonOn: to a new separate package ''Neo-JSON-Pharo-Core''. ' id '95833380-6020-0d00-a471-abf20e1160ba' date '30 January 2018' time '10:58:57.047661 am' author 'marianopeck' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ()) \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Core.package/properties.json b/repository/Neo-JSON-Pharo-Core.package/properties.json new file mode 100644 index 0000000..6f31cf5 --- /dev/null +++ b/repository/Neo-JSON-Pharo-Core.package/properties.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/.filetree b/repository/Neo-JSON-Pharo-Examples.package/.filetree new file mode 100644 index 0000000..57a6797 --- /dev/null +++ b/repository/Neo-JSON-Pharo-Examples.package/.filetree @@ -0,0 +1,5 @@ +{ + "separateMethodMetaAndSource" : false, + "noMethodMetaData" : true, + "useCypressPropertiesFile" : true +} \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/Attachment.class/README.md b/repository/Neo-JSON-Pharo-Examples.package/Attachment.class/README.md new file mode 100644 index 0000000..e69de29 diff --git a/repository/Neo-JSON-Pharo-Examples.package/Attachment.class/instance/fileName..st b/repository/Neo-JSON-Pharo-Examples.package/Attachment.class/instance/fileName..st new file mode 100644 index 0000000..3966e08 --- /dev/null +++ b/repository/Neo-JSON-Pharo-Examples.package/Attachment.class/instance/fileName..st @@ -0,0 +1,3 @@ +accessing +fileName: anObject + fileName := anObject \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/Attachment.class/instance/url..st b/repository/Neo-JSON-Pharo-Examples.package/Attachment.class/instance/url..st new file mode 100644 index 0000000..ca05f95 --- /dev/null +++ b/repository/Neo-JSON-Pharo-Examples.package/Attachment.class/instance/url..st @@ -0,0 +1,3 @@ +accessing +url: anObject + url := anObject \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/Attachment.class/methodProperties.json b/repository/Neo-JSON-Pharo-Examples.package/Attachment.class/methodProperties.json new file mode 100644 index 0000000..3232d4b --- /dev/null +++ b/repository/Neo-JSON-Pharo-Examples.package/Attachment.class/methodProperties.json @@ -0,0 +1,7 @@ +{ + "instance" : { + "url:" : "marianopeck 2/2/2018 17:52", + "fileName:" : "marianopeck 2/2/2018 17:53" + }, + "class" : { } +} \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/Attachment.class/properties.json b/repository/Neo-JSON-Pharo-Examples.package/Attachment.class/properties.json new file mode 100644 index 0000000..5e890ec --- /dev/null +++ b/repository/Neo-JSON-Pharo-Examples.package/Attachment.class/properties.json @@ -0,0 +1,14 @@ +{ + "commentStamp" : "", + "super" : "Object", + "category" : "Neo-JSON-Pharo-Examples", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ + "url", + "fileName" + ], + "name" : "Attachment", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/BittrexResponse.class/README.md b/repository/Neo-JSON-Pharo-Examples.package/BittrexResponse.class/README.md new file mode 100644 index 0000000..e69de29 diff --git a/repository/Neo-JSON-Pharo-Examples.package/BittrexResponse.class/methodProperties.json b/repository/Neo-JSON-Pharo-Examples.package/BittrexResponse.class/methodProperties.json new file mode 100644 index 0000000..d158391 --- /dev/null +++ b/repository/Neo-JSON-Pharo-Examples.package/BittrexResponse.class/methodProperties.json @@ -0,0 +1,4 @@ +{ + "instance" : { }, + "class" : { } +} \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/BittrexResponse.class/properties.json b/repository/Neo-JSON-Pharo-Examples.package/BittrexResponse.class/properties.json new file mode 100644 index 0000000..778263b --- /dev/null +++ b/repository/Neo-JSON-Pharo-Examples.package/BittrexResponse.class/properties.json @@ -0,0 +1,15 @@ +{ + "commentStamp" : "", + "super" : "Object", + "category" : "Neo-JSON-Pharo-Examples", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ + "success", + "message", + "result" + ], + "name" : "BittrexResponse", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/Market.class/README.md b/repository/Neo-JSON-Pharo-Examples.package/Market.class/README.md new file mode 100644 index 0000000..e69de29 diff --git a/repository/Neo-JSON-Pharo-Examples.package/Market.class/methodProperties.json b/repository/Neo-JSON-Pharo-Examples.package/Market.class/methodProperties.json new file mode 100644 index 0000000..d158391 --- /dev/null +++ b/repository/Neo-JSON-Pharo-Examples.package/Market.class/methodProperties.json @@ -0,0 +1,4 @@ +{ + "instance" : { }, + "class" : { } +} \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/Market.class/properties.json b/repository/Neo-JSON-Pharo-Examples.package/Market.class/properties.json new file mode 100644 index 0000000..452bbf0 --- /dev/null +++ b/repository/Neo-JSON-Pharo-Examples.package/Market.class/properties.json @@ -0,0 +1,23 @@ +{ + "commentStamp" : "", + "super" : "Object", + "category" : "Neo-JSON-Pharo-Examples", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ + "MarketCurrency", + "BaseCurrency", + "MarketCurrencyLong", + "BaseCurrencyLong", + "MinTradeSize", + "MarketName", + "IsActive", + "Created", + "Notice", + "IsSponsored", + "LogoUrl" + ], + "name" : "Market", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/README.md b/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/README.md new file mode 100644 index 0000000..e69de29 diff --git a/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testAccessingTheNewYorkPublicLibrary.st b/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testAccessingTheNewYorkPublicLibrary.st new file mode 100644 index 0000000..5ba6501 --- /dev/null +++ b/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testAccessingTheNewYorkPublicLibrary.st @@ -0,0 +1,13 @@ +tests +testAccessingTheNewYorkPublicLibrary + + | client reader data networkStream | + (client := ZnClient new) + streaming: true; + url: 'https://github.com/NYPL-publicdomain/data-and-utilities/blob/master/items/pd_items_1.ndjson?raw=true'; + get. + networkStream := ZnCharacterReadStream on: client contents. + reader := NeoJSONReader on: networkStream. + data := Array streamContents: [ :out | [ reader atEnd ] whileFalse: [ out nextPut: reader next ] ]. + client close. + data \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testAttachmentsExample.st b/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testAttachmentsExample.st new file mode 100644 index 0000000..8ded541 --- /dev/null +++ b/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testAttachmentsExample.st @@ -0,0 +1,31 @@ +tests +testAttachmentsExample + | collectionOne json | + "Let's create a collection of two instances:" + collectionOne := {(Attachment new + url: 'http://example.com/random-name.txt' asZnUrl; + fileName: 'chapter-one.txt' yourself). + (Attachment new + url: 'http://example.com/random-name.png' asZnUrl; + fileName: 'image.png'; + yourself)}. + + "And let's map it to a JSON structure:" + json := String + streamContents: [ :aStream | + (NeoJSONWriter on: aStream) + for: #CollectionOfAttachments customDo: [ :mapping | mapping listOfElementSchema: Attachment ]; + mapAllInstVarsFor: Attachment; + for: ZnUrl customDo: [ :mapping | mapping encoder: [ :aZnUrl | aZnUrl asString ] ]; + nextPut: collectionOne as: #CollectionOfAttachments ]. + + + "And read the JSON structure:" + (NeoJSONReader on: json readStream) + for: #CollectionOfAttachments customDo: [ :mapping | mapping listOfElementSchema: Attachment ]; + for: Attachment + do: [ :mapping | + mapping mapInstVar: 'fileName'. + (mapping mapInstVar: 'url') valueSchema: ZnUrl ]; + for: ZnUrl customDo: [ :mapping | mapping decoder: [ :string | string asZnUrl ] ]; + nextAs: #CollectionOfAttachments \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testBittrexLitecoinAsDictionary.st b/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testBittrexLitecoinAsDictionary.st new file mode 100644 index 0000000..82b469f --- /dev/null +++ b/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testBittrexLitecoinAsDictionary.st @@ -0,0 +1,10 @@ +tests +testBittrexLitecoinAsDictionary + ZnClient new + url: 'https://bittrex.com/api/v1.1/public/getmarketSummary?market=BTC-LTC'; + accept: ZnMimeType applicationJson; + contentReader: [ :entity | |reader| + reader := (NeoJSONReader on: entity readStream). + reader next ]; + get. + \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testBittrexLitecoinAsDomainObjects.st b/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testBittrexLitecoinAsDomainObjects.st new file mode 100644 index 0000000..f41da9c --- /dev/null +++ b/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testBittrexLitecoinAsDomainObjects.st @@ -0,0 +1,16 @@ +tests +testBittrexLitecoinAsDomainObjects + ZnClient new + url: 'https://bittrex.com/api/v1.1/public/getmarkets'; + enforceHttpSuccess: true; + accept: ZnMimeType applicationJson; + contentReader: [ :entity | |reader| + reader := (NeoJSONReader on: entity readStream). + reader for: BittrexResponse do: [:m| + m mapInstVar: #success. + m mapInstVar: #message. + (m mapInstVar: #result) valueSchema: #ArrayOfMarkets]. + reader for: #ArrayOfMarkets customDo: [ :mapping | mapping listOfElementSchema: Market ]. + reader mapInstVarsFor: Market. + reader nextAs: BittrexResponse ]; + get \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testDoomtownDBCards.st b/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testDoomtownDBCards.st new file mode 100644 index 0000000..41531e4 --- /dev/null +++ b/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testDoomtownDBCards.st @@ -0,0 +1,4 @@ +tests +testDoomtownDBCards + + NeoJSONReader fromString: 'http://dtdb.co/api/cards/' asUrl retrieveContents \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testFeed.st b/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testFeed.st new file mode 100644 index 0000000..476852d --- /dev/null +++ b/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testFeed.st @@ -0,0 +1,12 @@ +tests +testFeed + | json | + json := ZnClient new + systemPolicy; + url: 'https://daringfireball.net/feeds/json'; + accept: ZnMimeType applicationJson; + contentReader: [ :entity | NeoJSONObject fromString: entity contents ]; + get. + json items collect: #title. + json items collect: [ :each | each title -> each url ]. + json \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testGetWorldCapitals.st b/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testGetWorldCapitals.st new file mode 100644 index 0000000..1fe53f1 --- /dev/null +++ b/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testGetWorldCapitals.st @@ -0,0 +1,4 @@ +tests +testGetWorldCapitals + ((NeoJSONReader fromString: (ZnEasy get: 'http://api.geonames.org/countryInfoJSON' username: 'demo' password: '') contents) at: #geonames) + collect: [ :d | d at: #capital ] \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testGoogleMapsAPI.st b/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testGoogleMapsAPI.st new file mode 100644 index 0000000..85bb04c --- /dev/null +++ b/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testGoogleMapsAPI.st @@ -0,0 +1,7 @@ +tests +testGoogleMapsAPI + + ZnClient new + url: 'http://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&sensor=false'; + contentReader: [ :entity | NeoJSONReader fromString: entity contents ]; + get \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testParsingUserAgentStrings.st b/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testParsingUserAgentStrings.st new file mode 100644 index 0000000..440e03f --- /dev/null +++ b/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testParsingUserAgentStrings.st @@ -0,0 +1,9 @@ +tests +testParsingUserAgentStrings + ZnClient new + http; + host: 'useragentstring.com'; + queryAt: 'uas' put: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/601.4.4 (KHTML, like Gecko) Version/9.0.3 Safari/601.4.4'; + queryAt: 'getJSON' put: 'all'; + contentReader: [ :entity | NeoJSONReader fromString: entity contents ]; + get \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testStackOverflowInfo.st b/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testStackOverflowInfo.st new file mode 100644 index 0000000..645a79f --- /dev/null +++ b/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testStackOverflowInfo.st @@ -0,0 +1,6 @@ +tests +testStackOverflowInfo + + ZnClient new + contentReader: [ :entity | NeoJSONReader fromString: entity contents ]; + get: 'http://api.stackexchange.com/2.1/info?site=stackoverflow' \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/methodProperties.json b/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/methodProperties.json new file mode 100644 index 0000000..4e8c4dd --- /dev/null +++ b/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/methodProperties.json @@ -0,0 +1,15 @@ +{ + "instance" : { + "testGoogleMapsAPI" : "marianopeck 2/5/2018 08:35", + "testStackOverflowInfo" : "marianopeck 2/5/2018 08:46", + "testBittrexLitecoinAsDomainObjects" : "marianopeck 2/2/2018 17:42", + "testAccessingTheNewYorkPublicLibrary" : "marianopeck 2/5/2018 08:34", + "testGetWorldCapitals" : "marianopeck 2/2/2018 18:06", + "testParsingUserAgentStrings" : "marianopeck 2/5/2018 08:28", + "testDoomtownDBCards" : "marianopeck 2/5/2018 08:39", + "testAttachmentsExample" : "marianopeck 2/2/2018 17:54", + "testFeed" : "marianopeck 2/2/2018 18:01", + "testBittrexLitecoinAsDictionary" : "marianopeck 2/2/2018 17:41" + }, + "class" : { } +} \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/properties.json b/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/properties.json new file mode 100644 index 0000000..89a569c --- /dev/null +++ b/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "TestCase", + "category" : "Neo-JSON-Pharo-Examples", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "NeoJSONPharoExamples", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/monticello.meta/categories.st b/repository/Neo-JSON-Pharo-Examples.package/monticello.meta/categories.st new file mode 100644 index 0000000..c9dd2cc --- /dev/null +++ b/repository/Neo-JSON-Pharo-Examples.package/monticello.meta/categories.st @@ -0,0 +1 @@ +SystemOrganization addCategory: #'Neo-JSON-Pharo-Examples'! diff --git a/repository/Neo-JSON-Pharo-Examples.package/monticello.meta/initializers.st b/repository/Neo-JSON-Pharo-Examples.package/monticello.meta/initializers.st new file mode 100644 index 0000000..e69de29 diff --git a/repository/Neo-JSON-Pharo-Examples.package/monticello.meta/package b/repository/Neo-JSON-Pharo-Examples.package/monticello.meta/package new file mode 100644 index 0000000..77cae7e --- /dev/null +++ b/repository/Neo-JSON-Pharo-Examples.package/monticello.meta/package @@ -0,0 +1 @@ +(name 'Neo-JSON-Pharo-Examples') \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/monticello.meta/version b/repository/Neo-JSON-Pharo-Examples.package/monticello.meta/version new file mode 100644 index 0000000..0e8e8dd --- /dev/null +++ b/repository/Neo-JSON-Pharo-Examples.package/monticello.meta/version @@ -0,0 +1 @@ +(name 'Neo-JSON-Pharo-Examples-marianopeck.1' message 'Put together some demo/examples of NeoJSON' id '82708788-d720-0d00-8337-ea5305c229b0' date '5 February 2018' time '8:59:37.873793 am' author 'marianopeck' ancestors () stepChildren ()) \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/properties.json b/repository/Neo-JSON-Pharo-Examples.package/properties.json new file mode 100644 index 0000000..6f31cf5 --- /dev/null +++ b/repository/Neo-JSON-Pharo-Examples.package/properties.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Tests.package/.filetree b/repository/Neo-JSON-Pharo-Tests.package/.filetree new file mode 100644 index 0000000..57a6797 --- /dev/null +++ b/repository/Neo-JSON-Pharo-Tests.package/.filetree @@ -0,0 +1,5 @@ +{ + "separateMethodMetaAndSource" : false, + "noMethodMetaData" : true, + "useCypressPropertiesFile" : true +} \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Tests.package/monticello.meta/categories.st b/repository/Neo-JSON-Pharo-Tests.package/monticello.meta/categories.st new file mode 100644 index 0000000..988a032 --- /dev/null +++ b/repository/Neo-JSON-Pharo-Tests.package/monticello.meta/categories.st @@ -0,0 +1 @@ +SystemOrganization addCategory: #'Neo-JSON-Pharo-Tests'! diff --git a/repository/Neo-JSON-Pharo-Tests.package/monticello.meta/initializers.st b/repository/Neo-JSON-Pharo-Tests.package/monticello.meta/initializers.st new file mode 100644 index 0000000..e69de29 diff --git a/repository/Neo-JSON-Pharo-Tests.package/monticello.meta/package b/repository/Neo-JSON-Pharo-Tests.package/monticello.meta/package new file mode 100644 index 0000000..ee5d128 --- /dev/null +++ b/repository/Neo-JSON-Pharo-Tests.package/monticello.meta/package @@ -0,0 +1 @@ +(name 'Neo-JSON-Pharo-Tests') \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Tests.package/monticello.meta/version b/repository/Neo-JSON-Pharo-Tests.package/monticello.meta/version new file mode 100644 index 0000000..6fbd4c7 --- /dev/null +++ b/repository/Neo-JSON-Pharo-Tests.package/monticello.meta/version @@ -0,0 +1 @@ +(name 'Neo-JSON-Pharo-Tests-marianopeck.3' message '* Avoid the #includesSubString: and provide another approach so that includesSubstring: can work with Pharo and VAST. Also fixed the tests calling it. ' id '9a54fa79-eb20-0d00-8082-a67007903797' date '6 February 2018' time '8:47:13.090945 am' author 'marianopeck' ancestors ((name 'Neo-JSON-Pharo-Tests-marianopeck.2' message 'Added includesSubString: (to be removed soon I hope)' id '8b1fc1bd-7920-0d00-bd68-70c50307cbab' date '31 January 2018' time '5:05:43.920782 pm' author 'marianopeck' ancestors ((name 'Neo-JSON-Pharo-Tests-marianopeck.1' message 'Nothing to customize for Pharo for the moment' id '01ff35b6-6120-0d00-a477-a9d80e1160ba' date '30 January 2018' time '12:25:38.147284 pm' author 'marianopeck' ancestors () stepChildren ())) stepChildren ())) stepChildren ()) \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Tests.package/properties.json b/repository/Neo-JSON-Pharo-Tests.package/properties.json new file mode 100644 index 0000000..6f31cf5 --- /dev/null +++ b/repository/Neo-JSON-Pharo-Tests.package/properties.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/.filetree b/repository/Neo-JSON-Tests.package/.filetree index 8998102..57a6797 100644 --- a/repository/Neo-JSON-Tests.package/.filetree +++ b/repository/Neo-JSON-Tests.package/.filetree @@ -1,4 +1,5 @@ { - "noMethodMetaData" : true, "separateMethodMetaAndSource" : false, - "useCypressPropertiesFile" : true } + "noMethodMetaData" : true, + "useCypressPropertiesFile" : true +} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONBenchmark.class/methodProperties.json b/repository/Neo-JSON-Tests.package/NeoJSONBenchmark.class/methodProperties.json index 7c23f92..e1f5735 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONBenchmark.class/methodProperties.json +++ b/repository/Neo-JSON-Tests.package/NeoJSONBenchmark.class/methodProperties.json @@ -1,8 +1,9 @@ { - "class" : { - }, "instance" : { "initialize" : "SvenVanCaekenberghe 6/4/2012 18:49", - "read" : "SvenVanCaekenberghe 6/4/2012 17:02", + "writePrettyPrintedRead" : "SvenVanCaekenberghe 6/6/2012 15:07", "write" : "SvenVanCaekenberghe 6/4/2012 17:26", - "writePrettyPrintedRead" : "SvenVanCaekenberghe 6/6/2012 15:07" } } + "read" : "SvenVanCaekenberghe 6/4/2012 17:02" + }, + "class" : { } +} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONBenchmark.class/properties.json b/repository/Neo-JSON-Tests.package/NeoJSONBenchmark.class/properties.json index 99b98a0..9d9ada7 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONBenchmark.class/properties.json +++ b/repository/Neo-JSON-Tests.package/NeoJSONBenchmark.class/properties.json @@ -1,15 +1,14 @@ { - "category" : "Neo-JSON-Tests", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "SvenVanCaekenberghe 6/5/2012 09:48", + "super" : "Object", + "category" : "Neo-JSON-Tests", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ "objects", - "json" ], + "json" + ], "name" : "NeoJSONBenchmark", - "pools" : [ - ], - "super" : "Object", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/methodProperties.json b/repository/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/methodProperties.json index 9fd029a..994676a 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/methodProperties.json +++ b/repository/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/methodProperties.json @@ -1,8 +1,9 @@ { - "class" : { - }, "instance" : { - "testObject2" : "SvenVanCaekenberghe 6/10/2012 20:20", "testPrettyPrinted" : "SvenVanCaekenberghe 1/15/2014 19:29", "testRead" : "SvenVanCaekenberghe 1/15/2014 19:30", - "testWrite" : "SvenVanCaekenberghe 1/15/2014 19:30" } } + "testWrite" : "SvenVanCaekenberghe 1/15/2014 19:30", + "testObject2" : "SvenVanCaekenberghe 6/10/2012 20:20" + }, + "class" : { } +} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/properties.json b/repository/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/properties.json index 384696e..5316750 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/properties.json +++ b/repository/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/properties.json @@ -1,14 +1,11 @@ { - "category" : "Neo-JSON-Tests", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "SvenVanCaekenberghe 6/5/2012 10:05", - "instvars" : [ - ], - "name" : "NeoJSONBenchmarkTests", - "pools" : [ - ], "super" : "TestCase", - "type" : "normal" } + "category" : "Neo-JSON-Tests", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "NeoJSONBenchmarkTests", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/README.md b/repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/README.md new file mode 100644 index 0000000..beb1b09 --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/README.md @@ -0,0 +1 @@ +NeoJSONExamplesTests runs a couple of examples as tests \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testPoints.st b/repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testPoints.st new file mode 100644 index 0000000..9a85d33 --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testPoints.st @@ -0,0 +1,33 @@ +tests +testPoints + | points json result | + + points := Array with: 1@2 with: 3@4 with: 5@6. + + json := String streamContents: [ :out | + (NeoJSONWriter on: out) + prettyPrint: true; + mapInstVarsFor: Point; + nextPut: points ]. + + result := (NeoJSONReader on: json readStream) + mapInstVarsFor: Point; + for: #ListOfPoints customDo: [ :mapping | + mapping listOfElementSchema: Point ]; + nextAs: #ListOfPoints. + + self assert: result equals: points. + + result := (NeoJSONReader on: json readStream) + mapInstVarsFor: Point; + nextListAs: Point. + + self assert: result equals: points. + + result := (NeoJSONReader on: json readStream) + mapInstVarsFor: Point; + for: #OrderedCollectionOfPoints customDo: [ :mapping | + mapping listOfType: OrderedCollection andElementSchema: Point ]; + nextAs: #OrderedCollectionOfPoints. + + self assert: result equals: points asOrderedCollection. \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testRectanglePoints.st b/repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testRectanglePoints.st new file mode 100644 index 0000000..76cc28e --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testRectanglePoints.st @@ -0,0 +1,29 @@ +tests +testRectanglePoints + | rectangle rectangleJson result | + + rectangle := Rectangle origin: 3 @ 4 extent: 5 @ 6. + + rectangleJson := String streamContents: [ :stream | + (NeoJSONWriter on: stream) + prettyPrint: true; + mapInstVarsFor: Point; + mapInstVarsFor: Rectangle; + nextPut: rectangle ]. + + result := (NeoJSONReader on: rectangleJson readStream) + mapInstVarsFor: Point; + for: Rectangle do: [ :mapping | + (mapping mapInstVar: #origin) valueSchema: Point. + (mapping mapInstVar: #corner) valueSchema: Point ]; + nextAs: Rectangle. + + self assert: result equals: rectangle. + + result := (NeoJSONReader on: rectangleJson readStream) + mapInstVarsFor: Point; + for: Rectangle do: [ :mapping | + mapping mapInstVars do: [ :each | each valueSchema: Point ] ]; + nextAs: Rectangle. + + self assert: result equals: rectangle \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testRectanglePointsWithNils.st b/repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testRectanglePointsWithNils.st new file mode 100644 index 0000000..7011122 --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testRectanglePointsWithNils.st @@ -0,0 +1,23 @@ +tests +testRectanglePointsWithNils + self + assert: + (String streamContents: [ :stream | + (NeoJSONWriter on: stream) + for: Point do: [ :mapping | mapping mapAllInstVars ]; + for: Rectangle do: [ :mapping | + (mapping mapInstVar: #origin) valueSchema: Point. + (mapping mapInstVar: #corner) valueSchema: Point ]; + nextPut: Rectangle new ]) + equals: '{}'. + self + assert: + (String streamContents: [ :stream | + (NeoJSONWriter on: stream) + for: Point do: [ :mapping | mapping mapAllInstVars ]; + for: Rectangle do: [ :mapping | + (mapping mapInstVar: #origin) valueSchema: Point. + (mapping mapInstVar: #corner) valueSchema: Point ]; + writeNil: true; + nextPut: Rectangle new ]) + equals: '{"origin":null,"corner":null}'. \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/methodProperties.json b/repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/methodProperties.json new file mode 100644 index 0000000..5083f3b --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/methodProperties.json @@ -0,0 +1,8 @@ +{ + "instance" : { + "testPoints" : "marianopeck 1/30/2018 13:05", + "testRectanglePoints" : "SvenVanCaekenberghe 7/6/2017 09:56", + "testRectanglePointsWithNils" : "SvenVanCaekenberghe 11/13/2017 18:51" + }, + "class" : { } +} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/properties.json b/repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/properties.json new file mode 100644 index 0000000..c6e329a --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "SvenVanCaekenberghe 7/6/2017 09:50", + "super" : "TestCase", + "category" : "Neo-JSON-Tests", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "NeoJSONExamplesTests", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/README.md b/repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/README.md new file mode 100644 index 0000000..0247a5d --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/README.md @@ -0,0 +1 @@ +I am NeoJSONMappingTests, testing more exotic kinds of mapping constructs. \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/instance/testDynamicTyping.st b/repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/instance/testDynamicTyping.st new file mode 100644 index 0000000..b42066a --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/instance/testDynamicTyping.st @@ -0,0 +1,25 @@ +testing +testDynamicTyping + | data customMapping json result | + data := Array with: 'foo'->1 with: #('foo' 2). + "The idea is to map a key value combination as either a classic association or a simple pair, + using key & value properties as well as a type property to distinguish between the two" + customMapping := [ :mapper | + mapper + for: #AssocOrPair customDo: [ :mapping | + mapping + encoder: [ :x | + x isArray + ifTrue: [ Dictionary new at: 'type' put: 'pair'; at: 'key' put: x first; at: 'value' put: x second; yourself ] + ifFalse: [ Dictionary new at: 'type' put: 'assoc'; at: 'key' put: x key; at: 'value' put: x value; yourself ] ]; + decoder: [ :x | + (x at: 'type') = 'pair' + ifTrue: [ Array with: (x at: 'key') with: (x at: 'value') ] + ifFalse: [ (x at: 'key') -> (x at: 'value')] ] ]; + for: #ArrayOfAssocOrPair customDo: [ :mapping | + mapping listOfType: Array andElementSchema: #AssocOrPair ]; + yourself ]. + json := String streamContents: [ :out | + (customMapping value: (NeoJSONWriter on: out)) nextPut: data as: #ArrayOfAssocOrPair ]. + result := (customMapping value: (NeoJSONReader on: json readStream)) nextAs: #ArrayOfAssocOrPair. + self assert: result equals: data \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/instance/testSymbolOrStringInstVarMapping.st b/repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/instance/testSymbolOrStringInstVarMapping.st new file mode 100644 index 0000000..cb8d8b9 --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/instance/testSymbolOrStringInstVarMapping.st @@ -0,0 +1,20 @@ +testing +testSymbolOrStringInstVarMapping + | data out1 out2 result1 result2 | + data := Array with: 1@2 with: 3@4. + out1 := String streamContents: [ :out | + (NeoJSONWriter on: out) + for: Point do: [ :mapping | mapping mapInstVars: #(x y) ]; + nextPut: data ]. + result1 := (NeoJSONReader on: out1 readStream) + for: Point do: [ :mapping | mapping mapInstVars: #(x y) ]; + nextListAs: Point. + self assert: result1 equals: data. + out2 := String streamContents: [ :out | + (NeoJSONWriter on: out) + for: Point do: [ :mapping | mapping mapInstVars: #('x' 'y') ]; + nextPut: data ]. + result2 := (NeoJSONReader on: out1 readStream) + for: Point do: [ :mapping | mapping mapInstVars: #('x' 'y') ]; + nextListAs: Point. + self assert: result2 equals: data \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/instance/testVirtualTransferObject.st b/repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/instance/testVirtualTransferObject.st new file mode 100644 index 0000000..7a8713c --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/instance/testVirtualTransferObject.st @@ -0,0 +1,27 @@ +testing +testVirtualTransferObject + | data customMapping extraJson json result | + data := NeoJSONObject new data: (Array with: 1@1 with: 2@2). + extraJson := '{"foo":1,"data":[{"x":1,"y":1},{"x":2,"y":2,"z":-1}]}'. + "The idea here is that we are not interested in the top level object just in its data property, + which should be of a specific type, hence we create a virtual transfer object" + customMapping := [ :mapper | + mapper + for: Point do: [ :mapping | + mapping mapInstVars: #(x y) ]; + for: #ArrayOfPoints customDo: [ :mapping | + mapping listOfElementSchema: Point ]; + for: #TransferObject do: [ :mapping | + mapping subjectClass: NeoJSONObject. + (mapping mapAccessor: #data) valueSchema: #ArrayOfPoints ]; + yourself ]. + "By using NeoJSONObject accessors (#data & #data:) are translated to generic #at:[put:] messages. + A longer alternative is + (mapping mapProperty: #data getter: [ :obj | obj at: #data ] setter: [ :obj :x | obj at: #data put: x]) valueSchema: #ArrayOfPoints + where the blocks give you the flexibility to use a plain Dictionary for example" + result := (customMapping value: (NeoJSONReader on: extraJson readStream)) nextAs: #TransferObject. + self assert: result equals: data. + json := String streamContents: [ :out | + (customMapping value: (NeoJSONWriter on: out)) nextPut: data as: #TransferObject ]. + result := (customMapping value: (NeoJSONReader on: json readStream)) nextAs: #TransferObject. + self assert: result equals: data \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/methodProperties.json b/repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/methodProperties.json new file mode 100644 index 0000000..ee8b697 --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/methodProperties.json @@ -0,0 +1,8 @@ +{ + "instance" : { + "testVirtualTransferObject" : "marianopeck 1/30/2018 13:07", + "testSymbolOrStringInstVarMapping" : "SvenVanCaekenberghe 2/6/2018 17:38", + "testDynamicTyping" : "marianopeck 1/31/2018 09:05" + }, + "class" : { } +} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/properties.json b/repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/properties.json new file mode 100644 index 0000000..d2bb2f5 --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "SvenVanCaekenberghe 9/22/2017 15:07", + "super" : "TestCase", + "category" : "Neo-JSON-Tests", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "NeoJSONMappingTests", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/methodProperties.json b/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/methodProperties.json index 09b61fb..fec0e7e 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/methodProperties.json +++ b/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/methodProperties.json @@ -1,13 +1,16 @@ { - "class" : { - "on:" : "SvenVanCaekenberghe 6/13/2012 16:25" }, "instance" : { - "atEnd" : "SvenVanCaekenberghe 6/13/2012 16:23", - "close" : "SvenVanCaekenberghe 6/13/2012 16:23", - "next" : "SvenVanCaekenberghe 6/13/2012 16:22", "nextPut:" : "SvenVanCaekenberghe 6/13/2012 16:23", "nextPutAll:" : "SvenVanCaekenberghe 6/13/2012 16:23", + "close" : "SvenVanCaekenberghe 6/13/2012 16:23", + "next" : "SvenVanCaekenberghe 6/13/2012 16:22", "peek" : "SvenVanCaekenberghe 6/13/2012 16:22", - "peekFor:" : "SvenVanCaekenberghe 12/3/2012 10:53", "space" : "SvenVanCaekenberghe 6/13/2012 16:23", - "stream:" : "SvenVanCaekenberghe 6/13/2012 16:22" } } + "peekFor:" : "SvenVanCaekenberghe 12/3/2012 10:53", + "stream:" : "SvenVanCaekenberghe 6/13/2012 16:22", + "atEnd" : "SvenVanCaekenberghe 6/13/2012 16:23" + }, + "class" : { + "on:" : "SvenVanCaekenberghe 6/13/2012 16:25" + } +} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/properties.json b/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/properties.json index 733f178..0cc8a01 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/properties.json +++ b/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/properties.json @@ -1,14 +1,13 @@ { - "category" : "Neo-JSON-Tests", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "", + "super" : "Object", + "category" : "Neo-JSON-Tests", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ - "stream" ], + "stream" + ], "name" : "NeoJSONMockStream", - "pools" : [ - ], - "super" : "Object", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testAtPath.st b/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testAtPath.st new file mode 100644 index 0000000..79ed9dd --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testAtPath.st @@ -0,0 +1,17 @@ +testing +testAtPath + | object | + object := NeoJSONObject newFrom: (Array with: #one -> ( NeoJSONObject newFrom: (Array with: #two -> ( NeoJSONObject newFrom: (Array with: #three -> 42) ) ) )). + self assert: (object atPath: #(one two three)) equals: 42. + self assert: (object atPath: #(one two three)) equals: object one two three. + self assert: (object atPath: #(missing)) equals: nil. + self assert: (object atPath: #(one missing)) equals: nil. + self assert: (object atPath: #(one two missing)) equals: nil. + self assert: (object atPath: #(one two missing)) equals: object one two missing. + + object := NeoJSONObject newFrom: (Array with: #foo -> 42). + self assert: (object atPath: #(foo)) equals: 42. + self assert: (object atPath: #(foo)) equals: object foo. + self assert: (object atPath: #(foo)) equals: (object at: #foo). + self assert: (object atPath: #()) equals: object. + diff --git a/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testAtPathPut.st b/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testAtPathPut.st new file mode 100644 index 0000000..bcdbb21 --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testAtPathPut.st @@ -0,0 +1,20 @@ +testing +testAtPathPut + | object | + object := NeoJSONObject new. + object atPath: #(one test) put: 42. + self assert: (object atPath: #(one test)) equals: 42. + self assert: object one test equals: 42. + object atPath: #(one two three) put: #foo. + self assert: (object atPath: #(one two three)) equals: #foo. + self assert: object one two three equals: #foo. + object atPath: #(one two threeBis) put: #bar. + self assert: (object atPath: #(one two threeBis)) equals: #bar. + self assert: object one two threeBis equals: #bar. + + self assert: object foo isNil. + self assert: (object atPath: #() put: 1) equals: object. + self assert: (object atPath: #(foo) put: 1) equals: 1. + self assert: (object atPath: #(foo)) equals: 1. + self assert: object foo equals: 1 + diff --git a/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testJSON.st b/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testJSON.st index 3ca2a0f..3cb012f 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testJSON.st +++ b/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testJSON.st @@ -1,7 +1,7 @@ testing testJSON | data json object | - data := { #foo->1. #bar->2. #str->'Str!'. #bool->true. #flt->1.5 } as: NeoJSONObject. + data := NeoJSONObject newFrom: (Array with: #foo->1 with: #bar->2 with: #str->'Str!' with: #bool->true with: #flt->1.5). json := NeoJSONWriter toString: data . object := NeoJSONObject fromString: json. self assert: object class equals: NeoJSONObject. diff --git a/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/methodProperties.json b/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/methodProperties.json index 466bdcf..4329245 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/methodProperties.json +++ b/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/methodProperties.json @@ -1,6 +1,9 @@ { - "class" : { - }, "instance" : { + "testAtPathPut" : "SvenVanCaekenberghe 4/26/2017 16:17", + "testAtPath" : "marianopeck 1/31/2018 11:13", "testCRUD" : "SvenVanCaekenberghe 9/8/2014 12:39", - "testJSON" : "SvenVanCaekenberghe 11/25/2015 09:19" } } + "testJSON" : "marianopeck 1/31/2018 11:13" + }, + "class" : { } +} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/properties.json b/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/properties.json index c5f8809..2ea00eb 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/properties.json +++ b/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/properties.json @@ -1,14 +1,11 @@ { - "category" : "Neo-JSON-Tests", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "SvenVanCaekenberghe 9/8/2014 12:39", - "instvars" : [ - ], - "name" : "NeoJSONObjectTests", - "pools" : [ - ], "super" : "TestCase", - "type" : "normal" } + "category" : "Neo-JSON-Tests", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "NeoJSONObjectTests", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testAllowNil.st b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testAllowNil.st index d8b650a..5c19107 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testAllowNil.st +++ b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testAllowNil.st @@ -18,4 +18,4 @@ testAllowNil for: Point do: [ :mapping | mapping allowNil ]; for: #ArrayOfPoints customDo: [ :mapping | mapping listOfElementSchema: Point ]; nextAs: #ArrayOfPoints) - equals: { 1 @ 2. nil. 3 @ -1 }. \ No newline at end of file + equals: (Array with: 1 @ 2 with: nil with: 3 @ -1). \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testArrayOfPoints.st b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testArrayOfPoints.st index 7e8d745..699f257 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testArrayOfPoints.st +++ b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testArrayOfPoints.st @@ -8,6 +8,6 @@ testArrayOfPoints for: #ArrayOfPoints customDo: [ :mapping | mapping listOfElementSchema: Point ]; nextAs: #ArrayOfPoints ]. - self assert: (reader value: '[ { "x":1, "y":2 }, { "x":-1, "y":-2 } ]') equals: { 1@2. -1@ -2 }. + self assert: (reader value: '[ { "x":1, "y":2 }, { "x":-1, "y":-2 } ]') equals: (Array with: 1@2 with: -1@ -2) . self assert: (reader value: '[ ]') equals: #(). - self assert: (reader value: '[ { } ]') equals: { Point new } \ No newline at end of file + self assert: (reader value: '[ { } ]') equals: (Array with: Point new) \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testArrayOfPointsUsingNextListAs.st b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testArrayOfPointsUsingNextListAs.st index 3de946d..8415dea 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testArrayOfPointsUsingNextListAs.st +++ b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testArrayOfPointsUsingNextListAs.st @@ -5,6 +5,6 @@ testArrayOfPointsUsingNextListAs (NeoJSONReader on: string readStream) mapInstVarsFor: Point; nextListAs: Point ]. - self assert: (reader value: '[ { "x":1, "y":2 }, { "y":-2, "x":-1 } ]') equals: { 1@2. -1@ -2 }. + self assert: (reader value: '[ { "x":1, "y":2 }, { "y":-2, "x":-1 } ]') equals: (Array with: 1@2 with: -1@ -2) . self assert: (reader value: '[ ]') equals: #(). - self assert: (reader value: '[ { } ]') equals: { Point new } \ No newline at end of file + self assert: (reader value: '[ { } ]') equals: (Array with: Point new) \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testDate.st b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testDate.st index 7e76dbb..04153bb 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testDate.st +++ b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testDate.st @@ -6,4 +6,4 @@ testDate for: Date customDo: [ :mapping | mapping decoder: [ :string | Date fromString: string ] ]; nextAs: Date ]. - self assert: (reader value: ' "2012-06-08" ') equals: (Date newDay: 8 month: 6 year: 2012) \ No newline at end of file + self assert: (reader value: ' "2012-06-08" ') equals: (Date fromString: '2012-06-08') \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testNonBMPCharacterDecoding.st b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testNonBMPCharacterDecoding.st index 9de3845..5eb5e7b 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testNonBMPCharacterDecoding.st +++ b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testNonBMPCharacterDecoding.st @@ -3,6 +3,6 @@ testNonBMPCharacterDecoding "Characters not in the Basic Multilingual Plane are encoded as a UTF-16 surrogate pair" | string object | - string := String with: 16r1D11E asCharacter. "MUSICAL SYMBOL G CLEF" + string := 16r1D11E asCharacter asString. "MUSICAL SYMBOL G CLEF" object := (NeoJSONReader fromString: '"\uD834\uDD1E"'). self assert: object equals: string \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testOrderedCollectionOfPoints.st b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testOrderedCollectionOfPoints.st index 8a1f6a7..10317dc 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testOrderedCollectionOfPoints.st +++ b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testOrderedCollectionOfPoints.st @@ -8,6 +8,6 @@ testOrderedCollectionOfPoints for: #OrderedCollectionOfPoints customDo: [ :mapping | mapping listOfType: OrderedCollection andElementSchema: Point ]; nextAs: #OrderedCollectionOfPoints ]. - self assert: (reader value: '[ { "x":1, "y":2 }, { "x":-1, "y":-2 } ]') equals: { 1@2. -1@ -2 } asOrderedCollection. + self assert: (reader value: '[ { "x":1, "y":2 }, { "x":-1, "y":-2 } ]') equals: (Array with: 1@2 with: -1@ -2) asOrderedCollection. self assert: (reader value: '[ ]') equals: OrderedCollection new. self assert: (reader value: '[ { } ]') equals: (OrderedCollection with: Point new) \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testParseErrors.st b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testParseErrors.st index 69b9ced..678f055 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testParseErrors.st +++ b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testParseErrors.st @@ -2,4 +2,8 @@ testing testParseErrors self should: [ NeoJSONReader fromString: 'zero' ] raise: NeoJSONParseError. self should: [ NeoJSONReader fromString: '#' ] raise: NeoJSONParseError. - self should: [ NeoJSONReader fromString: '@' ] raise: NeoJSONParseError. \ No newline at end of file + self should: [ NeoJSONReader fromString: '@' ] raise: NeoJSONParseError. + + self should: [ (NeoJSONReader on: '[1,2,3]true' readStream) next; failIfNotAtEnd ] raise: NeoJSONParseError. + self should: [ (NeoJSONReader on: '{"foo":1}"extra"' readStream) next; failIfNotAtEnd ] raise: NeoJSONParseError. + self should: [ (NeoJSONReader on: '[]"extra"' readStream) next; failIfNotAtEnd ] raise: NeoJSONParseError. \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testSmallDictionary.st b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testSmallDictionary.st index d76044c..2b67057 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testSmallDictionary.st +++ b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testSmallDictionary.st @@ -8,7 +8,7 @@ testSmallDictionary next. self assert: map - equals: (smallDictionaryClass new at: #x put: true; at: #y put: false; at: #'key-1' put: 1; yourself). + equals: (smallDictionaryClass new at: 'x' put: true; at: 'y' put: false; at: 'key-1' put: 1; yourself). self assert: map class equals: smallDictionaryClass \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testStrings.st b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testStrings.st index eb34b5e..ce009e2 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testStrings.st +++ b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testStrings.st @@ -6,11 +6,20 @@ testStrings self assert: (reader value: '"foo"') equals: 'foo'. self assert: (reader value: '""') equals: ''. self assert: (reader value: '"Foo BAR"') equals: 'Foo BAR'. + self assert: (reader value: '" foo "') equals: ' foo '. self assert: (reader value: '"\u00E9l\u00E8ve en Fran\u00E7ais"') equals: 'élève en Français'. self assert: (reader value: '"\"\\\/\t\r\n\f\b"') - equals: (String withAll: { - $". $\. $/. Character tab. Character cr. Character lf. Character newPage. Character backspace }). + equals: (String withAll: ( OrderedCollection new + add: $"; + add: $\; + add: $/; + add: Character tab; + add: Character cr; + add: Character lf; + add: Character newPage; + add: Character backspace; + yourself )). self should: [ reader value: '"open' ] raise: NeoJSONParseError. self should: [ reader value: '"\uAA"' ] raise: NeoJSONParseError. self should: [ reader value: '"\uZZ"' ] raise: NeoJSONParseError. diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/methodProperties.json b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/methodProperties.json index 498f003..2c406c9 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/methodProperties.json +++ b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/methodProperties.json @@ -1,32 +1,33 @@ { - "class" : { - }, "instance" : { - "testAllowNil" : "SvenVanCaekenberghe 12/30/2015 12:29", - "testArrayOfPoints" : "SvenVanCaekenberghe 6/12/2012 12:32", - "testArrayOfPointsUsingNextListAs" : "SvenVanCaekenberghe 3/16/2016 10:58", - "testAssociation" : "SvenVanCaekenberghe 6/12/2012 13:18", - "testBooleans" : "SvenVanCaekenberghe 6/13/2012 14:44", - "testByteArray" : "SvenVanCaekenberghe 6/12/2012 12:32", - "testDate" : "SvenVanCaekenberghe 6/12/2012 12:02", - "testDateAndTime" : "SvenVanCaekenberghe 6/12/2012 12:02", - "testFloats" : "SvenVanCaekenberghe 6/2/2012 21:49", - "testIntegers" : "SvenVanCaekenberghe 6/12/2012 16:08", - "testLists" : "SvenVanCaekenberghe 6/12/2012 16:16", - "testMaps" : "SvenVanCaekenberghe 6/12/2012 16:16", - "testNextStringAsHex" : "SvenVanCaekenberghe 3/24/2014 11:58", - "testNonBMPCharacterDecoding" : "SvenVanCaekenberghe 2/24/2016 14:15", "testNull" : "SvenVanCaekenberghe 6/13/2012 14:29", - "testOrderedCollection" : "SvenVanCaekenberghe 6/13/2012 10:18", - "testOrderedCollectionOfPoints" : "SvenVanCaekenberghe 6/12/2012 12:33", - "testParseErrors" : "SvenVanCaekenberghe 6/12/2012 16:01", + "testAssociation" : "SvenVanCaekenberghe 6/12/2012 13:18", + "testNonBMPCharacterDecoding" : "marianopeck 1/31/2018 11:58", + "testStrings" : "marianopeck 1/30/2018 13:01", "testPoint" : "SvenVanCaekenberghe 6/12/2012 15:58", - "testPoint1" : "SvenVanCaekenberghe 6/8/2012 14:04", + "testTime" : "SvenVanCaekenberghe 6/12/2012 12:02", + "testNextStringAsHex" : "SvenVanCaekenberghe 3/24/2014 11:58", + "testMaps" : "SvenVanCaekenberghe 6/12/2012 16:16", + "testLists" : "SvenVanCaekenberghe 6/12/2012 16:16", "testPoint2" : "SvenVanCaekenberghe 6/7/2012 15:23", - "testPoint3" : "SvenVanCaekenberghe 6/8/2012 14:04", + "testSmallDictionary" : "marianopeck 2/1/2018 10:07", + "testByteArray" : "SvenVanCaekenberghe 6/12/2012 12:32", + "testIntegers" : "SvenVanCaekenberghe 6/12/2012 16:08", "testPointUsingAsString" : "SvenVanCaekenberghe 3/24/2014 10:43", + "testArrayOfPointsUsingNextListAs" : "marianopeck 1/30/2018 15:29", + "testDate" : "marianopeck 2/6/2018 09:14", + "testPoint3" : "SvenVanCaekenberghe 6/8/2012 14:04", + "testDateAndTime" : "SvenVanCaekenberghe 6/12/2012 12:02", + "testParseErrors" : "SvenVanCaekenberghe 5/29/2017 11:00", + "testArrayOfPoints" : "marianopeck 1/30/2018 15:28", + "testOrderedCollection" : "SvenVanCaekenberghe 6/13/2012 10:18", "testPropertyNamesAsSymbols" : "SvenVanCaekenberghe 6/13/2012 10:00", - "testSmallDictionary" : "SvenVanCaekenberghe 7/4/2013 18:38", - "testStrings" : "SvenVanCaekenberghe 6/12/2012 16:04", "testSymbol" : "SvenVanCaekenberghe 6/12/2012 12:02", - "testTime" : "SvenVanCaekenberghe 6/12/2012 12:02" } } + "testFloats" : "SvenVanCaekenberghe 6/2/2012 21:49", + "testOrderedCollectionOfPoints" : "marianopeck 1/30/2018 13:04", + "testAllowNil" : "marianopeck 1/30/2018 13:03", + "testPoint1" : "SvenVanCaekenberghe 6/8/2012 14:04", + "testBooleans" : "SvenVanCaekenberghe 6/13/2012 14:44" + }, + "class" : { } +} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/properties.json b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/properties.json index c983efa..bd4606c 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/properties.json +++ b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/properties.json @@ -1,14 +1,11 @@ { - "category" : "Neo-JSON-Tests", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "SvenVanCaekenberghe 6/2/2012 14:02", - "instvars" : [ - ], - "name" : "NeoJSONReaderTests", - "pools" : [ - ], "super" : "TestCase", - "type" : "normal" } + "category" : "Neo-JSON-Tests", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "NeoJSONReaderTests", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/class/example1.st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/class/example1.st index beffb44..ac8135f 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/class/example1.st +++ b/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/class/example1.st @@ -4,6 +4,6 @@ example1 id: 123; name: 'Example1'; timestamp: (DateAndTime year: 2012 month: 06 day: 08 hour: 14 minute: 30 second: 15 offset: 1 hour); - points: { 1@2. 3@4 }; + points: (Array with: 1@2 with: 3@4); bytes: #[ 2 4 6 8 ]; yourself \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/methodProperties.json b/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/methodProperties.json index d5b70d0..32c91c1 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/methodProperties.json +++ b/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/methodProperties.json @@ -1,17 +1,20 @@ { - "class" : { - "example1" : "SvenVanCaekenberghe 6/9/2012 18:06", - "neoJsonMapping:" : "SvenVanCaekenberghe 6/12/2012 12:34" }, "instance" : { - "=" : "SvenVanCaekenberghe 6/9/2012 18:45", "bytes" : "SvenVanCaekenberghe 6/9/2012 18:03", - "bytes:" : "SvenVanCaekenberghe 6/9/2012 18:04", - "hash" : "SvenVanCaekenberghe 6/9/2012 18:46", - "id" : "SvenVanCaekenberghe 6/9/2012 18:02", - "id:" : "SvenVanCaekenberghe 6/9/2012 18:03", "name" : "SvenVanCaekenberghe 6/9/2012 18:02", - "name:" : "SvenVanCaekenberghe 6/9/2012 18:03", - "points" : "SvenVanCaekenberghe 6/9/2012 18:03", + "=" : "SvenVanCaekenberghe 6/9/2012 18:45", + "id" : "SvenVanCaekenberghe 6/9/2012 18:02", "points:" : "SvenVanCaekenberghe 6/9/2012 18:04", + "name:" : "SvenVanCaekenberghe 6/9/2012 18:03", "timestamp" : "SvenVanCaekenberghe 6/9/2012 18:03", - "timestamp:" : "SvenVanCaekenberghe 6/9/2012 18:03" } } + "timestamp:" : "SvenVanCaekenberghe 6/9/2012 18:03", + "id:" : "SvenVanCaekenberghe 6/9/2012 18:03", + "hash" : "SvenVanCaekenberghe 6/9/2012 18:46", + "points" : "SvenVanCaekenberghe 6/9/2012 18:03", + "bytes:" : "SvenVanCaekenberghe 6/9/2012 18:04" + }, + "class" : { + "example1" : "marianopeck 1/30/2018 13:07", + "neoJsonMapping:" : "SvenVanCaekenberghe 6/12/2012 12:34" + } +} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/properties.json b/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/properties.json index 10fb964..a3b54f8 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/properties.json +++ b/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/properties.json @@ -1,18 +1,17 @@ { - "category" : "Neo-JSON-Tests", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "", + "super" : "Object", + "category" : "Neo-JSON-Tests", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ "id", "name", "timestamp", "points", - "bytes" ], + "bytes" + ], "name" : "NeoJSONTestObject1", - "pools" : [ - ], - "super" : "Object", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmark..st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmark..st index 0792ae3..abb3c4b 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmark..st +++ b/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmark..st @@ -7,10 +7,10 @@ benchmark: count size := 2 + (count * (NeoJSONWriter toString: self example1) size) + count - 1. Transcript cr; - << ('Serializing {1} objects took ms ' format: { count }); + << ('Serializing {1} objects took ms ' format: (Array with: count) ); show: [ json := String new: size streamContents: [ :stream | (NeoJSONWriter on: stream) nextPut: collection ] ] timeToRun. Transcript cr; - << ('Deserializing {1} objects took ms ' format: { count }); + << ('Deserializing {1} objects took ms ' format: (Array with: count) ); show: [ NeoJSONReader fromString: json ] timeToRun. \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmarkAsDictionary..st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmarkAsDictionary..st index 20a9f20..38321d7 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmarkAsDictionary..st +++ b/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmarkAsDictionary..st @@ -7,10 +7,10 @@ benchmarkAsDictionary: count size := 2 + (count * (NeoJSONWriter toString: self example1 asDictionary) size) + count - 1. Transcript cr; - << ('Serializing {1} objects took ms ' format: { count }); + << ('Serializing {1} objects took ms ' format: (Array with: count) ); show: [ json := String new: size streamContents: [ :stream | (NeoJSONWriter on: stream) nextPut: collection ] ] timeToRun. Transcript cr; - << ('Deserializing {1} objects took ms ' format: { count }); + << ('Deserializing {1} objects took ms ' format: (Array with: count) ); show: [ NeoJSONReader fromString: json ] timeToRun. \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/methodProperties.json b/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/methodProperties.json index 8ab70f5..c78be30 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/methodProperties.json +++ b/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/methodProperties.json @@ -1,21 +1,24 @@ { - "class" : { - "benchmark10k" : "SvenVanCaekenberghe 6/10/2012 20:53", - "benchmark10kAsDictionary" : "SvenVanCaekenberghe 6/10/2012 20:54", - "benchmark200k" : "SvenVanCaekenberghe 6/10/2012 20:54", - "benchmark:" : "SvenVanCaekenberghe 6/10/2012 20:52", - "benchmarkAsDictionary:" : "SvenVanCaekenberghe 6/10/2012 20:53", - "example1" : "SvenVanCaekenberghe 6/10/2012 20:04", - "neoJsonMapping:" : "SvenVanCaekenberghe 3/22/2014 10:50" }, "instance" : { - "=" : "SvenVanCaekenberghe 6/10/2012 20:22", - "asDictionary" : "SvenVanCaekenberghe 6/10/2012 20:47", "data" : "SvenVanCaekenberghe 6/10/2012 20:04", "data:" : "SvenVanCaekenberghe 6/10/2012 20:04", - "hash" : "SvenVanCaekenberghe 6/10/2012 20:22", - "height" : "SvenVanCaekenberghe 6/10/2012 20:04", - "height:" : "SvenVanCaekenberghe 6/10/2012 20:04", + "width" : "SvenVanCaekenberghe 6/10/2012 20:04", + "=" : "SvenVanCaekenberghe 6/10/2012 20:22", + "asDictionary" : "SvenVanCaekenberghe 6/10/2012 20:47", "id" : "SvenVanCaekenberghe 6/10/2012 20:04", + "height:" : "SvenVanCaekenberghe 6/10/2012 20:04", "id:" : "SvenVanCaekenberghe 6/10/2012 20:04", - "width" : "SvenVanCaekenberghe 6/10/2012 20:04", - "width:" : "SvenVanCaekenberghe 6/10/2012 20:04" } } + "width:" : "SvenVanCaekenberghe 6/10/2012 20:04", + "hash" : "SvenVanCaekenberghe 6/10/2012 20:22", + "height" : "SvenVanCaekenberghe 6/10/2012 20:04" + }, + "class" : { + "benchmark10kAsDictionary" : "SvenVanCaekenberghe 6/10/2012 20:54", + "benchmarkAsDictionary:" : "marianopeck 1/30/2018 13:09", + "benchmark200k" : "SvenVanCaekenberghe 6/10/2012 20:54", + "example1" : "SvenVanCaekenberghe 6/10/2012 20:04", + "neoJsonMapping:" : "SvenVanCaekenberghe 3/22/2014 10:50", + "benchmark:" : "marianopeck 1/30/2018 13:09", + "benchmark10k" : "SvenVanCaekenberghe 6/10/2012 20:53" + } +} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/properties.json b/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/properties.json index 9dbc595..ddde91a 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/properties.json +++ b/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/properties.json @@ -1,17 +1,16 @@ { - "category" : "Neo-JSON-Tests", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "SvenVanCaekenberghe 3/22/2014 09:36", + "super" : "Object", + "category" : "Neo-JSON-Tests", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ "id", "width", "height", - "data" ], + "data" + ], "name" : "NeoJSONTestObject2", - "pools" : [ - ], - "super" : "Object", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/methodProperties.json b/repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/methodProperties.json index 1e56c67..8f4b867 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/methodProperties.json +++ b/repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/methodProperties.json @@ -1,11 +1,14 @@ { - "class" : { - "example1" : "SvenVanCaekenberghe 3/22/2014 09:43", - "neoJsonMapping:" : "SvenVanCaekenberghe 3/22/2014 10:50" }, "instance" : { + "transparent" : "SvenVanCaekenberghe 3/22/2014 09:43", "=" : "SvenVanCaekenberghe 3/22/2014 09:45", + "color:" : "SvenVanCaekenberghe 3/22/2014 09:43", "asDictionary" : "SvenVanCaekenberghe 3/22/2014 09:46", "color" : "SvenVanCaekenberghe 3/22/2014 09:43", - "color:" : "SvenVanCaekenberghe 3/22/2014 09:43", - "transparent" : "SvenVanCaekenberghe 3/22/2014 09:43", - "transparent:" : "SvenVanCaekenberghe 3/22/2014 09:43" } } + "transparent:" : "SvenVanCaekenberghe 3/22/2014 09:43" + }, + "class" : { + "example1" : "SvenVanCaekenberghe 3/22/2014 09:43", + "neoJsonMapping:" : "SvenVanCaekenberghe 3/22/2014 10:50" + } +} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/properties.json b/repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/properties.json index 71cb921..a092988 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/properties.json +++ b/repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/properties.json @@ -1,15 +1,14 @@ { - "category" : "Neo-JSON-Tests", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "SvenVanCaekenberghe 3/22/2014 09:40", + "super" : "NeoJSONTestObject2", + "category" : "Neo-JSON-Tests", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ "color", - "transparent" ], + "transparent" + ], "name" : "NeoJSONTestObject3", - "pools" : [ - ], - "super" : "NeoJSONTestObject2", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/README.md b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/README.md new file mode 100644 index 0000000..57e75e2 --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/README.md @@ -0,0 +1,27 @@ +I am NeoJSONValidation, a set of tests to validate NeoJSON against some external rules. + +Both positive & negative tests are includes. +Some of these are implementation choices. + +http://seriot.ch/parsing_json.php +https://github.com/nst/JSONTestSuite +https://github.com/nst/JSONTestSuite.git + test_parsing + test_transform + +https://github.com/miloyip/nativejson-benchmark +https://github.com/miloyip/nativejson-benchmark.git + data/jsonchecker + data/roundtrip + +This can only be run with the correct setup (checkout/config). + + NeoJSONValidation new runNativeJsonBenchmarkRoundTrip. + NeoJSONValidation new runNativeJsonBenchmarkJsonCheckerPasses. + NeoJSONValidation new runNativeJsonBenchmarkJsonCheckerFailures. + + NeoJSONValidation new runJsonTestSuiteTestParsingPasses. + NeoJSONValidation new runJsonTestSuiteTestParsingFailures. + NeoJSONValidation new runJsonTestSuiteTestParsingInfo. + +Logging goes to a file, neo-json-validation.log \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/closeLog.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/closeLog.st new file mode 100644 index 0000000..7ceefa9 --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/closeLog.st @@ -0,0 +1,8 @@ +private +closeLog + logStream ifNotNil: [ + logStream close. + logStream := nil ]. + ^ self logFile exists + ifTrue: [ self logFile contents ] + ifFalse: [ 'log file is empty' ] \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/ensureLog.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/ensureLog.st new file mode 100644 index 0000000..c8241d6 --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/ensureLog.st @@ -0,0 +1,6 @@ +private +ensureLog + logStream ifNil: [ + logStream := self logFile ensureDelete; writeStream. + logStream setToEnd ] + \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/gitDirectory..st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/gitDirectory..st new file mode 100644 index 0000000..9325c2d --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/gitDirectory..st @@ -0,0 +1,3 @@ +accessing +gitDirectory: fileReference + gitDirectory := fileReference \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/gitDirectory.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/gitDirectory.st new file mode 100644 index 0000000..34c0c12 --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/gitDirectory.st @@ -0,0 +1,3 @@ +accessing +gitDirectory + ^ gitDirectory ifNil: [ gitDirectory := FileLocator home / #Develop / #git ] \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteDirectory.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteDirectory.st new file mode 100644 index 0000000..e82a99d --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteDirectory.st @@ -0,0 +1,3 @@ +accessing +jsonTestSuiteDirectory + ^ self gitDirectory / #JSONTestSuite \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingDirectory.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingDirectory.st new file mode 100644 index 0000000..5a99df0 --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingDirectory.st @@ -0,0 +1,3 @@ +accessing +jsonTestSuiteTestParsingDirectory + ^ self jsonTestSuiteDirectory / 'test_parsing' \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingFailFiles.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingFailFiles.st new file mode 100644 index 0000000..7f4ef80 --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingFailFiles.st @@ -0,0 +1,3 @@ +accessing +jsonTestSuiteTestParsingFailFiles + ^ self jsonTestSuiteTestParsingDirectory childrenMatching: 'n_*.json' \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingInfoFiles.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingInfoFiles.st new file mode 100644 index 0000000..64c9fb9 --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingInfoFiles.st @@ -0,0 +1,3 @@ +accessing +jsonTestSuiteTestParsingInfoFiles + ^ self jsonTestSuiteTestParsingDirectory childrenMatching: 'i_*.json' \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingPassFiles.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingPassFiles.st new file mode 100644 index 0000000..476bb03 --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingPassFiles.st @@ -0,0 +1,3 @@ +accessing +jsonTestSuiteTestParsingPassFiles + ^ self jsonTestSuiteTestParsingDirectory childrenMatching: 'y_*.json' \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestTransformDirectory.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestTransformDirectory.st new file mode 100644 index 0000000..b9a0706 --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestTransformDirectory.st @@ -0,0 +1,3 @@ +accessing +jsonTestSuiteTestTransformDirectory + ^ self jsonTestSuiteDirectory / 'test_transform' \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/log..st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/log..st new file mode 100644 index 0000000..6b806e5 --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/log..st @@ -0,0 +1,4 @@ +private +log: message + self ensureLog. + logStream nextPutAll: message; lf; flush diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/logFile.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/logFile.st new file mode 100644 index 0000000..ba58e23 --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/logFile.st @@ -0,0 +1,3 @@ +private +logFile + ^ 'neo-json-validation.log' asFileReference \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkDataDirectory.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkDataDirectory.st new file mode 100644 index 0000000..211be52 --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkDataDirectory.st @@ -0,0 +1,3 @@ +accessing +nativeJsonBenchmarkDataDirectory + ^ self nativeJsonBenchmarkDirectory / #data \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkDirectory.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkDirectory.st new file mode 100644 index 0000000..dd17440 --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkDirectory.st @@ -0,0 +1,3 @@ +accessing +nativeJsonBenchmarkDirectory + ^ self gitDirectory / 'nativejson-benchmark' \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkJsonCheckerDirectory.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkJsonCheckerDirectory.st new file mode 100644 index 0000000..2bdf04c --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkJsonCheckerDirectory.st @@ -0,0 +1,3 @@ +accessing +nativeJsonBenchmarkJsonCheckerDirectory + ^ self nativeJsonBenchmarkDataDirectory / #jsonchecker \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkJsonCheckerFailFiles.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkJsonCheckerFailFiles.st new file mode 100644 index 0000000..3b7a188 --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkJsonCheckerFailFiles.st @@ -0,0 +1,3 @@ +accessing +nativeJsonBenchmarkJsonCheckerFailFiles + ^ self nativeJsonBenchmarkJsonCheckerDirectory childrenMatching: 'fail*.json' \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkJsonCheckerPassFiles.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkJsonCheckerPassFiles.st new file mode 100644 index 0000000..c1df699 --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkJsonCheckerPassFiles.st @@ -0,0 +1,3 @@ +accessing +nativeJsonBenchmarkJsonCheckerPassFiles + ^ self nativeJsonBenchmarkJsonCheckerDirectory childrenMatching: 'pass*.json' \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkRoundTripDirectory.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkRoundTripDirectory.st new file mode 100644 index 0000000..405b93b --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkRoundTripDirectory.st @@ -0,0 +1,3 @@ +accessing +nativeJsonBenchmarkRoundTripDirectory + ^ self nativeJsonBenchmarkDataDirectory / #roundtrip \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkRoundTripFiles.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkRoundTripFiles.st new file mode 100644 index 0000000..5029c8e --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkRoundTripFiles.st @@ -0,0 +1,3 @@ +accessing +nativeJsonBenchmarkRoundTripFiles + ^ self nativeJsonBenchmarkRoundTripDirectory children \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runJsonTestSuiteTestParsingFailures.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runJsonTestSuiteTestParsingFailures.st new file mode 100644 index 0000000..184c8f7 --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runJsonTestSuiteTestParsingFailures.st @@ -0,0 +1,11 @@ +running +runJsonTestSuiteTestParsingFailures + ^ self + validateFiles: self jsonTestSuiteTestParsingFailFiles + usingTest: [ :file | + | data success | + success := false. + [ data := file readStreamDo: [ :in | (NeoJSONReader on: in) next; failIfNotAtEnd ] ] + on: NeoJSONParseError + do: [ :exception | self log: exception printString. success := true ]. + success ] \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runJsonTestSuiteTestParsingInfo.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runJsonTestSuiteTestParsingInfo.st new file mode 100644 index 0000000..f8455fb --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runJsonTestSuiteTestParsingInfo.st @@ -0,0 +1,11 @@ +running +runJsonTestSuiteTestParsingInfo + ^ self + validateFiles: self jsonTestSuiteTestParsingInfoFiles + usingTest: [ :file | + | data success | + success := true. + [ data := file readStreamDo: [ :in | (NeoJSONReader on: in) next ] ] + on: NeoJSONParseError + do: [ :exception | self log: exception printString. success := false ]. + success ] \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runJsonTestSuiteTestParsingPasses.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runJsonTestSuiteTestParsingPasses.st new file mode 100644 index 0000000..b825c57 --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runJsonTestSuiteTestParsingPasses.st @@ -0,0 +1,11 @@ +running +runJsonTestSuiteTestParsingPasses + ^ self + validateFiles: self jsonTestSuiteTestParsingPassFiles + usingTest: [ :file | + | data success | + success := true. + [ data := file readStreamDo: [ :in | (NeoJSONReader on: in) next ] ] + on: NeoJSONParseError + do: [ :exception | self log: exception printString. success := false ]. + success ] \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runNativeJsonBenchmarkJsonCheckerFailures.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runNativeJsonBenchmarkJsonCheckerFailures.st new file mode 100644 index 0000000..cf2a3fb --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runNativeJsonBenchmarkJsonCheckerFailures.st @@ -0,0 +1,11 @@ +running +runNativeJsonBenchmarkJsonCheckerFailures + ^ self + validateFiles: self nativeJsonBenchmarkJsonCheckerFailFiles + usingTest: [ :file | + | data success | + success := false. + [ data := file readStreamDo: [ :in | (NeoJSONReader on: in) next; failIfNotAtEnd ] ] + on: NeoJSONParseError + do: [ :exception | self log: exception printString. success := true ]. + success ] \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runNativeJsonBenchmarkJsonCheckerPasses.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runNativeJsonBenchmarkJsonCheckerPasses.st new file mode 100644 index 0000000..dd7d42c --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runNativeJsonBenchmarkJsonCheckerPasses.st @@ -0,0 +1,11 @@ +running +runNativeJsonBenchmarkJsonCheckerPasses + ^ self + validateFiles: self nativeJsonBenchmarkJsonCheckerPassFiles + usingTest: [ :file | + | data success | + success := true. + [ data := file readStreamDo: [ :in | (NeoJSONReader on: in) next ] ] + on: NeoJSONParseError + do: [ :exception | self log: exception printString. success := false ]. + success ] \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runNativeJsonBenchmarkRoundTrip.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runNativeJsonBenchmarkRoundTrip.st new file mode 100644 index 0000000..945a380 --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runNativeJsonBenchmarkRoundTrip.st @@ -0,0 +1,9 @@ +running +runNativeJsonBenchmarkRoundTrip + ^ self + validateFiles: self nativeJsonBenchmarkRoundTripFiles + usingTest: [ :file | + | data json | + data := file readStreamDo: [ :in | (NeoJSONReader on: in) next ]. + json := NeoJSONWriter toString: data. + json = file contents ] \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/validateFiles.usingTest..st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/validateFiles.usingTest..st new file mode 100644 index 0000000..4411f84 --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/validateFiles.usingTest..st @@ -0,0 +1,18 @@ +private +validateFiles: files usingTest: block + | total succeeded failed | + total := succeeded := failed := 0. + files do: [ :file | + | success | + self log: 'Running ' , file pathString. + self log: ([ file contents contractTo: 64 ] on: Error do: [ :exception | exception printString ]). + success := [ block value: file ] + on: Error + do: [ :exception | self log: ' Errored. ' , exception printString. false ]. + total := total + 1. + success + ifTrue: [ succeeded := succeeded + 1 ] + ifFalse: [ failed := failed + 1 ]. + self log: (success ifTrue: [ ' Succeeded' ] ifFalse: [ ' Failed' ]); log: '' ]. + self log: ('{1} total = {2} succeeded + {3} failed' format: (Array with: total with: succeeded with: failed) ). + ^ self closeLog \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/methodProperties.json b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/methodProperties.json new file mode 100644 index 0000000..c7d1706 --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/methodProperties.json @@ -0,0 +1,31 @@ +{ + "instance" : { + "nativeJsonBenchmarkDirectory" : "SvenVanCaekenberghe 5/28/2017 11:28", + "nativeJsonBenchmarkRoundTripFiles" : "SvenVanCaekenberghe 5/28/2017 11:34", + "jsonTestSuiteTestParsingDirectory" : "SvenVanCaekenberghe 5/28/2017 11:27", + "nativeJsonBenchmarkJsonCheckerDirectory" : "SvenVanCaekenberghe 5/28/2017 11:29", + "gitDirectory:" : "SvenVanCaekenberghe 5/28/2017 11:23", + "jsonTestSuiteTestParsingFailFiles" : "SvenVanCaekenberghe 5/28/2017 13:50", + "runJsonTestSuiteTestParsingPasses" : "SvenVanCaekenberghe 5/29/2017 09:25", + "nativeJsonBenchmarkDataDirectory" : "SvenVanCaekenberghe 5/28/2017 11:28", + "jsonTestSuiteTestParsingPassFiles" : "SvenVanCaekenberghe 5/28/2017 13:50", + "gitDirectory" : "SvenVanCaekenberghe 5/28/2017 11:25", + "ensureLog" : "SvenVanCaekenberghe 5/29/2017 09:27", + "runJsonTestSuiteTestParsingFailures" : "SvenVanCaekenberghe 5/29/2017 09:57", + "closeLog" : "SvenVanCaekenberghe 5/29/2017 09:28", + "runNativeJsonBenchmarkRoundTrip" : "SvenVanCaekenberghe 5/29/2017 09:25", + "logFile" : "SvenVanCaekenberghe 5/29/2017 09:26", + "jsonTestSuiteDirectory" : "SvenVanCaekenberghe 5/28/2017 11:26", + "nativeJsonBenchmarkRoundTripDirectory" : "SvenVanCaekenberghe 5/28/2017 11:29", + "log:" : "SvenVanCaekenberghe 5/29/2017 09:25", + "validateFiles:usingTest:" : "marianopeck 1/30/2018 13:21", + "jsonTestSuiteTestParsingInfoFiles" : "SvenVanCaekenberghe 5/28/2017 13:50", + "jsonTestSuiteTestTransformDirectory" : "SvenVanCaekenberghe 5/28/2017 11:27", + "runNativeJsonBenchmarkJsonCheckerPasses" : "SvenVanCaekenberghe 5/29/2017 09:25", + "nativeJsonBenchmarkJsonCheckerFailFiles" : "SvenVanCaekenberghe 5/28/2017 12:05", + "runJsonTestSuiteTestParsingInfo" : "SvenVanCaekenberghe 5/29/2017 09:25", + "runNativeJsonBenchmarkJsonCheckerFailures" : "SvenVanCaekenberghe 5/29/2017 09:40", + "nativeJsonBenchmarkJsonCheckerPassFiles" : "SvenVanCaekenberghe 5/28/2017 12:05" + }, + "class" : { } +} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/properties.json b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/properties.json new file mode 100644 index 0000000..e54b230 --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/properties.json @@ -0,0 +1,14 @@ +{ + "commentStamp" : "SvenVanCaekenberghe 5/28/2017 16:40", + "super" : "Object", + "category" : "Neo-JSON-Tests", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ + "gitDirectory", + "logStream" + ], + "name" : "NeoJSONValidation", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/README.md b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/README.md new file mode 100644 index 0000000..f24c05e --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/README.md @@ -0,0 +1 @@ +I am NeoJSONWriteReadAsciiOnlyTests. \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/instance/writeRead..st b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/instance/writeRead..st new file mode 100644 index 0000000..3b0a09c --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/instance/writeRead..st @@ -0,0 +1,6 @@ +private +writeRead: object + | json | + json := String streamContents: [ :stream | + (NeoJSONWriter on: stream) asciiOnly: true; nextPut: object ]. + ^ (NeoJSONReader on: json readStream) next \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/methodProperties.json b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/methodProperties.json new file mode 100644 index 0000000..e1f79d9 --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/methodProperties.json @@ -0,0 +1,6 @@ +{ + "instance" : { + "writeRead:" : "SvenVanCaekenberghe 11/24/2016 10:03" + }, + "class" : { } +} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/properties.json b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/properties.json new file mode 100644 index 0000000..53a8fe4 --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "SvenVanCaekenberghe 11/24/2016 10:07", + "super" : "NeoJSONWriteReadTests", + "category" : "Neo-JSON-Tests", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "NeoJSONWriteReadAsciiOnlyTests", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadMockStreamTests.class/README.md b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadMockStreamTests.class/README.md index e69de29..4af70f7 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadMockStreamTests.class/README.md +++ b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadMockStreamTests.class/README.md @@ -0,0 +1 @@ +I am NeoJSONWriteReadMockStreamTests. \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadMockStreamTests.class/methodProperties.json b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadMockStreamTests.class/methodProperties.json index adfdccc..2eef100 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadMockStreamTests.class/methodProperties.json +++ b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadMockStreamTests.class/methodProperties.json @@ -1,5 +1,6 @@ { - "class" : { - }, "instance" : { - "writeRead:" : "SvenVanCaekenberghe 6/13/2012 16:28" } } + "writeRead:" : "SvenVanCaekenberghe 6/13/2012 16:28" + }, + "class" : { } +} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadMockStreamTests.class/properties.json b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadMockStreamTests.class/properties.json index f6dfe39..8ac1a7b 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadMockStreamTests.class/properties.json +++ b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadMockStreamTests.class/properties.json @@ -1,14 +1,11 @@ { + "commentStamp" : "SvenVanCaekenberghe 11/24/2016 10:07", + "super" : "NeoJSONWriteReadTests", "category" : "Neo-JSON-Tests", - "classinstvars" : [ - ], - "classvars" : [ - ], - "commentStamp" : "", - "instvars" : [ - ], + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], "name" : "NeoJSONWriteReadMockStreamTests", - "pools" : [ - ], - "super" : "NeoJSONWriteReadTests", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/testDictionaryOfObject2.st b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/testDictionaryOfObject2.st index 81ac90e..228293d 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/testDictionaryOfObject2.st +++ b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/testDictionaryOfObject2.st @@ -3,8 +3,8 @@ testDictionaryOfObject2 | data json reader | data := Dictionary new. data - at: #one put: NeoJSONTestObject2 example1; - at: #two put: NeoJSONTestObject2 example1. + at: 'one' put: NeoJSONTestObject2 example1; + at: 'two' put: NeoJSONTestObject2 example1. json := NeoJSONWriter toStringPretty: data. reader := NeoJSONReader on: json readStream. reader for: #DictionaryOfObject2 customDo: [ :mapping | diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/methodProperties.json b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/methodProperties.json index 1dc3caa..5b73cbd 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/methodProperties.json +++ b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/methodProperties.json @@ -1,9 +1,10 @@ { - "class" : { - }, "instance" : { - "testDictionaryOfObject2" : "SvenVanCaekenberghe 8/30/2013 11:05", - "testObject1" : "SvenVanCaekenberghe 6/9/2012 18:49", "testObject2" : "SvenVanCaekenberghe 8/30/2013 11:05", + "testDictionaryOfObject2" : "marianopeck 2/1/2018 09:39", + "writeRead:" : "SvenVanCaekenberghe 6/4/2012 15:45", "testObject3" : "SvenVanCaekenberghe 3/22/2014 10:59", - "writeRead:" : "SvenVanCaekenberghe 6/4/2012 15:45" } } + "testObject1" : "SvenVanCaekenberghe 6/9/2012 18:49" + }, + "class" : { } +} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/properties.json b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/properties.json index 5a98984..39913a2 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/properties.json +++ b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/properties.json @@ -1,14 +1,11 @@ { - "category" : "Neo-JSON-Tests", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "SvenVanCaekenberghe 6/5/2012 09:50", - "instvars" : [ - ], - "name" : "NeoJSONWriteReadPrettyPrintedTests", - "pools" : [ - ], "super" : "NeoJSONWriteReadTests", - "type" : "normal" } + "category" : "Neo-JSON-Tests", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "NeoJSONWriteReadPrettyPrintedTests", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testDictionaryOfObject2.st b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testDictionaryOfObject2.st index 6a65b67..822240f 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testDictionaryOfObject2.st +++ b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testDictionaryOfObject2.st @@ -3,8 +3,8 @@ testDictionaryOfObject2 | data json reader | data := Dictionary new. data - at: #one put: NeoJSONTestObject2 example1; - at: #two put: NeoJSONTestObject2 example1. + at: 'one' put: NeoJSONTestObject2 example1; + at: 'two' put: NeoJSONTestObject2 example1. json := NeoJSONWriter toString: data. reader := NeoJSONReader on: json readStream. reader for: #DictionaryOfObject2 customDo: [ :mapping | diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testFloats.st b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testFloats.st index 92e0e2d..1143b92 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testFloats.st +++ b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testFloats.st @@ -1,7 +1,7 @@ testing testFloats | objects | - objects := { Float pi . 1.0 . -1.0 . 0.0 . 1.5e6 . -1.5e6 . 1.5e-6 . -1.5e-6 }. + objects := OrderedCollection new add: Float pi; add: 1.0; add: -1.0; add: 0.0; add: 1.5e6; add: -1.5e6; add: 1.5e-6; add: -1.5e-6; yourself. (self writeRead: objects) with: objects do: [ :first :second | self assert: (first closeTo: second) ] \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testIntegers.st b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testIntegers.st index 90c38de..48d1824 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testIntegers.st +++ b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testIntegers.st @@ -1,7 +1,7 @@ testing testIntegers | objects | - objects := { 1. -1. 0. 123467890. -1234567890 }. + objects := Array with: 1 with: -1 with: 0 with: 123467890 with: -1234567890. self assert: (self writeRead: objects) equals: objects \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testLists.st b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testLists.st index c038965..8018686 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testLists.st +++ b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testLists.st @@ -1,7 +1,7 @@ testing testLists | objects | - objects := { #(1 2 3). #(). #( 'foo' 'bar') }. + objects := Array with: #(1 2 3) with: #() with: #( 'foo' 'bar'). self assert: (self writeRead: objects) equals: objects \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testMaps.st b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testMaps.st index 2f644a6..41b6c5d 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testMaps.st +++ b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testMaps.st @@ -1,10 +1,10 @@ testing testMaps | objects | - objects := { - Dictionary new. - Dictionary with: 'x' -> 1. - Dictionary newFromPairs: #( 'foo' true 'bar' false 'zero' 0 'null' nil 'string' 'Hello World!' ) }. + objects := Array + with: Dictionary new + with: (Dictionary with: 'x' -> 1) + with: (Dictionary newFromPairs: #( 'foo' true 'bar' false 'zero' 0 'null' nil 'string' 'Hello World!' )). self assert: (self writeRead: objects) equals: objects \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testSpecials.st b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testSpecials.st index 561a30b..251ed3d 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testSpecials.st +++ b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testSpecials.st @@ -1,7 +1,7 @@ testing testSpecials | objects | - objects := { true. false. nil }. + objects := Array with: true with: false with: nil. self assert: (self writeRead: objects) equals: objects \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testStrings.st b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testStrings.st index ece5034..6ebeaff 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testStrings.st +++ b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testStrings.st @@ -1,7 +1,12 @@ testing testStrings | objects | - objects := { 'foo'. 'Foo BAR'. ''. ' \\'''. 'élève en Français' }. + objects := OrderedCollection new + add: 'foo'; add: 'Foo BAR'; add: ''; add: ' \\'''; + add: 'élève en Français'; + add: (Character codePoint: 12354) asString; "HIRAGANA LETTER A" + yourself; + asArray. self assert: (self writeRead: objects) equals: objects \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/methodProperties.json b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/methodProperties.json index 90c9647..1fa0562 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/methodProperties.json +++ b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/methodProperties.json @@ -1,15 +1,16 @@ { - "class" : { - }, "instance" : { - "testDictionaryOfObject2" : "SvenVanCaekenberghe 8/30/2013 11:03", - "testFloats" : "SvenVanCaekenberghe 6/4/2012 15:51", - "testIntegers" : "SvenVanCaekenberghe 6/4/2012 15:46", - "testLists" : "SvenVanCaekenberghe 6/4/2012 15:51", - "testMaps" : "SvenVanCaekenberghe 6/4/2012 15:53", - "testObject1" : "SvenVanCaekenberghe 6/9/2012 18:48", + "writeRead:" : "SvenVanCaekenberghe 6/4/2012 15:36", "testObject2" : "SvenVanCaekenberghe 8/30/2013 10:12", + "testDictionaryOfObject2" : "marianopeck 2/1/2018 09:39", + "testFloats" : "marianopeck 1/30/2018 13:16", + "testSpecials" : "marianopeck 1/30/2018 13:20", + "testIntegers" : "marianopeck 1/30/2018 13:17", + "testObject1" : "SvenVanCaekenberghe 6/9/2012 18:48", + "testStrings" : "marianopeck 1/31/2018 12:00", + "testMaps" : "marianopeck 1/30/2018 13:19", "testObject3" : "SvenVanCaekenberghe 3/22/2014 10:14", - "testSpecials" : "SvenVanCaekenberghe 6/4/2012 15:46", - "testStrings" : "SvenVanCaekenberghe 6/10/2012 21:15", - "writeRead:" : "SvenVanCaekenberghe 6/4/2012 15:36" } } + "testLists" : "marianopeck 1/30/2018 13:18" + }, + "class" : { } +} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/properties.json b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/properties.json index 157067f..2703c60 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/properties.json +++ b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/properties.json @@ -1,14 +1,11 @@ { - "category" : "Neo-JSON-Tests", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "SvenVanCaekenberghe 6/4/2012 15:34", - "instvars" : [ - ], - "name" : "NeoJSONWriteReadTests", - "pools" : [ - ], "super" : "TestCase", - "type" : "normal" } + "category" : "Neo-JSON-Tests", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "NeoJSONWriteReadTests", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testAsciiOnlyStrings.st b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testAsciiOnlyStrings.st index a02dc03..c3ca857 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testAsciiOnlyStrings.st +++ b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testAsciiOnlyStrings.st @@ -11,7 +11,15 @@ testAsciiOnlyStrings self assert: (writer value: 'Foo BAR') equals: '"Foo BAR"'. self assert: (writer value: '') equals: '""'. self - assert: (writer value: (String withAll: { - $". $\. $/. Character tab. Character cr. Character lf. Character newPage. Character backspace })) + assert: (writer value: (String withAll: ( OrderedCollection new + add: $"; + add: $\; + add: $/; + add: Character tab; + add: Character cr; + add: Character lf; + add: Character newPage; + add: Character backspace; + yourself ))) equals: '"\"\\/\t\r\n\f\b"' diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testDate.st b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testDate.st index 3145b4c..c2b810c 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testDate.st +++ b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testDate.st @@ -7,4 +7,4 @@ testDate for: Date customDo: [ :mapping | mapping encoder: [ :date | date yyyymmdd ] ]; nextPut: object ] ]. - self assert: (writer value: (Date newDay: 8 month: 6 year: 2012)) equals: '"2012-06-08"' \ No newline at end of file + self assert: (writer value: (Date fromString: '2012-06-08')) equals: '"2012-06-08"' \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testListsExtra.st b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testListsExtra.st new file mode 100644 index 0000000..6543c1b --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testListsExtra.st @@ -0,0 +1,10 @@ +testing +testListsExtra + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) nextPut: object ] ]. + #( OrderedCollection LinkedList ByteArray IntegerArray SortedCollection ) do: [ :each | + Smalltalk at: each ifPresent: [ :collectionClass | + self assert: (writer value: (collectionClass withAll: #(1 2 3))) equals: '[1,2,3]'. + self assert: (writer value: collectionClass new) equals: '[]' ] ] diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testMaps.st b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testMaps.st index 685f41d..5207baf 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testMaps.st +++ b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testMaps.st @@ -4,5 +4,6 @@ testMaps writer := [ :object | String streamContents: [ :stream | (NeoJSONWriter on: stream) nextPut: object ] ]. - self assert: (writer value: (Dictionary newFromPairs: #( 'x' 1 'y' 2))) equals: '{"x":1,"y":2}'. + self assert: ((writer value: (Dictionary newFromPairs: #( 'x' 1 'y' 2))) includesSubstring: '"x":1'). + self assert: ((writer value: (Dictionary newFromPairs: #( 'x' 1 'y' 2))) includesSubstring: '"y":2'). self assert: (writer value: Dictionary new) equals: '{}'. diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testMapsExtra.st b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testMapsExtra.st new file mode 100644 index 0000000..1a931b3 --- /dev/null +++ b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testMapsExtra.st @@ -0,0 +1,14 @@ +testing +testMapsExtra + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) nextPut: object ] ]. + self assert: (writer value: (IdentityDictionary newFromPairs: #( 'x' 1))) equals: '{"x":1}'. + self assert: (writer value: IdentityDictionary new) equals: '{}'. + #( SmallDictionary OrderedDictionary OrderedIdentityDictionary ) do: [ :each | + | dictionaryClass | + dictionaryClass := Smalltalk at: each ifAbsent: [ nil ]. + dictionaryClass ifNotNil: [ + self assert: (writer value: (dictionaryClass new at: 'x' put: 1; at: 'y' put: 2; yourself)) equals: '{"x":1,"y":2}'. + self assert: (writer value: dictionaryClass new) equals: '{}'] ] diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testNonBMPCharacterEncoding.st b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testNonBMPCharacterEncoding.st index 360b8a2..5a5990d 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testNonBMPCharacterEncoding.st +++ b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testNonBMPCharacterEncoding.st @@ -3,7 +3,7 @@ testNonBMPCharacterEncoding "Characters not in the Basic Multilingual Plane are encoded as a UTF-16 surrogate pair" | string json | - string := String with: 16r1D11E asCharacter. "MUSICAL SYMBOL G CLEF" + string := 16r1D11E asCharacter asString. "MUSICAL SYMBOL G CLEF" json := String streamContents: [ :out | (NeoJSONWriter on: out) asciiOnly: true; nextPut: string ]. self assert: json equals: '"\uD834\uDD1E"' \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testStrings.st b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testStrings.st index 211c4d7..051223e 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testStrings.st +++ b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testStrings.st @@ -8,7 +8,16 @@ testStrings self assert: (writer value: 'Foo BAR') equals: '"Foo BAR"'. self assert: (writer value: '') equals: '""'. self - assert: (writer value: (String withAll: { - $". $\. $/. Character tab. Character cr. Character lf. Character newPage. Character backspace })) + assert: (writer value: (String withAll: ( OrderedCollection new + add: $"; + add: $\; + add: $/; + add: Character tab; + add: Character cr; + add: Character lf; + add: Character newPage; + add: Character backspace; + yourself ))) equals: '"\"\\/\t\r\n\f\b"' + diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testTime.st b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testTime.st index f28c5fe..18da0ce 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testTime.st +++ b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testTime.st @@ -5,6 +5,6 @@ testTime String streamContents: [ :stream | (NeoJSONWriter on: stream) for: Time customDo: [ :mapping | - mapping encoder: [ :time | time print24 ] ]; + mapping encoder: [ :time | time printString ] ]; nextPut: object ] ]. - self assert: (writer value: (Time hour: 14 minute: 30 second: 8)) equals: '"14:30:08"' \ No newline at end of file + self assert: ((writer value: (Time fromSeconds: 52208)) includesSubstring: '2:30:08') \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/methodProperties.json b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/methodProperties.json index c2c77a4..b6cbc05 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/methodProperties.json +++ b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/methodProperties.json @@ -1,27 +1,30 @@ { - "class" : { - }, "instance" : { - "testAsciiOnlyStrings" : "SvenVanCaekenberghe 9/3/2013 12:06", - "testAssociation" : "SvenVanCaekenberghe 6/12/2012 13:19", - "testBooleans" : "SvenVanCaekenberghe 6/3/2012 19:56", - "testByteArray" : "SvenVanCaekenberghe 6/8/2012 21:54", - "testDate" : "SvenVanCaekenberghe 6/12/2012 12:02", - "testDateAndTime" : "SvenVanCaekenberghe 6/12/2012 12:02", - "testFloats" : "SvenVanCaekenberghe 6/2/2012 22:24", - "testIntegers" : "SvenVanCaekenberghe 6/2/2012 22:24", - "testLists" : "SvenVanCaekenberghe 6/3/2012 19:39", - "testMaps" : "SvenVanCaekenberghe 6/3/2012 19:40", - "testNextPutStringAsHex" : "SvenVanCaekenberghe 3/24/2014 11:57", - "testNonBMPCharacterEncoding" : "SvenVanCaekenberghe 2/24/2016 14:15", "testNull" : "SvenVanCaekenberghe 6/2/2012 22:23", + "testAssociation" : "SvenVanCaekenberghe 6/12/2012 13:19", + "testStrings" : "marianopeck 1/30/2018 13:00", "testPoint" : "SvenVanCaekenberghe 6/12/2012 15:58", - "testPoint1" : "SvenVanCaekenberghe 6/8/2012 14:04", + "testTime" : "marianopeck 2/6/2018 08:37", + "testListsExtra" : "SvenVanCaekenberghe 9/4/2015 14:02", "testPoint2" : "SvenVanCaekenberghe 6/6/2012 17:29", - "testPoint3" : "SvenVanCaekenberghe 6/8/2012 14:04", + "testMaps" : "marianopeck 2/6/2018 08:37", + "testLists" : "SvenVanCaekenberghe 6/3/2012 19:39", + "testByteArray" : "SvenVanCaekenberghe 6/8/2012 21:54", + "testIntegers" : "SvenVanCaekenberghe 6/2/2012 22:24", "testPointUsingAsString" : "SvenVanCaekenberghe 3/24/2014 10:41", + "testMapsExtra" : "SvenVanCaekenberghe 8/26/2015 14:05", + "testDate" : "marianopeck 2/6/2018 09:14", + "testPoint3" : "SvenVanCaekenberghe 6/8/2012 14:04", + "testDateAndTime" : "SvenVanCaekenberghe 6/12/2012 12:02", + "testAsciiOnlyStrings" : "marianopeck 1/30/2018 12:59", "testPointWriteNil" : "SvenVanCaekenberghe 5/28/2014 20:49", "testPreservePropertyOrder" : "SvenVanCaekenberghe 7/1/2016 23:50", - "testStrings" : "SvenVanCaekenberghe 6/10/2012 21:15", "testSymbol" : "SvenVanCaekenberghe 6/8/2012 21:56", - "testTime" : "SvenVanCaekenberghe 6/12/2012 12:02" } } + "testFloats" : "SvenVanCaekenberghe 6/2/2012 22:24", + "testPoint1" : "SvenVanCaekenberghe 6/8/2012 14:04", + "testNonBMPCharacterEncoding" : "marianopeck 1/31/2018 12:00", + "testNextPutStringAsHex" : "SvenVanCaekenberghe 3/24/2014 11:57", + "testBooleans" : "SvenVanCaekenberghe 6/3/2012 19:56" + }, + "class" : { } +} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/properties.json b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/properties.json index f421478..8ab6465 100644 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/properties.json +++ b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/properties.json @@ -1,14 +1,11 @@ { - "category" : "Neo-JSON-Tests", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "SvenVanCaekenberghe 6/2/2012 22:20", - "instvars" : [ - ], - "name" : "NeoJSONWriterTests", - "pools" : [ - ], "super" : "TestCase", - "type" : "normal" } + "category" : "Neo-JSON-Tests", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "NeoJSONWriterTests", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/monticello.meta/version b/repository/Neo-JSON-Tests.package/monticello.meta/version index 1f66b2c..bd1aef6 100644 --- a/repository/Neo-JSON-Tests.package/monticello.meta/version +++ b/repository/Neo-JSON-Tests.package/monticello.meta/version @@ -1 +1 @@ -(name 'Neo-JSON-Tests-SvenVanCaekenberghe.34' message 'Use an OrderedDictionary instead of a regular Dictionary to store the properties inside a NeoJSONObjectMapping - this allows the user to control the order of properties while writing, if needed Add NeoJSONWriterTests>>#testPreservePropertyOrder' id '883b6ef1-e5fc-4d85-b86c-b21c1b5a3d6c' date '2 July 2016' time '12:03:30.417248 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.33' message 'Added NeoJSONReader>>#nextListAs: as suggested by Norbert Hartl Added NeoJSONReaderTests>>#testArrayOfPointsUsingNextListAs' id '8f4620bc-d5f5-4b3a-aaf0-ee4b8b7a9ccf' date '16 March 2016' time '11:25:04.185192 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.32' message 'Added support for characters not in the Basic Multilingual Plane encoding as a UTF-16 surrogate pair See https://tools.ietf.org/html/rfc7159#section-7' id '484452d1-3d3b-414c-9c3a-fdfdd220ac65' date '24 February 2016' time '2:51:29.012947 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.31' message 'New #allowNil option to Object mapping so that null values are accepted and returned as nil when reading a schema using #nextAs: (off by default) Added NeoJSONObjectMapping>>#allowNil Added NeoJSONReaderTests>>#testAllowNil' id '650b4ecf-c9d9-40a5-a988-e4e3801faa42' date '30 December 2015' time '12:32:13.455009 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.30' message 'fix NeoJSONObjectTest>>#testJSON to no longer mix NeoJSONObject with Dictionary (due to changed equality tests)' id '8d78dfb8-9216-483f-9183-c4467fb351d2' date '25 November 2015' time '9:21:18.608509 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.26' message 'Added NeoJSONObject, a convencience subclass of Dictionary that mimics some JavaScript behavior' id 'a601b541-7f8b-4d10-9c57-2423b6c0a5fb' date '8 September 2014' time '2:26:47.985076 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.25' message 'Added NeoJSONWriterTests>>#testPointWriteNil Added NeoJSONWriter #writeNil property, defaulting to false; when true, nil instance variables will be written as null by NeoJSONPropertyMapping, else they will be skipped' id 'f1479d45-8d24-4bf6-b29a-aaf9f984c084' date '28 May 2014' time '8:54:10.767617 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.24' message 'Added new feature NeoJSONWriter>>#nextPutAs: symmetrical to NeoJSONReader>>#next:as: Added 4 unit test to exercise the new options' id '4c7461c1-82ea-4126-8b5c-ef307168120a' date '24 March 2014' time '12:19:53.503067 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.23' message 'Added basic support for mapping using inheritance when using #neoJonMapping : (see #testObject3) Renamed #new[Custom|Object]MappingFor: to [custom|object]MappingFor: to better reflect the new behavior Thanks Philippe Back for making these suggestions!' id '27fad240-c6b9-4d00-a4e6-6e49fd612dfb' date '22 March 2014' time '11:04:11.513921 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.22' message 'remove timing assertions from NeoJSONBenchmarkTests sinc they occasionally fail on the CI servers' id '3a07a705-816f-4981-9269-8d20620a00e2' date '15 January 2014' time '7:31:53.75366 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.21' message 'Increase the NeoJSONBenchmarkTests>>#testPrettyPrinter timeout even more' id '90807026-211d-4644-b211-1ea5bfd92bd6' date '27 December 2013' time '9:44:01.082714 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.20' message 'Give NeoJSONBenchmarksTests some more time to finish (on slow CI build slaves)' id 'f5f8f820-40d4-44ea-b5b6-8634e4cb7c5e' date '27 December 2013' time '7:01:23.816121 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.19' message 'New feature: NeoJSONWriter>>#asciiOnly: to escape all non ASCII characters in strings' id 'e1a69fdb-7e41-46f7-9f52-312eae3fab61' date '3 September 2013' time '12:21:56.262333 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.18' message 'Added tests for NeoJSONCustomMapping>>#mapWithValueSchema:' id '3f001444-6572-47d5-b656-96363c695522' date '30 August 2013' time '11:09:49.845805 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.17' message 'Make SmallDictionary optional in NeoJSONReaderTests>>#testSmallDictionary' id '5fa85190-9a4c-4b91-9747-f5e6a547e5ad' date '4 July 2013' time '6:43:12.874 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.16' message 'add NeoJSONMockStream>>#peekFor:' id 'baadfdb3-b8b4-4ce5-b072-0ebf67edd45f' date '3 December 2012' time '11:14:13.632 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.15' message 'added code to test the character stream API being used' id '696b4956-43ef-4fb8-a295-aa0bcc16685c' date '13 June 2012' time '4:29:41.988 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.14' message 'bugfix in NeoJSONReader>>#match:do: ' id '7e664c0d-c5c3-4e64-a784-c274a85a8230' date '13 June 2012' time '2:58:28.242 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.13' message 'extended NeoJSONReader with settable listClass and mapClass as well as a propertyNamesAsSymbols option extended class and method comments' id '4c90aab7-73c6-47fe-b52f-46954c06bf19' date '13 June 2012' time '11:57:09.49 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.12' message 'added tests for bogus input' id '50e7e260-7299-4ff8-880b-cbfd7bc8b30a' date '12 June 2012' time '4:20:02.239 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.11' message 'major simplification: removed NeoJSON[Composite|List|Map]Mapping, all to be handled by blocks in NeoJSONCustomMapping renamed forCustom:do: to for:customDo: accessor based mapping to NeoJSONObjectMapping ' id 'fcdc4252-6e15-4832-984f-84fbe1486163' date '12 June 2012' time '1:36:40.377 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.10' message 'added another benchmark' id '0f01e8f8-a367-4cb9-b730-1d8c0b411743' date '10 June 2012' time '9:28:30.577 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.9' message 'added NeoJSONTestObject1 with class side #neoJsonMapping: method' id 'ac3db680-73e6-4358-882c-e237697a7db4' date '9 June 2012' time '6:56:55.581 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.8' message 'added custom mapping tests' id '015e7c92-0411-4c7f-80b3-2d18a445250e' date '8 June 2012' time '10:10:24.734 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.7' message 'adding valueSchema to propertyMapping' id '9723e179-f1b9-4641-85ea-45ba89487b07' date '8 June 2012' time '8:36:25 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.6' message '1st version where list mapping works on some simple examples' id '6dbd0ade-2632-42a1-bd3c-45ef3fc0b596' date '8 June 2012' time '4:41:04 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.5' message '1st version with working object mapping for writer' id '59e0739f-bd31-4057-a366-2b5d27cf304c' date '6 June 2012' time '8:47:29 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.4' message 'added NeoJSONBenchmarkTests' id 'f36901e7-bb6d-4d6c-b4e8-5e70db8cce97' date '5 June 2012' time '5:30:17 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.3' message 'added more tests and a simple benchmark' id '5396d3f6-f1f0-46bc-961a-72a5919a9b79' date '4 June 2012' time '6:53:25 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.2' message 'first simple version of NeoJSONWriter' id '4b84c7e9-74d5-4b8b-bf9e-4be5fda1eb10' date '3 June 2012' time '7:58:06 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.1' message 'first simple version of NeoJSONReader' id '6927fec5-5a02-4ad2-8d4a-7be492da47da' date '2 June 2012' time '10:00:14 pm' author 'SvenVanCaekenberghe' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ()) \ No newline at end of file +(name 'Neo-JSON-Tests-SvenVanCaekenberghe.57' message 'Always store #propertyName in NeoJSONPropertyMapping as Symbol. Use this invariant in NeoJSONObjectMapping, specifically in #propertyNamed:ifAbsent: #mapProperty:getter:setter: and #mapInstVar:to: to minimize the number of conversions needed. Add NeoJSONMappingTests>>#testSymbolOrStringInstVarMapping to make sure both String and Symbols are allowed as instance variable mapping specification. ' id '79e38d9e-ef20-0d00-9ccc-cbcc050dd8ac' date '6 February 2018' time '5:43:46.61041 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-marianopeck.56' message '* Remove Date newDay:monthIndex:year: and change tests to use #fromString: ' id '65e5b4e8-eb20-0d00-8086-e9a707903797' date '6 February 2018' time '9:18:10.811451 am' author 'marianopeck' ancestors ((name 'Neo-JSON-Tests-marianopeck.55' message '* Avoid the #includesSubString: and provide another approach so that includesSubstring: can work with Pharo and VAST. Also fixed the tests calling it. ' id '35f1027c-eb20-0d00-8083-065407903797' date '6 February 2018' time '8:47:47.209719 am' author 'marianopeck' ancestors ((name 'Neo-JSON-Tests-marianopeck.54' message 'Small fix on testTime' id 'e9eb9823-a120-0d00-975f-dbf9011ccac0' date '2 February 2018' time '4:05:56.286689 pm' author 'marianopeck' ancestors ((name 'Neo-JSON-Tests-marianopeck.53' message 'Small fix' id '45f5f033-a020-0d00-8fbe-0abe081b95f3' date '2 February 2018' time '2:58:55.524553 pm' author 'marianopeck' ancestors ((name 'Neo-JSON-Tests-marianopeck.52' message 'Another small fix in String vs Symbol in tests ' id 'd56601b5-8720-0d00-bd6a-90ea0307cbab' date '1 February 2018' time '9:45:26.680488 am' author 'marianopeck' ancestors ((name 'Neo-JSON-Tests-marianopeck.51' message '* Use newDay: monthIndex: year: * Fix testMaps to not depend on the order of the keys. ' id '86f604c6-7920-0d00-bd69-b93d0307cbab' date '31 January 2018' time '5:08:02.584466 pm' author 'marianopeck' ancestors ((name 'Neo-JSON-Tests-marianopeck.50' message '* replace a few `String with: aCharacter` with `aCharacter asString`. ' id '9305ea94-7520-0d00-bd5f-108c0307cbab' date '31 January 2018' time '12:07:58.866052 pm' author 'marianopeck' ancestors ((name 'Neo-JSON-Tests-marianopeck.49' message '* Use `NeoJSONObject newFrom:` rather than `as: NeoJSONObject` (for portability) ' id '5c89d821-7520-0d00-bd5c-b5ba0307cbab' date '31 January 2018' time '11:35:48.341463 am' author 'marianopeck' ancestors ((name 'Neo-JSON-Tests-marianopeck.48' message 'testDynamicTyping should deal either with strings or symbols and compare that' id 'bf651420-7320-0d00-be54-9644006b589b' date '31 January 2018' time '9:12:08.774329 am' author 'marianopeck' ancestors ((name 'Neo-JSON-Tests-marianopeck.47' message 'One more Array {} issue' id 'dc417b5e-6820-0d00-be51-7b8c006b589b' date '30 January 2018' time '8:22:11.062475 pm' author 'marianopeck' ancestors ((name 'Neo-JSON-Tests-marianopeck.46' message 'Some more Array {} replacements' id '6d8b8a4a-6420-0d00-be50-de64006b589b' date '30 January 2018' time '3:30:16.650938 pm' author 'marianopeck' ancestors ((name 'Neo-JSON-Tests-marianopeck.45' message 'Do not use {} for building arrays as that is not cross platform. Instead either use Array with:with:... or OrederedCollection new add:..;add:..;yourself when the collection is bigger than 6 elements. ' id 'e0276090-6220-0d00-be4f-4918006b589b' date '30 January 2018' time '1:26:38.343347 pm' author 'marianopeck' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.44' message 'Fix the NeoJSONWriter>>#writeNil: true option by adding a short circuit to NeoJSONWriter>>nextPut:as: (as reported by Juraj Kubelka) Add #testRectanglePointsWithNil' id '35acdd9b-431a-0d00-850f-878405ce5378' date '13 November 2017' time '6:59:37.365898 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.43' message 'Add #testVirtualTransferObject as another mapping example' id 'f40af758-7816-0d00-89cd-641e08d6220e' date '26 September 2017' time '2:14:01.71055 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.42' message 'merge' id '4803eec7-7716-0d00-beba-4df304c5ff7e' date '26 September 2017' time '1:33:28.422456 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.41' message 'Implement some missing code in NeoJSONCustomMapping (the writing part of #listOfElementSchema: #listOfType:andElementSchema: #mapWithValueSchema:) Add NeoJSONStreamingWriter>>#writeElementAs: Add NeoJSONMappingTests>>#testDynamicTyping as an example' id 'a9a900e0-2816-0d00-a04d-a6fb0e598362' date '22 September 2017' time '3:25:09.881494 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.39' message 'Improve error handling and compliance. Added NeoJSONValidation that uses some external positive/negative specifications Added NeoJSONReader>>#failIfNotAtEnd to optionally force correct end of input parsing and catch extraneous input Improve NeoJSONReader>>#parseCharacter error reporting in case of incomplete escapes Improve NeoJSONReader>>#parseListDo: & #parseMapDo: error reporting NeoJSONReader>>#parseNumberExponent (1) add error for missing exponents (2) add errors for too large & too small exponents versus Float limits' id 'bb2a9e2c-080d-0d00-a714-e48a0189d909' date '29 May 2017' time '11:37:36.701381 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.38' message 'Add NeoJSONObject>>#atPath: and #atPath:put: Add NeoJSONObjectTests>>#testAtPath and #testAtPathPut' id '73623f7f-740a-0d00-b51b-f4000088e41c' date '26 April 2017' time '4:36:04.583272 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.37' message 'Fix a bug where initial whitespace when reading a string was consumed (thx Max Leske) Add a regression case to NeoJSONReaderTests>>#testStrings' id 'f000b8c5-c106-0d00-9801-41dd0c8d4a06' date '10 March 2017' time '2:06:52.864035 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.36' message 'merge some tests that got lost' id '1ccee649-76ed-4112-b4c0-d8cf21cafc6e' date '2 February 2017' time '1:49:23.579466 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.35' message 'Bugfix to NeoJSONWriter>>#escapeUnicode: [thank you, Tomohiro Oda] code points between 16rFFF and 16rFFFF where encoded wrongly when #asciiOnly was true Add high code point string to NeoJSONWriteReadTests>>#testStrings and add new NeoJSONWriteReadAsciiOnlyTests subclass' id '27263197-84b3-45c2-97d4-e99e63d51d89' date '24 November 2016' time '10:30:35.120461 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.34' message 'Use an OrderedDictionary instead of a regular Dictionary to store the properties inside a NeoJSONObjectMapping - this allows the user to control the order of properties while writing, if needed Add NeoJSONWriterTests>>#testPreservePropertyOrder' id '883b6ef1-e5fc-4d85-b86c-b21c1b5a3d6c' date '2 July 2016' time '12:03:30.417248 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.33' message 'Added NeoJSONReader>>#nextListAs: as suggested by Norbert Hartl Added NeoJSONReaderTests>>#testArrayOfPointsUsingNextListAs' id '8f4620bc-d5f5-4b3a-aaf0-ee4b8b7a9ccf' date '16 March 2016' time '11:25:04.185192 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.32' message 'Added support for characters not in the Basic Multilingual Plane encoding as a UTF-16 surrogate pair See https://tools.ietf.org/html/rfc7159#section-7' id '484452d1-3d3b-414c-9c3a-fdfdd220ac65' date '24 February 2016' time '2:51:29.012947 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.31' message 'New #allowNil option to Object mapping so that null values are accepted and returned as nil when reading a schema using #nextAs: (off by default) Added NeoJSONObjectMapping>>#allowNil Added NeoJSONReaderTests>>#testAllowNil' id '650b4ecf-c9d9-40a5-a988-e4e3801faa42' date '30 December 2015' time '12:32:13.455009 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.30' message 'fix NeoJSONObjectTest>>#testJSON to no longer mix NeoJSONObject with Dictionary (due to changed equality tests)' id '8d78dfb8-9216-483f-9183-c4467fb351d2' date '25 November 2015' time '9:21:18.608509 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.26' message 'Added NeoJSONObject, a convencience subclass of Dictionary that mimics some JavaScript behavior' id 'a601b541-7f8b-4d10-9c57-2423b6c0a5fb' date '8 September 2014' time '2:26:47.985076 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.25' message 'Added NeoJSONWriterTests>>#testPointWriteNil Added NeoJSONWriter #writeNil property, defaulting to false; when true, nil instance variables will be written as null by NeoJSONPropertyMapping, else they will be skipped' id 'f1479d45-8d24-4bf6-b29a-aaf9f984c084' date '28 May 2014' time '8:54:10.767617 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.24' message 'Added new feature NeoJSONWriter>>#nextPutAs: symmetrical to NeoJSONReader>>#next:as: Added 4 unit test to exercise the new options' id '4c7461c1-82ea-4126-8b5c-ef307168120a' date '24 March 2014' time '12:19:53.503067 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.23' message 'Added basic support for mapping using inheritance when using #neoJonMapping : (see #testObject3) Renamed #new[Custom|Object]MappingFor: to [custom|object]MappingFor: to better reflect the new behavior Thanks Philippe Back for making these suggestions!' id '27fad240-c6b9-4d00-a4e6-6e49fd612dfb' date '22 March 2014' time '11:04:11.513921 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.22' message 'remove timing assertions from NeoJSONBenchmarkTests sinc they occasionally fail on the CI servers' id '3a07a705-816f-4981-9269-8d20620a00e2' date '15 January 2014' time '7:31:53.75366 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.21' message 'Increase the NeoJSONBenchmarkTests>>#testPrettyPrinter timeout even more' id '90807026-211d-4644-b211-1ea5bfd92bd6' date '27 December 2013' time '9:44:01.082714 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.20' message 'Give NeoJSONBenchmarksTests some more time to finish (on slow CI build slaves)' id 'f5f8f820-40d4-44ea-b5b6-8634e4cb7c5e' date '27 December 2013' time '7:01:23.816121 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.19' message 'New feature: NeoJSONWriter>>#asciiOnly: to escape all non ASCII characters in strings' id 'e1a69fdb-7e41-46f7-9f52-312eae3fab61' date '3 September 2013' time '12:21:56.262333 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.18' message 'Added tests for NeoJSONCustomMapping>>#mapWithValueSchema:' id '3f001444-6572-47d5-b656-96363c695522' date '30 August 2013' time '11:09:49.845805 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.17' message 'Make SmallDictionary optional in NeoJSONReaderTests>>#testSmallDictionary' id '5fa85190-9a4c-4b91-9747-f5e6a547e5ad' date '4 July 2013' time '6:43:12.874 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.16' message 'add NeoJSONMockStream>>#peekFor:' id 'baadfdb3-b8b4-4ce5-b072-0ebf67edd45f' date '3 December 2012' time '11:14:13.632 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.15' message 'added code to test the character stream API being used' id '696b4956-43ef-4fb8-a295-aa0bcc16685c' date '13 June 2012' time '4:29:41.988 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.14' message 'bugfix in NeoJSONReader>>#match:do: ' id '7e664c0d-c5c3-4e64-a784-c274a85a8230' date '13 June 2012' time '2:58:28.242 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.13' message 'extended NeoJSONReader with settable listClass and mapClass as well as a propertyNamesAsSymbols option extended class and method comments' id '4c90aab7-73c6-47fe-b52f-46954c06bf19' date '13 June 2012' time '11:57:09.49 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.12' message 'added tests for bogus input' id '50e7e260-7299-4ff8-880b-cbfd7bc8b30a' date '12 June 2012' time '4:20:02.239 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.11' message 'major simplification: removed NeoJSON[Composite|List|Map]Mapping, all to be handled by blocks in NeoJSONCustomMapping renamed forCustom:do: to for:customDo: accessor based mapping to NeoJSONObjectMapping ' id 'fcdc4252-6e15-4832-984f-84fbe1486163' date '12 June 2012' time '1:36:40.377 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.10' message 'added another benchmark' id '0f01e8f8-a367-4cb9-b730-1d8c0b411743' date '10 June 2012' time '9:28:30.577 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.9' message 'added NeoJSONTestObject1 with class side #neoJsonMapping: method' id 'ac3db680-73e6-4358-882c-e237697a7db4' date '9 June 2012' time '6:56:55.581 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.8' message 'added custom mapping tests' id '015e7c92-0411-4c7f-80b3-2d18a445250e' date '8 June 2012' time '10:10:24.734 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.7' message 'adding valueSchema to propertyMapping' id '9723e179-f1b9-4641-85ea-45ba89487b07' date '8 June 2012' time '8:36:25 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.6' message '1st version where list mapping works on some simple examples' id '6dbd0ade-2632-42a1-bd3c-45ef3fc0b596' date '8 June 2012' time '4:41:04 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.5' message '1st version with working object mapping for writer' id '59e0739f-bd31-4057-a366-2b5d27cf304c' date '6 June 2012' time '8:47:29 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.4' message 'added NeoJSONBenchmarkTests' id 'f36901e7-bb6d-4d6c-b4e8-5e70db8cce97' date '5 June 2012' time '5:30:17 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.3' message 'added more tests and a simple benchmark' id '5396d3f6-f1f0-46bc-961a-72a5919a9b79' date '4 June 2012' time '6:53:25 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.2' message 'first simple version of NeoJSONWriter' id '4b84c7e9-74d5-4b8b-bf9e-4be5fda1eb10' date '3 June 2012' time '7:58:06 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.1' message 'first simple version of NeoJSONReader' id '6927fec5-5a02-4ad2-8d4a-7be492da47da' date '2 June 2012' time '10:00:14 pm' author 'SvenVanCaekenberghe' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())(name 'Neo-JSON-Tests-SvenVanCaekenberghe.29' message 'Added NeoJSONWriterTests>>#testListsExtra' id '7feb9d20-fae6-4970-9774-500b92f28f50' date '4 September 2015' time '2:03:43.177017 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.28' message 'Handle missing classes in NeoJSONWriterTests>>#testMapsExtra' id '6a459850-0c12-43d1-9a6b-9442e6d8fd8e' date '26 August 2015' time '2:06:11.298172 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.27' message 'Added NeoJSONWriterTests>>#testMapsExtra to test classes that are treated similar to Dictionary' id 'ff7a96fa-5174-4c2f-9950-eebcba1206c0' date '26 August 2015' time '1:22:00.626803 pm' author 'SvenVanCaekenberghe' ancestors ((id 'a601b541-7f8b-4d10-9c57-2423b6c0a5fb')) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())(name 'Neo-JSON-Tests-SvenVanCaekenberghe.40' message 'Added NeoJSONExamplesTests with #testPoints and #testRectanglePoints Changed NeoJSONObjectMapping #mapAccessors: #mapAllInstVars #mapInstVars and #mapInstVars: to return a collection of the generated mappings Thanks Juraj Kubelka ! ' id '9783deb7-0310-0d00-8c60-f3410702b82a' date '6 July 2017' time '10:34:12.998461 am' author 'SvenVanCaekenberghe' ancestors ((id 'bb2a9e2c-080d-0d00-a714-e48a0189d909')) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ()) \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/properties.json b/repository/Neo-JSON-Tests.package/properties.json index f037444..6f31cf5 100644 --- a/repository/Neo-JSON-Tests.package/properties.json +++ b/repository/Neo-JSON-Tests.package/properties.json @@ -1,2 +1 @@ -{ - } +{ } \ No newline at end of file From 0ff7fbec73d7cc8672738e90984c972842572aea Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Mon, 1 Oct 2018 22:59:27 +0200 Subject: [PATCH 04/90] add project info --- .project | 3 +++ repository/.properties | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 .project create mode 100644 repository/.properties diff --git a/.project b/.project new file mode 100644 index 0000000..46c7795 --- /dev/null +++ b/.project @@ -0,0 +1,3 @@ +{ + 'srcDirectory' : 'repository' +} \ No newline at end of file diff --git a/repository/.properties b/repository/.properties new file mode 100644 index 0000000..c2bedd4 --- /dev/null +++ b/repository/.properties @@ -0,0 +1,3 @@ +{ + #format : #filetree +} \ No newline at end of file From ff1c22775182547af801cdfc286b3f33e8286475 Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Mon, 1 Oct 2018 23:07:38 +0200 Subject: [PATCH 05/90] added BaselineOfNeoJSON --- .../BaselineOfNeoJSON.package/.filetree | 5 +++++ .../BaselineOfNeoJSON.class/README.md | 2 ++ .../instance/baseline..st | 20 +++++++++++++++++++ .../BaselineOfNeoJSON.class/properties.json | 11 ++++++++++ .../monticello.meta/categories.st | 1 + .../monticello.meta/initializers.st | 0 .../monticello.meta/package | 1 + .../BaselineOfNeoJSON.package/properties.json | 1 + 8 files changed, 41 insertions(+) create mode 100644 repository/BaselineOfNeoJSON.package/.filetree create mode 100644 repository/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/README.md create mode 100644 repository/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/instance/baseline..st create mode 100644 repository/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/properties.json create mode 100644 repository/BaselineOfNeoJSON.package/monticello.meta/categories.st create mode 100644 repository/BaselineOfNeoJSON.package/monticello.meta/initializers.st create mode 100644 repository/BaselineOfNeoJSON.package/monticello.meta/package create mode 100644 repository/BaselineOfNeoJSON.package/properties.json diff --git a/repository/BaselineOfNeoJSON.package/.filetree b/repository/BaselineOfNeoJSON.package/.filetree new file mode 100644 index 0000000..57a6797 --- /dev/null +++ b/repository/BaselineOfNeoJSON.package/.filetree @@ -0,0 +1,5 @@ +{ + "separateMethodMetaAndSource" : false, + "noMethodMetaData" : true, + "useCypressPropertiesFile" : true +} \ No newline at end of file diff --git a/repository/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/README.md b/repository/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/README.md new file mode 100644 index 0000000..628fec7 --- /dev/null +++ b/repository/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/README.md @@ -0,0 +1,2 @@ +I am BaselineOfNeoJSON, I load the code for the NeoJSON project. +I am a BaselineOf. \ No newline at end of file diff --git a/repository/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/instance/baseline..st b/repository/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/instance/baseline..st new file mode 100644 index 0000000..7a62c72 --- /dev/null +++ b/repository/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/instance/baseline..st @@ -0,0 +1,20 @@ +baselines +baseline: spec + + spec + for: #common + do: [ spec + package: 'Neo-JSON-Core'; + package: 'Neo-JSON-Tests' with: [ spec requires: #('Neo-JSON-Core') ]; + group: 'default' with: #('core' 'tests'); + group: 'core' with: #('Neo-JSON-Core'); + group: 'tests' with: #('Neo-JSON-Tests') ]. + spec + for: #pharo + do: [ spec + package: 'Neo-JSON-Pharo-Core' with: [ spec requires: #('Neo-JSON-Core') ]; + package: 'Neo-JSON-Pharo-Tests' with: [ spec requires: #('Neo-JSON-Tests') ]; + package: 'Neo-JSON-Pharo-Examples' with: [ spec requires: #('Neo-JSON-Core') ]; + group: 'core' with: #('Neo-JSON-Core' 'Neo-JSON-Pharo-Core'); + group: 'tests' with: #('Neo-JSON-Tests' 'Neo-JSON-Pharo-Tests'); + group: 'examples' with: #('Neo-JSON-Pharo-Examples') ]. \ No newline at end of file diff --git a/repository/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/properties.json b/repository/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/properties.json new file mode 100644 index 0000000..be60e1c --- /dev/null +++ b/repository/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "SvenVanCaekenberghe 10/1/2018 23:01", + "super" : "BaselineOf", + "category" : "BaselineOfNeoJSON", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "BaselineOfNeoJSON", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/BaselineOfNeoJSON.package/monticello.meta/categories.st b/repository/BaselineOfNeoJSON.package/monticello.meta/categories.st new file mode 100644 index 0000000..3cb50fe --- /dev/null +++ b/repository/BaselineOfNeoJSON.package/monticello.meta/categories.st @@ -0,0 +1 @@ +SystemOrganization addCategory: #BaselineOfNeoJSON! diff --git a/repository/BaselineOfNeoJSON.package/monticello.meta/initializers.st b/repository/BaselineOfNeoJSON.package/monticello.meta/initializers.st new file mode 100644 index 0000000..e69de29 diff --git a/repository/BaselineOfNeoJSON.package/monticello.meta/package b/repository/BaselineOfNeoJSON.package/monticello.meta/package new file mode 100644 index 0000000..11d829c --- /dev/null +++ b/repository/BaselineOfNeoJSON.package/monticello.meta/package @@ -0,0 +1 @@ +(name 'BaselineOfNeoJSON') \ No newline at end of file diff --git a/repository/BaselineOfNeoJSON.package/properties.json b/repository/BaselineOfNeoJSON.package/properties.json new file mode 100644 index 0000000..6f31cf5 --- /dev/null +++ b/repository/BaselineOfNeoJSON.package/properties.json @@ -0,0 +1 @@ +{ } \ No newline at end of file From 6912f23c00c30c792f1b654804acbbcc72f4a883 Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Mon, 1 Oct 2018 23:09:05 +0200 Subject: [PATCH 06/90] sources migrated --- repository/.filetree | 1 - repository/.properties | 3 +- .../BaselineOfNeoJSON.package/.filetree | 5 - .../BaselineOfNeoJSON.class/README.md | 2 - .../BaselineOfNeoJSON.class/properties.json | 11 - .../monticello.meta/categories.st | 1 - .../monticello.meta/initializers.st | 0 .../monticello.meta/package | 1 - .../BaselineOfNeoJSON.package/properties.json | 1 - .../BaselineOfNeoJSON.class.st} | 17 +- repository/BaselineOfNeoJSON/package.st | 1 + .../ConfigurationOfNeoJSON.package/.filetree | 5 - .../ConfigurationOfNeoJSON.class/README.md | 3 - .../class/DevelopmentSupport.st | 5 - .../class/baseConfigurationClassIfAbsent..st | 8 - .../class/catalogContactInfo.st | 3 - .../class/catalogDescription.st | 3 - .../class/catalogKeywords.st | 3 - .../class/ensureMetacello.st | 4 - .../class/ensureMetacelloBaseConfiguration.st | 14 - .../class/isMetacelloConfig.st | 5 - .../class/load.st | 8 - .../class/loadBleedingEdge.st | 8 - .../class/loadDevelopment.st | 8 - .../class/project.st | 4 - .../class/validate.st | 12 - .../instance/baseline1..st | 13 - .../instance/baseline2..st | 20 - .../instance/baseline3..st | 44 -- .../instance/bleedingEdge..st | 3 - .../instance/development..st | 3 - .../instance/project.st | 11 - .../instance/stable..st | 7 - .../instance/version1..st | 9 - .../instance/version10..st | 9 - .../instance/version11..st | 9 - .../instance/version12..st | 9 - .../instance/version13..st | 9 - .../instance/version14..st | 9 - .../instance/version15..st | 9 - .../instance/version16..st | 9 - .../instance/version17..st | 9 - .../instance/version2..st | 9 - .../instance/version3..st | 9 - .../instance/version30..st | 7 - .../instance/version4..st | 9 - .../instance/version5..st | 9 - .../instance/version6..st | 9 - .../instance/version7..st | 9 - .../instance/version8..st | 9 - .../instance/version9..st | 9 - .../methodProperties.json | 44 -- .../properties.json | 15 - .../monticello.meta/categories.st | 1 - .../monticello.meta/initializers.st | 0 .../monticello.meta/package | 1 - .../monticello.meta/version | 1 - .../properties.json | 1 - .../ConfigurationOfNeoJSON.class.st | 440 ++++++++++++++++ repository/ConfigurationOfNeoJSON/package.st | 1 + repository/Neo-JSON-Core.package/.filetree | 5 - .../Boolean.extension/instance/neoJsonOn..st | 3 - .../Boolean.extension/methodProperties.json | 6 - .../Boolean.extension/properties.json | 3 - .../instance/neoJsonOn..st | 3 - .../methodProperties.json | 6 - .../Collection.extension/properties.json | 3 - .../instance/neoJsonOn..st | 3 - .../methodProperties.json | 6 - .../Dictionary.extension/properties.json | 3 - .../Integer.extension/instance/neoJsonOn..st | 3 - .../Integer.extension/methodProperties.json | 6 - .../Integer.extension/properties.json | 3 - .../NeoJSONCustomMapping.class/README.md | 3 - .../instance/decoder..st | 8 - .../instance/encoder..st | 8 - .../instance/identifier.st | 3 - .../instance/listOfElementSchema..st | 13 - .../instance/listOfType..st | 11 - .../instance/listOfType.andElementSchema..st | 14 - .../instance/mapWithValueSchema..st | 16 - .../instance/readFrom..st | 5 - .../instance/reader..st | 7 - .../instance/schemaName..st | 3 - .../instance/writeObject.on..st | 5 - .../instance/writer..st | 7 - .../methodProperties.json | 17 - .../properties.json | 15 - .../NeoJSONMapper.class/README.md | 28 - .../instance/customMappingFor..st | 8 - .../instance/for.customDo..st | 9 - .../NeoJSONMapper.class/instance/for.do..st | 9 - .../instance/mapAllInstVarsFor..st | 8 - .../instance/mapInstVarsFor..st | 8 - .../instance/mappingFor..st | 5 - .../instance/mappingFor.ifAbsent..st | 7 - .../NeoJSONMapper.class/instance/mappings.st | 4 - .../instance/objectMappingFor..st | 8 - .../instance/resolveMappingFor..st | 5 - .../NeoJSONMapper.class/methodProperties.json | 15 - .../NeoJSONMapper.class/properties.json | 13 - .../NeoJSONMapping.class/README.md | 1 - .../instance/identifier.st | 3 - .../NeoJSONMapping.class/instance/printOn..st | 4 - .../instance/readFrom..st | 3 - .../instance/writeObject.on..st | 3 - .../methodProperties.json | 9 - .../NeoJSONMapping.class/properties.json | 11 - .../NeoJSONMappingNotFound.class/README.md | 3 - .../class/signalFor..st | 7 - .../class/signalFor.in..st | 8 - .../instance/collection..st | 5 - .../instance/collection.st | 5 - .../instance/messageText.st | 5 - .../instance/object..st | 5 - .../instance/object.st | 5 - .../instance/standardMessageText.st | 7 - .../methodProperties.json | 14 - .../properties.json | 14 - .../NeoJSONObject.class/README.md | 37 -- .../NeoJSONObject.class/class/fromString..st | 8 - .../NeoJSONObject.class/instance/at..st | 6 - .../NeoJSONObject.class/instance/atPath..st | 10 - .../instance/atPath.put..st | 12 - .../instance/doesNotUnderstand..st | 12 - .../NeoJSONObject.class/instance/name.st | 5 - .../NeoJSONObject.class/instance/printOn..st | 10 - .../NeoJSONObject.class/instance/value.st | 5 - .../NeoJSONObject.class/methodProperties.json | 14 - .../NeoJSONObject.class/properties.json | 11 - .../NeoJSONObjectMapping.class/README.md | 10 - .../instance/allowNil.st | 5 - .../instance/identifier.st | 3 - .../instance/initialize.st | 5 - .../instance/mapAccessor..st | 3 - .../instance/mapAccessor.mutator.to..st | 6 - .../instance/mapAccessor.to..st | 6 - .../instance/mapAccessors..st | 3 - .../instance/mapAllInstVars.st | 3 - .../instance/mapInstVar..st | 3 - .../instance/mapInstVar.to..st | 15 - .../instance/mapInstVars..st | 3 - .../instance/mapInstVars.st | 3 - .../instance/mapProperty.getter.setter..st | 11 - .../instance/propertyNamed.ifAbsent..st | 5 - .../instance/readFrom..st | 15 - .../instance/subjectClass..st | 3 - .../instance/writeObject.on..st | 5 - .../methodProperties.json | 22 - .../properties.json | 15 - .../NeoJSONParseError.class/README.md | 4 - .../methodProperties.json | 4 - .../NeoJSONParseError.class/properties.json | 11 - .../NeoJSONPropertyMapping.class/README.md | 7 - .../instance/getter..st | 3 - .../instance/printOn..st | 4 - .../instance/propertyName..st | 3 - .../instance/propertyName.st | 3 - .../instance/readObject.from..st | 5 - .../instance/setter..st | 3 - .../instance/valueSchema..st | 3 - .../instance/writeObject.on..st | 6 - .../methodProperties.json | 13 - .../properties.json | 16 - .../NeoJSONReader.class/README.md | 29 -- .../NeoJSONReader.class/class/fromString..st | 3 - .../class/fromString.as..st | 3 - .../NeoJSONReader.class/class/on..st | 8 - .../NeoJSONReader.class/instance/atEnd.st | 3 - .../NeoJSONReader.class/instance/close.st | 5 - .../instance/consumeWhitespace.st | 7 - .../NeoJSONReader.class/instance/error..st | 3 - .../instance/expectChar..st | 7 - .../instance/failIfNotAtEnd.st | 4 - .../instance/initialize.st | 4 - .../instance/listClass..st | 3 - .../NeoJSONReader.class/instance/listClass.st | 5 - .../NeoJSONReader.class/instance/mapClass..st | 3 - .../NeoJSONReader.class/instance/mapClass.st | 5 - .../NeoJSONReader.class/instance/match.do..st | 9 - .../instance/matchChar..st | 11 - .../NeoJSONReader.class/instance/next.st | 8 - .../NeoJSONReader.class/instance/nextAs..st | 11 - .../instance/nextListAs..st | 8 - .../NeoJSONReader.class/instance/on..st | 6 - .../instance/parseCharacter.st | 14 - .../instance/parseCharacterHex.st | 14 - .../instance/parseCharacterHex4Value.st | 7 - .../instance/parseCharacterHexDigit.st | 13 - .../instance/parseConstantDo..st | 15 - .../NeoJSONReader.class/instance/parseList.st | 8 - .../instance/parseListDo..st | 13 - .../instance/parseListElementsDo..st | 4 - .../NeoJSONReader.class/instance/parseMap.st | 7 - .../instance/parseMapDo..st | 12 - .../instance/parseMapKeysAndValuesDo..st | 4 - .../instance/parseMapKeysDo..st | 6 - .../instance/parseNumber.st | 13 - .../instance/parseNumberExponent.st | 16 - .../instance/parseNumberFraction.st | 10 - .../instance/parseNumberInteger.st | 9 - .../instance/parsePropertyName.st | 11 - .../instance/parseString.st | 10 - .../parseTrailingSurrogateHexEscape.st | 5 - .../instance/parseValue.st | 15 - .../instance/propertyNamesAsSymbols..st | 3 - .../instance/stringStreamContents..st | 11 - .../instance/unescapeChar..st | 15 - .../NeoJSONReader.class/methodProperties.json | 49 -- .../NeoJSONReader.class/properties.json | 17 - .../NeoJSONStreamingWriter.class/README.md | 4 - .../NeoJSONStreamingWriter.class/class/on..st | 5 - .../instance/initialize.st | 4 - .../instance/on..st | 3 - .../instance/wasUsed.st | 3 - .../instance/writeElement..st | 9 - .../instance/writeElement.as..st | 9 - .../instance/writeKey.value..st | 9 - .../instance/writeKey.value.as..st | 9 - .../instance/writeNil.st | 3 - .../methodProperties.json | 15 - .../properties.json | 14 - .../NeoJSONWriter.class/README.md | 22 - .../NeoJSONWriter.class/class/on..st | 8 - .../NeoJSONWriter.class/class/toString..st | 4 - .../class/toStringPretty..st | 6 - .../instance/asciiOnly..st | 5 - .../NeoJSONWriter.class/instance/close.st | 7 - .../instance/doesCodePointNeedEscaping..st | 5 - .../instance/encodeChar..st | 7 - .../instance/encodeKey.value..st | 7 - .../instance/encodeKey.value.as..st | 7 - .../instance/escapeChar..st | 19 - .../instance/escapeUnicode..st | 15 - .../instance/escapeUnicode4..st | 4 - .../instance/indentedDo..st | 5 - .../instance/initialize.st | 9 - .../instance/listElementSeparator.st | 4 - .../instance/mapElementSeparator.st | 4 - .../NeoJSONWriter.class/instance/newLine..st | 5 - .../NeoJSONWriter.class/instance/newline.st | 6 - .../instance/newlineIndent.st | 6 - .../NeoJSONWriter.class/instance/nextPut..st | 5 - .../instance/nextPut.as..st | 9 - .../NeoJSONWriter.class/instance/on..st | 6 - .../instance/prettyPrint..st | 5 - .../instance/prettyPrintSpace.st | 4 - .../instance/writeBoolean..st | 3 - .../instance/writeFloat..st | 3 - .../instance/writeInteger..st | 4 - .../instance/writeList..st | 5 - .../instance/writeListStreamingDo..st | 5 - .../NeoJSONWriter.class/instance/writeMap..st | 5 - .../instance/writeMapStreamingDo..st | 5 - .../NeoJSONWriter.class/instance/writeNil..st | 5 - .../NeoJSONWriter.class/instance/writeNil.st | 5 - .../NeoJSONWriter.class/instance/writeNull.st | 3 - .../instance/writeObject..st | 7 - .../instance/writeStreamingDo..st | 9 - .../instance/writeString..st | 6 - .../NeoJSONWriter.class/methodProperties.json | 43 -- .../NeoJSONWriter.class/properties.json | 18 - .../Number.extension/instance/neoJsonOn..st | 3 - .../Number.extension/methodProperties.json | 6 - .../Number.extension/properties.json | 3 - .../Object.extension/instance/neoJsonOn..st | 3 - .../Object.extension/methodProperties.json | 6 - .../Object.extension/properties.json | 3 - .../String.extension/instance/neoJsonOn..st | 3 - .../String.extension/methodProperties.json | 6 - .../String.extension/properties.json | 3 - .../instance/neoJsonOn..st | 3 - .../methodProperties.json | 6 - .../UndefinedObject.extension/properties.json | 3 - .../monticello.meta/categories.st | 1 - .../monticello.meta/initializers.st | 0 .../monticello.meta/package | 1 - .../monticello.meta/version | 1 - .../Neo-JSON-Core.package/properties.json | 1 - repository/Neo-JSON-Core/Boolean.extension.st | 6 + .../Neo-JSON-Core/Collection.extension.st | 6 + .../Neo-JSON-Core/Dictionary.extension.st | 6 + repository/Neo-JSON-Core/Integer.extension.st | 6 + .../NeoJSONCustomMapping.class.st | 141 +++++ .../Neo-JSON-Core/NeoJSONMapper.class.st | 130 +++++ .../Neo-JSON-Core/NeoJSONMapping.class.st | 30 ++ .../NeoJSONMappingNotFound.class.st | 77 +++ .../Neo-JSON-Core/NeoJSONObject.class.st | 128 +++++ .../NeoJSONObjectMapping.class.st | 154 ++++++ .../Neo-JSON-Core/NeoJSONParseError.class.st | 11 + .../NeoJSONPropertyMapping.class.st | 66 +++ .../Neo-JSON-Core/NeoJSONReader.class.st | 481 ++++++++++++++++++ .../NeoJSONStreamingWriter.class.st | 87 ++++ .../Neo-JSON-Core/NeoJSONWriter.class.st | 341 +++++++++++++ repository/Neo-JSON-Core/Number.extension.st | 6 + repository/Neo-JSON-Core/Object.extension.st | 6 + repository/Neo-JSON-Core/String.extension.st | 6 + .../UndefinedObject.extension.st | 6 + repository/Neo-JSON-Core/package.st | 1 + .../Neo-JSON-Pharo-Core.package/.filetree | 5 - .../instance/neoJsonOn..st | 3 - .../methodProperties.json | 6 - .../properties.json | 3 - .../instance/neoJsonOn..st | 3 - .../methodProperties.json | 6 - .../SmallDictionary.extension/properties.json | 3 - .../monticello.meta/categories.st | 1 - .../monticello.meta/initializers.st | 0 .../monticello.meta/package | 1 - .../monticello.meta/version | 1 - .../properties.json | 1 - .../OrderedDictionary.extension.st | 6 + .../SmallDictionary.extension.st | 6 + repository/Neo-JSON-Pharo-Core/package.st | 1 + .../Neo-JSON-Pharo-Examples.package/.filetree | 5 - .../Attachment.class/README.md | 0 .../Attachment.class/instance/fileName..st | 3 - .../Attachment.class/instance/url..st | 3 - .../Attachment.class/methodProperties.json | 7 - .../Attachment.class/properties.json | 14 - .../BittrexResponse.class/README.md | 0 .../methodProperties.json | 4 - .../BittrexResponse.class/properties.json | 15 - .../Market.class/README.md | 0 .../Market.class/methodProperties.json | 4 - .../Market.class/properties.json | 23 - .../NeoJSONPharoExamples.class/README.md | 0 .../testAccessingTheNewYorkPublicLibrary.st | 13 - .../instance/testAttachmentsExample.st | 31 -- .../testBittrexLitecoinAsDictionary.st | 10 - .../testBittrexLitecoinAsDomainObjects.st | 16 - .../instance/testDoomtownDBCards.st | 4 - .../instance/testFeed.st | 12 - .../instance/testGetWorldCapitals.st | 4 - .../instance/testGoogleMapsAPI.st | 7 - .../instance/testParsingUserAgentStrings.st | 9 - .../instance/testStackOverflowInfo.st | 6 - .../methodProperties.json | 15 - .../properties.json | 11 - .../monticello.meta/categories.st | 1 - .../monticello.meta/initializers.st | 0 .../monticello.meta/package | 1 - .../monticello.meta/version | 1 - .../properties.json | 1 - .../Attachment.class.st | 19 + .../BittrexResponse.class.st | 10 + .../Neo-JSON-Pharo-Examples/Market.class.st | 18 + .../NeoJSONPharoExamples.class.st | 137 +++++ repository/Neo-JSON-Pharo-Examples/package.st | 1 + .../Neo-JSON-Pharo-Tests.package/.filetree | 5 - .../monticello.meta/categories.st | 1 - .../monticello.meta/initializers.st | 0 .../monticello.meta/package | 1 - .../monticello.meta/version | 1 - .../properties.json | 1 - repository/Neo-JSON-Pharo-Tests/package.st | 1 + repository/Neo-JSON-Tests.package/.filetree | 5 - .../NeoJSONBenchmark.class/README.md | 19 - .../instance/initialize.st | 16 - .../NeoJSONBenchmark.class/instance/read.st | 3 - .../NeoJSONBenchmark.class/instance/write.st | 4 - .../instance/writePrettyPrintedRead.st | 9 - .../methodProperties.json | 9 - .../NeoJSONBenchmark.class/properties.json | 14 - .../NeoJSONBenchmarkTests.class/README.md | 3 - .../instance/testObject2.st | 7 - .../instance/testPrettyPrinted.st | 7 - .../instance/testRead.st | 5 - .../instance/testWrite.st | 5 - .../methodProperties.json | 9 - .../properties.json | 11 - .../NeoJSONExamplesTests.class/README.md | 1 - .../instance/testPoints.st | 33 -- .../instance/testRectanglePoints.st | 29 -- .../instance/testRectanglePointsWithNils.st | 23 - .../methodProperties.json | 8 - .../properties.json | 11 - .../NeoJSONMappingTests.class/README.md | 1 - .../instance/testDynamicTyping.st | 25 - .../testSymbolOrStringInstVarMapping.st | 20 - .../instance/testVirtualTransferObject.st | 27 - .../methodProperties.json | 8 - .../NeoJSONMappingTests.class/properties.json | 11 - .../NeoJSONMockStream.class/README.md | 2 - .../NeoJSONMockStream.class/class/on..st | 5 - .../NeoJSONMockStream.class/instance/atEnd.st | 3 - .../NeoJSONMockStream.class/instance/close.st | 3 - .../NeoJSONMockStream.class/instance/next.st | 3 - .../instance/nextPut..st | 3 - .../instance/nextPutAll..st | 3 - .../NeoJSONMockStream.class/instance/peek.st | 3 - .../instance/peekFor..st | 3 - .../NeoJSONMockStream.class/instance/space.st | 3 - .../instance/stream..st | 3 - .../methodProperties.json | 16 - .../NeoJSONMockStream.class/properties.json | 13 - .../NeoJSONObjectTests.class/README.md | 1 - .../instance/testAtPath.st | 17 - .../instance/testAtPathPut.st | 20 - .../instance/testCRUD.st | 18 - .../instance/testJSON.st | 10 - .../methodProperties.json | 9 - .../NeoJSONObjectTests.class/properties.json | 11 - .../NeoJSONReaderTests.class/README.md | 1 - .../instance/testAllowNil.st | 21 - .../instance/testArrayOfPoints.st | 13 - .../testArrayOfPointsUsingNextListAs.st | 10 - .../instance/testAssociation.st | 10 - .../instance/testBooleans.st | 6 - .../instance/testByteArray.st | 10 - .../instance/testDate.st | 9 - .../instance/testDateAndTime.st | 11 - .../instance/testFloats.st | 23 - .../instance/testIntegers.st | 15 - .../instance/testLists.st | 13 - .../instance/testMaps.st | 15 - .../instance/testNextStringAsHex.st | 11 - .../instance/testNonBMPCharacterDecoding.st | 8 - .../instance/testNull.st | 5 - .../instance/testOrderedCollection.st | 13 - .../instance/testOrderedCollectionOfPoints.st | 13 - .../instance/testParseErrors.st | 9 - .../instance/testPoint.st | 6 - .../instance/testPoint1.st | 11 - .../instance/testPoint2.st | 9 - .../instance/testPoint3.st | 10 - .../instance/testPointUsingAsString.st | 23 - .../instance/testPropertyNamesAsSymbols.st | 11 - .../instance/testSmallDictionary.st | 14 - .../instance/testStrings.st | 27 - .../instance/testSymbol.st | 10 - .../instance/testTime.st | 9 - .../methodProperties.json | 33 -- .../NeoJSONReaderTests.class/properties.json | 11 - .../NeoJSONTestObject1.class/README.md | 18 - .../class/example1.st | 9 - .../class/neoJsonMapping..st | 15 - .../instance/^equals.st | 14 - .../instance/bytes..st | 3 - .../instance/bytes.st | 3 - .../NeoJSONTestObject1.class/instance/hash.st | 3 - .../NeoJSONTestObject1.class/instance/id..st | 3 - .../NeoJSONTestObject1.class/instance/id.st | 3 - .../instance/name..st | 3 - .../NeoJSONTestObject1.class/instance/name.st | 3 - .../instance/points..st | 3 - .../instance/points.st | 3 - .../instance/timestamp..st | 3 - .../instance/timestamp.st | 3 - .../methodProperties.json | 20 - .../NeoJSONTestObject1.class/properties.json | 17 - .../NeoJSONTestObject2.class/README.md | 9 - .../class/benchmark..st | 16 - .../class/benchmark10k.st | 5 - .../class/benchmark10kAsDictionary.st | 5 - .../class/benchmark200k.st | 5 - .../class/benchmarkAsDictionary..st | 16 - .../class/example1.st | 8 - .../class/neoJsonMapping..st | 7 - .../instance/^equals.st | 13 - .../instance/asDictionary.st | 8 - .../instance/data..st | 3 - .../NeoJSONTestObject2.class/instance/data.st | 3 - .../NeoJSONTestObject2.class/instance/hash.st | 3 - .../instance/height..st | 3 - .../instance/height.st | 3 - .../NeoJSONTestObject2.class/instance/id..st | 3 - .../NeoJSONTestObject2.class/instance/id.st | 3 - .../instance/width..st | 3 - .../instance/width.st | 3 - .../methodProperties.json | 24 - .../NeoJSONTestObject2.class/properties.json | 16 - .../NeoJSONTestObject3.class/README.md | 7 - .../class/example1.st | 7 - .../class/neoJsonMapping..st | 8 - .../instance/^equals.st | 5 - .../instance/asDictionary.st | 6 - .../instance/color..st | 3 - .../instance/color.st | 3 - .../instance/transparent..st | 3 - .../instance/transparent.st | 3 - .../methodProperties.json | 14 - .../NeoJSONTestObject3.class/properties.json | 14 - .../NeoJSONValidation.class/README.md | 27 - .../instance/closeLog.st | 8 - .../instance/ensureLog.st | 6 - .../instance/gitDirectory..st | 3 - .../instance/gitDirectory.st | 3 - .../instance/jsonTestSuiteDirectory.st | 3 - .../jsonTestSuiteTestParsingDirectory.st | 3 - .../jsonTestSuiteTestParsingFailFiles.st | 3 - .../jsonTestSuiteTestParsingInfoFiles.st | 3 - .../jsonTestSuiteTestParsingPassFiles.st | 3 - .../jsonTestSuiteTestTransformDirectory.st | 3 - .../NeoJSONValidation.class/instance/log..st | 4 - .../instance/logFile.st | 3 - .../nativeJsonBenchmarkDataDirectory.st | 3 - .../instance/nativeJsonBenchmarkDirectory.st | 3 - ...nativeJsonBenchmarkJsonCheckerDirectory.st | 3 - ...nativeJsonBenchmarkJsonCheckerFailFiles.st | 3 - ...nativeJsonBenchmarkJsonCheckerPassFiles.st | 3 - .../nativeJsonBenchmarkRoundTripDirectory.st | 3 - .../nativeJsonBenchmarkRoundTripFiles.st | 3 - .../runJsonTestSuiteTestParsingFailures.st | 11 - .../runJsonTestSuiteTestParsingInfo.st | 11 - .../runJsonTestSuiteTestParsingPasses.st | 11 - ...nNativeJsonBenchmarkJsonCheckerFailures.st | 11 - ...runNativeJsonBenchmarkJsonCheckerPasses.st | 11 - .../runNativeJsonBenchmarkRoundTrip.st | 9 - .../instance/validateFiles.usingTest..st | 18 - .../methodProperties.json | 31 -- .../NeoJSONValidation.class/properties.json | 14 - .../README.md | 1 - .../instance/writeRead..st | 6 - .../methodProperties.json | 6 - .../properties.json | 11 - .../README.md | 1 - .../instance/writeRead..st | 8 - .../methodProperties.json | 6 - .../properties.json | 11 - .../README.md | 1 - .../instance/testDictionaryOfObject2.st | 14 - .../instance/testObject1.st | 7 - .../instance/testObject2.st | 7 - .../instance/testObject3.st | 7 - .../instance/writeRead..st | 8 - .../methodProperties.json | 10 - .../properties.json | 11 - .../NeoJSONWriteReadTests.class/README.md | 1 - .../instance/testDictionaryOfObject2.st | 14 - .../instance/testFloats.st | 7 - .../instance/testIntegers.st | 7 - .../instance/testLists.st | 7 - .../instance/testMaps.st | 10 - .../instance/testObject1.st | 7 - .../instance/testObject2.st | 7 - .../instance/testObject3.st | 7 - .../instance/testSpecials.st | 7 - .../instance/testStrings.st | 12 - .../instance/writeRead..st | 6 - .../methodProperties.json | 16 - .../properties.json | 11 - .../NeoJSONWriterTests.class/README.md | 1 - .../instance/testAsciiOnlyStrings.st | 25 - .../instance/testAssociation.st | 11 - .../instance/testBooleans.st | 8 - .../instance/testByteArray.st | 8 - .../instance/testDate.st | 10 - .../instance/testDateAndTime.st | 12 - .../instance/testFloats.st | 9 - .../instance/testIntegers.st | 9 - .../instance/testLists.st | 8 - .../instance/testListsExtra.st | 10 - .../instance/testMaps.st | 9 - .../instance/testMapsExtra.st | 14 - .../instance/testNextPutStringAsHex.st | 13 - .../instance/testNonBMPCharacterEncoding.st | 9 - .../instance/testNull.st | 7 - .../instance/testPoint.st | 7 - .../instance/testPoint1.st | 12 - .../instance/testPoint2.st | 10 - .../instance/testPoint3.st | 11 - .../instance/testPointUsingAsString.st | 25 - .../instance/testPointWriteNil.st | 11 - .../instance/testPreservePropertyOrder.st | 26 - .../instance/testStrings.st | 23 - .../instance/testSymbol.st | 8 - .../instance/testTime.st | 10 - .../methodProperties.json | 30 -- .../NeoJSONWriterTests.class/properties.json | 11 - .../monticello.meta/categories.st | 1 - .../monticello.meta/initializers.st | 0 .../monticello.meta/package | 1 - .../monticello.meta/version | 1 - .../Neo-JSON-Tests.package/properties.json | 1 - .../Neo-JSON-Tests/NeoJSONBenchmark.class.st | 72 +++ .../NeoJSONBenchmarkTests.class.st | 42 ++ .../NeoJSONExamplesTests.class.st | 99 ++++ .../NeoJSONMappingTests.class.st | 86 ++++ .../Neo-JSON-Tests/NeoJSONMockStream.class.st | 64 +++ .../NeoJSONObjectTests.class.st | 84 +++ .../NeoJSONReaderTests.class.st | 412 +++++++++++++++ .../NeoJSONTestObject1.class.st | 132 +++++ .../NeoJSONTestObject2.class.st | 168 ++++++ .../NeoJSONTestObject3.class.st | 73 +++ .../Neo-JSON-Tests/NeoJSONValidation.class.st | 239 +++++++++ .../NeoJSONWriteReadAsciiOnlyTests.class.st | 16 + .../NeoJSONWriteReadMockStreamTests.class.st | 18 + ...eoJSONWriteReadPrettyPrintedTests.class.st | 61 +++ .../NeoJSONWriteReadTests.class.st | 121 +++++ .../NeoJSONWriterTests.class.st | 372 ++++++++++++++ repository/Neo-JSON-Tests/package.st | 1 + 592 files changed, 4412 insertions(+), 4411 deletions(-) delete mode 100644 repository/.filetree delete mode 100644 repository/BaselineOfNeoJSON.package/.filetree delete mode 100644 repository/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/README.md delete mode 100644 repository/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/properties.json delete mode 100644 repository/BaselineOfNeoJSON.package/monticello.meta/categories.st delete mode 100644 repository/BaselineOfNeoJSON.package/monticello.meta/initializers.st delete mode 100644 repository/BaselineOfNeoJSON.package/monticello.meta/package delete mode 100644 repository/BaselineOfNeoJSON.package/properties.json rename repository/{BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/instance/baseline..st => BaselineOfNeoJSON/BaselineOfNeoJSON.class.st} (69%) create mode 100644 repository/BaselineOfNeoJSON/package.st delete mode 100644 repository/ConfigurationOfNeoJSON.package/.filetree delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/README.md delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/DevelopmentSupport.st delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/baseConfigurationClassIfAbsent..st delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogContactInfo.st delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogDescription.st delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogKeywords.st delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/ensureMetacello.st delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/ensureMetacelloBaseConfiguration.st delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/isMetacelloConfig.st delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/load.st delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/loadBleedingEdge.st delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/loadDevelopment.st delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/project.st delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/validate.st delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline1..st delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline2..st delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline3..st delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/bleedingEdge..st delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/development..st delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/project.st delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/stable..st delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version1..st delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version10..st delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version11..st delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version12..st delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version13..st delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version14..st delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version15..st delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version16..st delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version17..st delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version2..st delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version3..st delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version30..st delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version4..st delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version5..st delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version6..st delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version7..st delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version8..st delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version9..st delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/methodProperties.json delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/properties.json delete mode 100644 repository/ConfigurationOfNeoJSON.package/monticello.meta/categories.st delete mode 100644 repository/ConfigurationOfNeoJSON.package/monticello.meta/initializers.st delete mode 100644 repository/ConfigurationOfNeoJSON.package/monticello.meta/package delete mode 100644 repository/ConfigurationOfNeoJSON.package/monticello.meta/version delete mode 100644 repository/ConfigurationOfNeoJSON.package/properties.json create mode 100644 repository/ConfigurationOfNeoJSON/ConfigurationOfNeoJSON.class.st create mode 100644 repository/ConfigurationOfNeoJSON/package.st delete mode 100644 repository/Neo-JSON-Core.package/.filetree delete mode 100644 repository/Neo-JSON-Core.package/Boolean.extension/instance/neoJsonOn..st delete mode 100644 repository/Neo-JSON-Core.package/Boolean.extension/methodProperties.json delete mode 100644 repository/Neo-JSON-Core.package/Boolean.extension/properties.json delete mode 100644 repository/Neo-JSON-Core.package/Collection.extension/instance/neoJsonOn..st delete mode 100644 repository/Neo-JSON-Core.package/Collection.extension/methodProperties.json delete mode 100644 repository/Neo-JSON-Core.package/Collection.extension/properties.json delete mode 100644 repository/Neo-JSON-Core.package/Dictionary.extension/instance/neoJsonOn..st delete mode 100644 repository/Neo-JSON-Core.package/Dictionary.extension/methodProperties.json delete mode 100644 repository/Neo-JSON-Core.package/Dictionary.extension/properties.json delete mode 100644 repository/Neo-JSON-Core.package/Integer.extension/instance/neoJsonOn..st delete mode 100644 repository/Neo-JSON-Core.package/Integer.extension/methodProperties.json delete mode 100644 repository/Neo-JSON-Core.package/Integer.extension/properties.json delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/README.md delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/decoder..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/encoder..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/identifier.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfElementSchema..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfType..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfType.andElementSchema..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/mapWithValueSchema..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/readFrom..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/reader..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/schemaName..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/writeObject.on..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/writer..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/methodProperties.json delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/properties.json delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONMapper.class/README.md delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONMapper.class/instance/customMappingFor..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONMapper.class/instance/for.customDo..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONMapper.class/instance/for.do..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONMapper.class/instance/mapAllInstVarsFor..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONMapper.class/instance/mapInstVarsFor..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONMapper.class/instance/mappingFor..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONMapper.class/instance/mappingFor.ifAbsent..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONMapper.class/instance/mappings.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONMapper.class/instance/objectMappingFor..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONMapper.class/instance/resolveMappingFor..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONMapper.class/methodProperties.json delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONMapper.class/properties.json delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONMapping.class/README.md delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONMapping.class/instance/identifier.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONMapping.class/instance/printOn..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONMapping.class/instance/readFrom..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONMapping.class/instance/writeObject.on..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONMapping.class/methodProperties.json delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONMapping.class/properties.json delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/README.md delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/class/signalFor..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/class/signalFor.in..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/collection..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/collection.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/messageText.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/object..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/object.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/standardMessageText.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/methodProperties.json delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/properties.json delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONObject.class/README.md delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONObject.class/class/fromString..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/at..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/atPath..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/atPath.put..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/doesNotUnderstand..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/name.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/printOn..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/value.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONObject.class/methodProperties.json delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONObject.class/properties.json delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/README.md delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/allowNil.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/identifier.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/initialize.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAccessor..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAccessor.mutator.to..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAccessor.to..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAccessors..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAllInstVars.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVar..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVar.to..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVars..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVars.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapProperty.getter.setter..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/propertyNamed.ifAbsent..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/readFrom..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/subjectClass..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/writeObject.on..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/methodProperties.json delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/properties.json delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONParseError.class/README.md delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONParseError.class/methodProperties.json delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONParseError.class/properties.json delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/README.md delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/getter..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/printOn..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/propertyName..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/propertyName.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/readObject.from..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/setter..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/valueSchema..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/writeObject.on..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/methodProperties.json delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/properties.json delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/README.md delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/class/fromString..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/class/fromString.as..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/class/on..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/atEnd.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/close.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/consumeWhitespace.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/error..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/expectChar..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/failIfNotAtEnd.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/initialize.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/listClass..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/listClass.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/mapClass..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/mapClass.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/match.do..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/matchChar..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/next.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/nextAs..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/nextListAs..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/on..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacter.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacterHex.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacterHex4Value.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacterHexDigit.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseConstantDo..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseList.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseListDo..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseListElementsDo..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseMap.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseMapDo..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseMapKeysAndValuesDo..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseMapKeysDo..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseNumber.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseNumberExponent.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseNumberFraction.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseNumberInteger.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parsePropertyName.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseString.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseTrailingSurrogateHexEscape.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseValue.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/propertyNamesAsSymbols..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/stringStreamContents..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/unescapeChar..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/methodProperties.json delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/properties.json delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/README.md delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/class/on..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/initialize.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/on..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/wasUsed.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeElement..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeElement.as..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeKey.value..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeKey.value.as..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeNil.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/methodProperties.json delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/properties.json delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/README.md delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/class/on..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/class/toString..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/class/toStringPretty..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/asciiOnly..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/close.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/doesCodePointNeedEscaping..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/encodeChar..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/encodeKey.value..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/encodeKey.value.as..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/escapeChar..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/escapeUnicode..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/escapeUnicode4..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/indentedDo..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/initialize.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/listElementSeparator.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/mapElementSeparator.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/newLine..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/newline.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/newlineIndent.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/nextPut..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/nextPut.as..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/on..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/prettyPrint..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/prettyPrintSpace.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeBoolean..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeFloat..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeInteger..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeList..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeListStreamingDo..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeMap..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeMapStreamingDo..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeNil..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeNil.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeNull.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeObject..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeStreamingDo..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeString..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/methodProperties.json delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/properties.json delete mode 100644 repository/Neo-JSON-Core.package/Number.extension/instance/neoJsonOn..st delete mode 100644 repository/Neo-JSON-Core.package/Number.extension/methodProperties.json delete mode 100644 repository/Neo-JSON-Core.package/Number.extension/properties.json delete mode 100644 repository/Neo-JSON-Core.package/Object.extension/instance/neoJsonOn..st delete mode 100644 repository/Neo-JSON-Core.package/Object.extension/methodProperties.json delete mode 100644 repository/Neo-JSON-Core.package/Object.extension/properties.json delete mode 100644 repository/Neo-JSON-Core.package/String.extension/instance/neoJsonOn..st delete mode 100644 repository/Neo-JSON-Core.package/String.extension/methodProperties.json delete mode 100644 repository/Neo-JSON-Core.package/String.extension/properties.json delete mode 100644 repository/Neo-JSON-Core.package/UndefinedObject.extension/instance/neoJsonOn..st delete mode 100644 repository/Neo-JSON-Core.package/UndefinedObject.extension/methodProperties.json delete mode 100644 repository/Neo-JSON-Core.package/UndefinedObject.extension/properties.json delete mode 100644 repository/Neo-JSON-Core.package/monticello.meta/categories.st delete mode 100644 repository/Neo-JSON-Core.package/monticello.meta/initializers.st delete mode 100644 repository/Neo-JSON-Core.package/monticello.meta/package delete mode 100644 repository/Neo-JSON-Core.package/monticello.meta/version delete mode 100644 repository/Neo-JSON-Core.package/properties.json create mode 100644 repository/Neo-JSON-Core/Boolean.extension.st create mode 100644 repository/Neo-JSON-Core/Collection.extension.st create mode 100644 repository/Neo-JSON-Core/Dictionary.extension.st create mode 100644 repository/Neo-JSON-Core/Integer.extension.st create mode 100644 repository/Neo-JSON-Core/NeoJSONCustomMapping.class.st create mode 100644 repository/Neo-JSON-Core/NeoJSONMapper.class.st create mode 100644 repository/Neo-JSON-Core/NeoJSONMapping.class.st create mode 100644 repository/Neo-JSON-Core/NeoJSONMappingNotFound.class.st create mode 100644 repository/Neo-JSON-Core/NeoJSONObject.class.st create mode 100644 repository/Neo-JSON-Core/NeoJSONObjectMapping.class.st create mode 100644 repository/Neo-JSON-Core/NeoJSONParseError.class.st create mode 100644 repository/Neo-JSON-Core/NeoJSONPropertyMapping.class.st create mode 100644 repository/Neo-JSON-Core/NeoJSONReader.class.st create mode 100644 repository/Neo-JSON-Core/NeoJSONStreamingWriter.class.st create mode 100644 repository/Neo-JSON-Core/NeoJSONWriter.class.st create mode 100644 repository/Neo-JSON-Core/Number.extension.st create mode 100644 repository/Neo-JSON-Core/Object.extension.st create mode 100644 repository/Neo-JSON-Core/String.extension.st create mode 100644 repository/Neo-JSON-Core/UndefinedObject.extension.st create mode 100644 repository/Neo-JSON-Core/package.st delete mode 100644 repository/Neo-JSON-Pharo-Core.package/.filetree delete mode 100644 repository/Neo-JSON-Pharo-Core.package/OrderedDictionary.extension/instance/neoJsonOn..st delete mode 100644 repository/Neo-JSON-Pharo-Core.package/OrderedDictionary.extension/methodProperties.json delete mode 100644 repository/Neo-JSON-Pharo-Core.package/OrderedDictionary.extension/properties.json delete mode 100644 repository/Neo-JSON-Pharo-Core.package/SmallDictionary.extension/instance/neoJsonOn..st delete mode 100644 repository/Neo-JSON-Pharo-Core.package/SmallDictionary.extension/methodProperties.json delete mode 100644 repository/Neo-JSON-Pharo-Core.package/SmallDictionary.extension/properties.json delete mode 100644 repository/Neo-JSON-Pharo-Core.package/monticello.meta/categories.st delete mode 100644 repository/Neo-JSON-Pharo-Core.package/monticello.meta/initializers.st delete mode 100644 repository/Neo-JSON-Pharo-Core.package/monticello.meta/package delete mode 100644 repository/Neo-JSON-Pharo-Core.package/monticello.meta/version delete mode 100644 repository/Neo-JSON-Pharo-Core.package/properties.json create mode 100644 repository/Neo-JSON-Pharo-Core/OrderedDictionary.extension.st create mode 100644 repository/Neo-JSON-Pharo-Core/SmallDictionary.extension.st create mode 100644 repository/Neo-JSON-Pharo-Core/package.st delete mode 100644 repository/Neo-JSON-Pharo-Examples.package/.filetree delete mode 100644 repository/Neo-JSON-Pharo-Examples.package/Attachment.class/README.md delete mode 100644 repository/Neo-JSON-Pharo-Examples.package/Attachment.class/instance/fileName..st delete mode 100644 repository/Neo-JSON-Pharo-Examples.package/Attachment.class/instance/url..st delete mode 100644 repository/Neo-JSON-Pharo-Examples.package/Attachment.class/methodProperties.json delete mode 100644 repository/Neo-JSON-Pharo-Examples.package/Attachment.class/properties.json delete mode 100644 repository/Neo-JSON-Pharo-Examples.package/BittrexResponse.class/README.md delete mode 100644 repository/Neo-JSON-Pharo-Examples.package/BittrexResponse.class/methodProperties.json delete mode 100644 repository/Neo-JSON-Pharo-Examples.package/BittrexResponse.class/properties.json delete mode 100644 repository/Neo-JSON-Pharo-Examples.package/Market.class/README.md delete mode 100644 repository/Neo-JSON-Pharo-Examples.package/Market.class/methodProperties.json delete mode 100644 repository/Neo-JSON-Pharo-Examples.package/Market.class/properties.json delete mode 100644 repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/README.md delete mode 100644 repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testAccessingTheNewYorkPublicLibrary.st delete mode 100644 repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testAttachmentsExample.st delete mode 100644 repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testBittrexLitecoinAsDictionary.st delete mode 100644 repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testBittrexLitecoinAsDomainObjects.st delete mode 100644 repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testDoomtownDBCards.st delete mode 100644 repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testFeed.st delete mode 100644 repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testGetWorldCapitals.st delete mode 100644 repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testGoogleMapsAPI.st delete mode 100644 repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testParsingUserAgentStrings.st delete mode 100644 repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testStackOverflowInfo.st delete mode 100644 repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/methodProperties.json delete mode 100644 repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/properties.json delete mode 100644 repository/Neo-JSON-Pharo-Examples.package/monticello.meta/categories.st delete mode 100644 repository/Neo-JSON-Pharo-Examples.package/monticello.meta/initializers.st delete mode 100644 repository/Neo-JSON-Pharo-Examples.package/monticello.meta/package delete mode 100644 repository/Neo-JSON-Pharo-Examples.package/monticello.meta/version delete mode 100644 repository/Neo-JSON-Pharo-Examples.package/properties.json create mode 100644 repository/Neo-JSON-Pharo-Examples/Attachment.class.st create mode 100644 repository/Neo-JSON-Pharo-Examples/BittrexResponse.class.st create mode 100644 repository/Neo-JSON-Pharo-Examples/Market.class.st create mode 100644 repository/Neo-JSON-Pharo-Examples/NeoJSONPharoExamples.class.st create mode 100644 repository/Neo-JSON-Pharo-Examples/package.st delete mode 100644 repository/Neo-JSON-Pharo-Tests.package/.filetree delete mode 100644 repository/Neo-JSON-Pharo-Tests.package/monticello.meta/categories.st delete mode 100644 repository/Neo-JSON-Pharo-Tests.package/monticello.meta/initializers.st delete mode 100644 repository/Neo-JSON-Pharo-Tests.package/monticello.meta/package delete mode 100644 repository/Neo-JSON-Pharo-Tests.package/monticello.meta/version delete mode 100644 repository/Neo-JSON-Pharo-Tests.package/properties.json create mode 100644 repository/Neo-JSON-Pharo-Tests/package.st delete mode 100644 repository/Neo-JSON-Tests.package/.filetree delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONBenchmark.class/README.md delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONBenchmark.class/instance/initialize.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONBenchmark.class/instance/read.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONBenchmark.class/instance/write.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONBenchmark.class/instance/writePrettyPrintedRead.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONBenchmark.class/methodProperties.json delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONBenchmark.class/properties.json delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/README.md delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/instance/testObject2.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/instance/testPrettyPrinted.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/instance/testRead.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/instance/testWrite.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/methodProperties.json delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/properties.json delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/README.md delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testPoints.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testRectanglePoints.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testRectanglePointsWithNils.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/methodProperties.json delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/properties.json delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/README.md delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/instance/testDynamicTyping.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/instance/testSymbolOrStringInstVarMapping.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/instance/testVirtualTransferObject.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/methodProperties.json delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/properties.json delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/README.md delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/class/on..st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/atEnd.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/close.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/next.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/nextPut..st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/nextPutAll..st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/peek.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/peekFor..st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/space.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/stream..st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/methodProperties.json delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/properties.json delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/README.md delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testAtPath.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testAtPathPut.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testCRUD.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testJSON.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/methodProperties.json delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/properties.json delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/README.md delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testAllowNil.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testArrayOfPoints.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testArrayOfPointsUsingNextListAs.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testAssociation.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testBooleans.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testByteArray.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testDate.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testDateAndTime.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testFloats.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testIntegers.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testLists.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testMaps.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testNextStringAsHex.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testNonBMPCharacterDecoding.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testNull.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testOrderedCollection.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testOrderedCollectionOfPoints.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testParseErrors.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPoint.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPoint1.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPoint2.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPoint3.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPointUsingAsString.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPropertyNamesAsSymbols.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testSmallDictionary.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testStrings.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testSymbol.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testTime.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/methodProperties.json delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/properties.json delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/README.md delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/class/example1.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/class/neoJsonMapping..st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/^equals.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/bytes..st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/bytes.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/hash.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/id..st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/id.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/name..st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/name.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/points..st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/points.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/timestamp..st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/timestamp.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/methodProperties.json delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/properties.json delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/README.md delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmark..st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmark10k.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmark10kAsDictionary.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmark200k.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmarkAsDictionary..st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/example1.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/neoJsonMapping..st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/^equals.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/asDictionary.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/data..st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/data.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/hash.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/height..st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/height.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/id..st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/id.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/width..st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/width.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/methodProperties.json delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/properties.json delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/README.md delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/class/example1.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/class/neoJsonMapping..st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/^equals.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/asDictionary.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/color..st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/color.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/transparent..st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/transparent.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/methodProperties.json delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/properties.json delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/README.md delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/closeLog.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/ensureLog.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/gitDirectory..st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/gitDirectory.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteDirectory.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingDirectory.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingFailFiles.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingInfoFiles.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingPassFiles.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestTransformDirectory.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/log..st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/logFile.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkDataDirectory.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkDirectory.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkJsonCheckerDirectory.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkJsonCheckerFailFiles.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkJsonCheckerPassFiles.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkRoundTripDirectory.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkRoundTripFiles.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runJsonTestSuiteTestParsingFailures.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runJsonTestSuiteTestParsingInfo.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runJsonTestSuiteTestParsingPasses.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runNativeJsonBenchmarkJsonCheckerFailures.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runNativeJsonBenchmarkJsonCheckerPasses.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runNativeJsonBenchmarkRoundTrip.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/validateFiles.usingTest..st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/methodProperties.json delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONValidation.class/properties.json delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/README.md delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/instance/writeRead..st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/methodProperties.json delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/properties.json delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriteReadMockStreamTests.class/README.md delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriteReadMockStreamTests.class/instance/writeRead..st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriteReadMockStreamTests.class/methodProperties.json delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriteReadMockStreamTests.class/properties.json delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/README.md delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/testDictionaryOfObject2.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/testObject1.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/testObject2.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/testObject3.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/writeRead..st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/methodProperties.json delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/properties.json delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/README.md delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testDictionaryOfObject2.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testFloats.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testIntegers.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testLists.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testMaps.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testObject1.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testObject2.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testObject3.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testSpecials.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testStrings.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/writeRead..st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/methodProperties.json delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/properties.json delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/README.md delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testAsciiOnlyStrings.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testAssociation.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testBooleans.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testByteArray.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testDate.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testDateAndTime.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testFloats.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testIntegers.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testLists.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testListsExtra.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testMaps.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testMapsExtra.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testNextPutStringAsHex.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testNonBMPCharacterEncoding.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testNull.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPoint.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPoint1.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPoint2.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPoint3.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPointUsingAsString.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPointWriteNil.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPreservePropertyOrder.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testStrings.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testSymbol.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testTime.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/methodProperties.json delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/properties.json delete mode 100644 repository/Neo-JSON-Tests.package/monticello.meta/categories.st delete mode 100644 repository/Neo-JSON-Tests.package/monticello.meta/initializers.st delete mode 100644 repository/Neo-JSON-Tests.package/monticello.meta/package delete mode 100644 repository/Neo-JSON-Tests.package/monticello.meta/version delete mode 100644 repository/Neo-JSON-Tests.package/properties.json create mode 100644 repository/Neo-JSON-Tests/NeoJSONBenchmark.class.st create mode 100644 repository/Neo-JSON-Tests/NeoJSONBenchmarkTests.class.st create mode 100644 repository/Neo-JSON-Tests/NeoJSONExamplesTests.class.st create mode 100644 repository/Neo-JSON-Tests/NeoJSONMappingTests.class.st create mode 100644 repository/Neo-JSON-Tests/NeoJSONMockStream.class.st create mode 100644 repository/Neo-JSON-Tests/NeoJSONObjectTests.class.st create mode 100644 repository/Neo-JSON-Tests/NeoJSONReaderTests.class.st create mode 100644 repository/Neo-JSON-Tests/NeoJSONTestObject1.class.st create mode 100644 repository/Neo-JSON-Tests/NeoJSONTestObject2.class.st create mode 100644 repository/Neo-JSON-Tests/NeoJSONTestObject3.class.st create mode 100644 repository/Neo-JSON-Tests/NeoJSONValidation.class.st create mode 100644 repository/Neo-JSON-Tests/NeoJSONWriteReadAsciiOnlyTests.class.st create mode 100644 repository/Neo-JSON-Tests/NeoJSONWriteReadMockStreamTests.class.st create mode 100644 repository/Neo-JSON-Tests/NeoJSONWriteReadPrettyPrintedTests.class.st create mode 100644 repository/Neo-JSON-Tests/NeoJSONWriteReadTests.class.st create mode 100644 repository/Neo-JSON-Tests/NeoJSONWriterTests.class.st create mode 100644 repository/Neo-JSON-Tests/package.st diff --git a/repository/.filetree b/repository/.filetree deleted file mode 100644 index febe4a5..0000000 --- a/repository/.filetree +++ /dev/null @@ -1 +0,0 @@ -{ "packageExtension" : ".package" } diff --git a/repository/.properties b/repository/.properties index c2bedd4..4e21084 100644 --- a/repository/.properties +++ b/repository/.properties @@ -1,3 +1,4 @@ { - #format : #filetree + #format : #tonel +}e } \ No newline at end of file diff --git a/repository/BaselineOfNeoJSON.package/.filetree b/repository/BaselineOfNeoJSON.package/.filetree deleted file mode 100644 index 57a6797..0000000 --- a/repository/BaselineOfNeoJSON.package/.filetree +++ /dev/null @@ -1,5 +0,0 @@ -{ - "separateMethodMetaAndSource" : false, - "noMethodMetaData" : true, - "useCypressPropertiesFile" : true -} \ No newline at end of file diff --git a/repository/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/README.md b/repository/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/README.md deleted file mode 100644 index 628fec7..0000000 --- a/repository/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/README.md +++ /dev/null @@ -1,2 +0,0 @@ -I am BaselineOfNeoJSON, I load the code for the NeoJSON project. -I am a BaselineOf. \ No newline at end of file diff --git a/repository/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/properties.json b/repository/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/properties.json deleted file mode 100644 index be60e1c..0000000 --- a/repository/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/properties.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "commentStamp" : "SvenVanCaekenberghe 10/1/2018 23:01", - "super" : "BaselineOf", - "category" : "BaselineOfNeoJSON", - "classinstvars" : [ ], - "pools" : [ ], - "classvars" : [ ], - "instvars" : [ ], - "name" : "BaselineOfNeoJSON", - "type" : "normal" -} \ No newline at end of file diff --git a/repository/BaselineOfNeoJSON.package/monticello.meta/categories.st b/repository/BaselineOfNeoJSON.package/monticello.meta/categories.st deleted file mode 100644 index 3cb50fe..0000000 --- a/repository/BaselineOfNeoJSON.package/monticello.meta/categories.st +++ /dev/null @@ -1 +0,0 @@ -SystemOrganization addCategory: #BaselineOfNeoJSON! diff --git a/repository/BaselineOfNeoJSON.package/monticello.meta/initializers.st b/repository/BaselineOfNeoJSON.package/monticello.meta/initializers.st deleted file mode 100644 index e69de29..0000000 diff --git a/repository/BaselineOfNeoJSON.package/monticello.meta/package b/repository/BaselineOfNeoJSON.package/monticello.meta/package deleted file mode 100644 index 11d829c..0000000 --- a/repository/BaselineOfNeoJSON.package/monticello.meta/package +++ /dev/null @@ -1 +0,0 @@ -(name 'BaselineOfNeoJSON') \ No newline at end of file diff --git a/repository/BaselineOfNeoJSON.package/properties.json b/repository/BaselineOfNeoJSON.package/properties.json deleted file mode 100644 index 6f31cf5..0000000 --- a/repository/BaselineOfNeoJSON.package/properties.json +++ /dev/null @@ -1 +0,0 @@ -{ } \ No newline at end of file diff --git a/repository/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/instance/baseline..st b/repository/BaselineOfNeoJSON/BaselineOfNeoJSON.class.st similarity index 69% rename from repository/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/instance/baseline..st rename to repository/BaselineOfNeoJSON/BaselineOfNeoJSON.class.st index 7a62c72..b981f21 100644 --- a/repository/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/instance/baseline..st +++ b/repository/BaselineOfNeoJSON/BaselineOfNeoJSON.class.st @@ -1,5 +1,15 @@ -baselines -baseline: spec +" +I am BaselineOfNeoJSON, I load the code for the NeoJSON project. +I am a BaselineOf. +" +Class { + #name : #BaselineOfNeoJSON, + #superclass : #BaselineOf, + #category : 'BaselineOfNeoJSON' +} + +{ #category : #baselines } +BaselineOfNeoJSON >> baseline: spec [ spec for: #common @@ -17,4 +27,5 @@ baseline: spec package: 'Neo-JSON-Pharo-Examples' with: [ spec requires: #('Neo-JSON-Core') ]; group: 'core' with: #('Neo-JSON-Core' 'Neo-JSON-Pharo-Core'); group: 'tests' with: #('Neo-JSON-Tests' 'Neo-JSON-Pharo-Tests'); - group: 'examples' with: #('Neo-JSON-Pharo-Examples') ]. \ No newline at end of file + group: 'examples' with: #('Neo-JSON-Pharo-Examples') ]. +] diff --git a/repository/BaselineOfNeoJSON/package.st b/repository/BaselineOfNeoJSON/package.st new file mode 100644 index 0000000..90e5053 --- /dev/null +++ b/repository/BaselineOfNeoJSON/package.st @@ -0,0 +1 @@ +Package { #name : #BaselineOfNeoJSON } diff --git a/repository/ConfigurationOfNeoJSON.package/.filetree b/repository/ConfigurationOfNeoJSON.package/.filetree deleted file mode 100644 index 57a6797..0000000 --- a/repository/ConfigurationOfNeoJSON.package/.filetree +++ /dev/null @@ -1,5 +0,0 @@ -{ - "separateMethodMetaAndSource" : false, - "noMethodMetaData" : true, - "useCypressPropertiesFile" : true -} \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/README.md b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/README.md deleted file mode 100644 index a4abe8c..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/README.md +++ /dev/null @@ -1,3 +0,0 @@ -I am ConfigurationOfNeoJSON, a Metacello configuration for NeoJSON. - -NeoJSON is a flexible and efficient reader and writer for JSON. \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/DevelopmentSupport.st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/DevelopmentSupport.st deleted file mode 100644 index f188387..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/DevelopmentSupport.st +++ /dev/null @@ -1,5 +0,0 @@ -development support -DevelopmentSupport - -"See the methods in the 'development support' category on the class-side of MetacelloBaseConfiguration. Decide what development support methods you would like to use and copy them the the class-side of your configuration." - diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/baseConfigurationClassIfAbsent..st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/baseConfigurationClassIfAbsent..st deleted file mode 100644 index e906812..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/baseConfigurationClassIfAbsent..st +++ /dev/null @@ -1,8 +0,0 @@ -private -baseConfigurationClassIfAbsent: aBlock - - ^Smalltalk - at: #MetacelloBaseConfiguration - ifAbsent: [ - self ensureMetacelloBaseConfiguration. - Smalltalk at: #MetacelloBaseConfiguration ifAbsent: aBlock ]. diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogContactInfo.st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogContactInfo.st deleted file mode 100644 index ab72693..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogContactInfo.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -catalogContactInfo - ^ 'Written and maintained by Sven Van Caekenberghe (http://stfx.eu) and the community. Discussions on the Pharo mailing lists.' \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogDescription.st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogDescription.st deleted file mode 100644 index 19d3548..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogDescription.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -catalogDescription - ^ 'JSON (JavaScript Object Notation) is a popular data-interchange format. NeoJSON is an elegant and efficient standalone Smalltalk framework to read and write JSON converting to or from Smalltalk objects.' \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogKeywords.st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogKeywords.st deleted file mode 100644 index 6b63bcb..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogKeywords.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -catalogKeywords - ^ #(format input output json serialization encoding text javascript) \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/ensureMetacello.st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/ensureMetacello.st deleted file mode 100644 index 869b381..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/ensureMetacello.st +++ /dev/null @@ -1,4 +0,0 @@ -private -ensureMetacello - - (self baseConfigurationClassIfAbsent: []) ensureMetacello \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/ensureMetacelloBaseConfiguration.st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/ensureMetacelloBaseConfiguration.st deleted file mode 100644 index 7605398..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/ensureMetacelloBaseConfiguration.st +++ /dev/null @@ -1,14 +0,0 @@ -private -ensureMetacelloBaseConfiguration - - Smalltalk - at: #MetacelloBaseConfiguration - ifAbsent: [ - | repository version | - repository := MCHttpRepository location: 'http://seaside.gemstone.com/ss/metacello' user: '' password: ''. - repository - versionReaderForFileNamed: 'Metacello-Base-DaleHenrichs.2.mcz' - do: [ :reader | - version := reader version. - version load. - version workingCopy repositoryGroup addRepository: repository ] ] \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/isMetacelloConfig.st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/isMetacelloConfig.st deleted file mode 100644 index 98d81c7..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/isMetacelloConfig.st +++ /dev/null @@ -1,5 +0,0 @@ -metacello tool support -isMetacelloConfig - "Answer true and the Metacello tools will operate on you" - - ^true \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/load.st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/load.st deleted file mode 100644 index cfb70d4..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/load.st +++ /dev/null @@ -1,8 +0,0 @@ -loading -load - "Load the #stable version defined for this platform. The #stable version is the version that is recommended to be used on this platform." - - "self load" - - - ^(self project version: #stable) load \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/loadBleedingEdge.st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/loadBleedingEdge.st deleted file mode 100644 index e780e1d..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/loadBleedingEdge.st +++ /dev/null @@ -1,8 +0,0 @@ -loading -loadBleedingEdge - "Load the latest versions of the mcz files defined for this project. It is not likely that the #bleedingEdge has been tested." - - "self loadBleedingEdge" - - - ^(self project version: #bleedingEdge) load \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/loadDevelopment.st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/loadDevelopment.st deleted file mode 100644 index 2ccd72a..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/loadDevelopment.st +++ /dev/null @@ -1,8 +0,0 @@ -loading -loadDevelopment - "Load the #development version defined for this platform. The #development version will change over time and is not expected to be stable." - - "self loadDevelopment" - - - ^(self project version: #development) load \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/project.st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/project.st deleted file mode 100644 index 925935b..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/project.st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -project - - ^self new project \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/validate.st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/validate.st deleted file mode 100644 index 589fc0b..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/validate.st +++ /dev/null @@ -1,12 +0,0 @@ -development support -validate - "Check the configuration for Errors, Critical Warnings, and Warnings (see class comment for MetacelloMCVersionValidator for more information). - Errors identify specification issues that will result in unexpected behaviour when you load the configuration. - Critical Warnings identify specification issues that may result in unexpected behavior when you load the configuration. - Warnings identify specification issues that are technically correct, but are worth take a look at." - - "self validate" - - - self ensureMetacello. - ^ ((Smalltalk at: #MetacelloToolBox) validateConfiguration: self debug: #() recurse: false) explore \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline1..st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline1..st deleted file mode 100644 index 85f7a25..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline1..st +++ /dev/null @@ -1,13 +0,0 @@ -baselines -baseline1: spec - - - spec for: #common do: [ - spec - blessing: #baseline; - repository: 'http://mc.stfx.eu/Neo'; - package: 'Neo-JSON-Core'; - package: 'Neo-JSON-Tests' with: [ spec requires: 'Neo-JSON-Core' ]; - group: 'default' with: #('Neo-JSON-Core' 'Neo-JSON-Tests'); - group: 'Core' with: #('Neo-JSON-Core'); - group: 'Tests' with: #('Neo-JSON-Tests') ] \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline2..st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline2..st deleted file mode 100644 index b553d76..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline2..st +++ /dev/null @@ -1,20 +0,0 @@ -baselines -baseline2: spec - - spec - for: #common - do: [ - spec - blessing: #baseline; - repository: 'http://mc.stfx.eu/Neo'; - package: 'Neo-JSON-Core'; - package: 'Neo-JSON-Tests' with: [ spec requires: 'Neo-JSON-Core' ]; - group: 'default' with: #('Neo-JSON-Core' 'Neo-JSON-Tests'); - group: 'Core' with: #('Neo-JSON-Core'); - group: 'Tests' with: #('Neo-JSON-Tests') ]. - spec - for: #gemstone - do: [ - spec - baseline: 'NeoJSON' with: [ spec repository: 'github://GsDevKit/NeoJSON:master/repository' ]; - import: 'NeoJSON' ] \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline3..st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline3..st deleted file mode 100644 index 0ccdffd..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline3..st +++ /dev/null @@ -1,44 +0,0 @@ -baselines -baseline3: spec - - spec - for: #common - do: [ - spec - blessing: #baseline; - repository: 'http://mc.stfx.eu/Neo'; - package: 'Neo-JSON-Core'; - package: 'Neo-JSON-Tests' with: [ spec requires: 'Neo-JSON-Core' ]; - group: 'default' with: #('Core' 'Tests'); - group: 'Core' with: #('Neo-JSON-Core'); - group: 'Tests' with: #('Neo-JSON-Tests') ]. - - - spec - for: #pharo - do: [ - - spec - package: 'Neo-JSON-Pharo-Examples' with: [ spec requires: 'Neo-JSON-Core' ]; - group: 'Examples' with: #('Neo-JSON-Pharo-Examples'). - - "So far, it only contains Pharo-Specific extensions" - spec - package: 'Neo-JSON-Pharo-Core' with: [ spec requires: #( 'Neo-JSON-Core') ]; - package: 'Neo-JSON-Pharo-Tests' with: [ spec requires: #( 'Neo-JSON-Tests') ]; - group: 'Core' with: #('Neo-JSON-Core' 'Neo-JSON-Pharo-Core'). - - "CoreVASTExport group is used when we are exporting code to be later imported in VAST/ENVY via Monticello Importer. 'Neo-JSON-VASTMock' should not be imported in ENVY....its goal is that in 'Neo-JSON-VAST-Core' we can define extension methods to classes defined in VAST but not existing in Pharo. So in 'Neo-JSON-VASTMock' we simply create dummy classes with the sole purpose of being able to define extension methods for it. " - spec - package: 'Neo-JSON-VASTMock'; - package: 'Neo-JSON-VAST-Core' with: [ spec requires: #('Neo-JSON-VASTMock' 'Neo-JSON-Core') ]; - package: 'Neo-JSON-VAST-Tests' with: [ spec requires: #( 'Neo-JSON-Tests') ]; - group: 'CoreVASTExport' with: #('Neo-JSON-Core' 'Neo-JSON-VAST-Core' 'Tests' 'Neo-JSON-VAST-Tests' ). - ]. - - spec - for: #gemstone - do: [ - spec - baseline: 'NeoJSON' with: [ spec repository: 'github://GsDevKit/NeoJSON:master/repository' ]; - import: 'NeoJSON' ] \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/bleedingEdge..st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/bleedingEdge..st deleted file mode 100644 index a61a59c..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/bleedingEdge..st +++ /dev/null @@ -1,3 +0,0 @@ -symbolic versions -bleedingEdge: spec - \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/development..st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/development..st deleted file mode 100644 index 0e26382..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/development..st +++ /dev/null @@ -1,3 +0,0 @@ -symbolic versions -development: spec - \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/project.st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/project.st deleted file mode 100644 index 43dcd87..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/project.st +++ /dev/null @@ -1,11 +0,0 @@ -accessing -project - - ^ project ifNil: [ | constructor | - "Bootstrap Metacello if it is not already loaded" - (self class baseConfigurationClassIfAbsent: []) ensureMetacello. - "Construct Metacello project" - constructor := (Smalltalk at: #MetacelloVersionConstructor) on: self. - project := constructor project. - project loadType: #linear. "change to #atomic if desired" - project ] \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/stable..st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/stable..st deleted file mode 100644 index 75b8772..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/stable..st +++ /dev/null @@ -1,7 +0,0 @@ -symbolic versions -stable: spec - - - spec for: #common version: '17'. - - spec for: #gemstone version: '13'. \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version1..st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version1..st deleted file mode 100644 index efbc61f..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version1..st +++ /dev/null @@ -1,9 +0,0 @@ -versions -version1: spec - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.17'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.15' ] \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version10..st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version10..st deleted file mode 100644 index 01fc11d..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version10..st +++ /dev/null @@ -1,9 +0,0 @@ -versions -version10: spec - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.29'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.26' ] \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version11..st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version11..st deleted file mode 100644 index 029a804..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version11..st +++ /dev/null @@ -1,9 +0,0 @@ -versions -version11: spec - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.30'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.30' ] \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version12..st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version12..st deleted file mode 100644 index 5d52f09..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version12..st +++ /dev/null @@ -1,9 +0,0 @@ -versions -version12: spec - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.31'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.31' ] \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version13..st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version13..st deleted file mode 100644 index 83dc556..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version13..st +++ /dev/null @@ -1,9 +0,0 @@ -versions -version13: spec - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.33'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.33' ] \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version14..st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version14..st deleted file mode 100644 index ab5ba02..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version14..st +++ /dev/null @@ -1,9 +0,0 @@ -versions -version14: spec - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.37'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.35' ] \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version15..st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version15..st deleted file mode 100644 index 1b2daac..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version15..st +++ /dev/null @@ -1,9 +0,0 @@ -versions -version15: spec - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.37'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.36' ] \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version16..st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version16..st deleted file mode 100644 index 2da79b3..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version16..st +++ /dev/null @@ -1,9 +0,0 @@ -versions -version16: spec - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.42'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.39' ] \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version17..st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version17..st deleted file mode 100644 index aae7af6..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version17..st +++ /dev/null @@ -1,9 +0,0 @@ -versions -version17: spec - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.46'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.44' ] \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version2..st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version2..st deleted file mode 100644 index 4b57665..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version2..st +++ /dev/null @@ -1,9 +0,0 @@ -versions -version2: spec - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.19'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.16' ] \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version3..st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version3..st deleted file mode 100644 index 7731134..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version3..st +++ /dev/null @@ -1,9 +0,0 @@ -versions -version3: spec - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.20'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.16' ] \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version30..st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version30..st deleted file mode 100644 index a33fb3b..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version30..st +++ /dev/null @@ -1,7 +0,0 @@ -versions -version30: spec - - - spec for: #common do: [ - spec - blessing: #development ] \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version4..st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version4..st deleted file mode 100644 index f356d39..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version4..st +++ /dev/null @@ -1,9 +0,0 @@ -versions -version4: spec - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.23'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.18' ] \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version5..st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version5..st deleted file mode 100644 index ce3a48c..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version5..st +++ /dev/null @@ -1,9 +0,0 @@ -versions -version5: spec - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.24'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.19' ] \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version6..st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version6..st deleted file mode 100644 index 47d529b..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version6..st +++ /dev/null @@ -1,9 +0,0 @@ -versions -version6: spec - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.24'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.20' ] \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version7..st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version7..st deleted file mode 100644 index dc49603..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version7..st +++ /dev/null @@ -1,9 +0,0 @@ -versions -version7: spec - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.24'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.21' ] \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version8..st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version8..st deleted file mode 100644 index e827cd3..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version8..st +++ /dev/null @@ -1,9 +0,0 @@ -versions -version8: spec - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.24'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.22' ] \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version9..st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version9..st deleted file mode 100644 index 94a6e04..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version9..st +++ /dev/null @@ -1,9 +0,0 @@ -versions -version9: spec - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.27'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.24' ] \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/methodProperties.json b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/methodProperties.json deleted file mode 100644 index 864e369..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/methodProperties.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "instance" : { - "version10:" : "SvenVanCaekenberghe 3/29/2015 11:39", - "version4:" : "SvenVanCaekenberghe 8/30/2013 11:12", - "version17:" : "SvenVanCaekenberghe 12/19/2017 15:30", - "version30:" : "MarianoMartinezPeck 1/30/2018 11:08", - "project" : "SvenVanCaekenberghe 6/22/2012 16:48", - "development:" : "SvenVanCaekenberghe 7/11/2016 10:22", - "version12:" : "SvenVanCaekenberghe 1/22/2016 12:58", - "version6:" : "SvenVanCaekenberghe 12/27/2013 19:02", - "baseline2:" : "PaulDeBruicker 11/2/2014 20:39", - "version1:" : "SvenVanCaekenberghe 9/27/2012 20:29", - "version14:" : "SvenVanCaekenberghe 2/2/2017 13:46", - "version8:" : "SvenVanCaekenberghe 1/21/2014 20:08", - "version5:" : "SvenVanCaekenberghe 9/3/2013 12:22", - "version3:" : "SvenVanCaekenberghe 5/29/2013 15:54", - "baseline1:" : "SvenVanCaekenberghe 6/22/2012 16:53", - "version16:" : "SvenVanCaekenberghe 5/29/2017 14:40", - "version13:" : "SvenVanCaekenberghe 7/4/2016 14:58", - "version7:" : "SvenVanCaekenberghe 12/27/2013 21:44", - "version11:" : "SvenVanCaekenberghe 11/25/2015 09:34", - "bleedingEdge:" : "SvenVanCaekenberghe 7/11/2016 10:22", - "version2:" : "SvenVanCaekenberghe 12/18/2012 10:27", - "baseline3:" : "SvenVanCaekenberghe 2/6/2018 20:39", - "version15:" : "SvenVanCaekenberghe 2/2/2017 13:50", - "stable:" : "SvenVanCaekenberghe 12/19/2017 15:30", - "version9:" : "SvenVanCaekenberghe 4/24/2014 13:29" - }, - "class" : { - "load" : "SvenVanCaekenberghe 6/22/2012 16:48", - "catalogDescription" : "SvenVanCaekenberghe 1/5/2016 09:39", - "baseConfigurationClassIfAbsent:" : "SvenVanCaekenberghe 6/22/2012 16:48", - "DevelopmentSupport" : "SvenVanCaekenberghe 6/22/2012 16:48", - "ensureMetacello" : "SvenVanCaekenberghe 6/22/2012 16:48", - "catalogKeywords" : "SvenVanCaekenberghe 1/5/2016 09:39", - "loadDevelopment" : "SvenVanCaekenberghe 6/22/2012 16:48", - "isMetacelloConfig" : "SvenVanCaekenberghe 6/22/2012 16:48", - "ensureMetacelloBaseConfiguration" : "SvenVanCaekenberghe 6/22/2012 16:48", - "loadBleedingEdge" : "SvenVanCaekenberghe 6/22/2012 16:48", - "catalogContactInfo" : "SvenVanCaekenberghe 1/5/2016 09:38", - "validate" : "SvenVanCaekenberghe 6/22/2012 16:48", - "project" : "SvenVanCaekenberghe 6/22/2012 16:48" - } -} \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/properties.json b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/properties.json deleted file mode 100644 index 11c01c1..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/properties.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "commentStamp" : "", - "super" : "Object", - "category" : "ConfigurationOfNeoJSON", - "classinstvars" : [ ], - "pools" : [ ], - "classvars" : [ - "LastVersionLoad" - ], - "instvars" : [ - "project" - ], - "name" : "ConfigurationOfNeoJSON", - "type" : "normal" -} \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/monticello.meta/categories.st b/repository/ConfigurationOfNeoJSON.package/monticello.meta/categories.st deleted file mode 100644 index 717f992..0000000 --- a/repository/ConfigurationOfNeoJSON.package/monticello.meta/categories.st +++ /dev/null @@ -1 +0,0 @@ -SystemOrganization addCategory: #ConfigurationOfNeoJSON! diff --git a/repository/ConfigurationOfNeoJSON.package/monticello.meta/initializers.st b/repository/ConfigurationOfNeoJSON.package/monticello.meta/initializers.st deleted file mode 100644 index e69de29..0000000 diff --git a/repository/ConfigurationOfNeoJSON.package/monticello.meta/package b/repository/ConfigurationOfNeoJSON.package/monticello.meta/package deleted file mode 100644 index f0d0ef7..0000000 --- a/repository/ConfigurationOfNeoJSON.package/monticello.meta/package +++ /dev/null @@ -1 +0,0 @@ -(name 'ConfigurationOfNeoJSON') \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/monticello.meta/version b/repository/ConfigurationOfNeoJSON.package/monticello.meta/version deleted file mode 100644 index d2d83ff..0000000 --- a/repository/ConfigurationOfNeoJSON.package/monticello.meta/version +++ /dev/null @@ -1 +0,0 @@ -(name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.29' message 'move #baseline3 back to http://mc.stfx.eu/Neo' id 'c353c015-f220-0d00-ab86-a69d0a2967d2' date '6 February 2018' time '8:40:16.339097 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-marianopeck.28' message 'Added a ''Examples'' group for Pharo and added Neo-JSON-Pharo-Examples for it. ' id 'a830278b-d720-0d00-8338-267f05c229b0' date '5 February 2018' time '9:00:21.897581 am' author 'marianopeck' ancestors ((name 'ConfigurationOfNeoJSON-marianopeck.27' message 'Also add the ability to have platform specific pacakges for Tests package. ' id 'a6d303b8-6120-0d00-a478-dd000e1160ba' date '30 January 2018' time '12:26:08.413849 pm' author 'marianopeck' ancestors ((name 'ConfigurationOfNeoJSON-MarianoMartinezPeck.26' message 'Added Tests group to CoreVASTExport' id 'f990cf75-6120-0d00-b4bb-02180ea1a7a7' date '30 January 2018' time '12:07:37.692677 pm' author 'MarianoMartinezPeck' ancestors ((name 'ConfigurationOfNeoJSON-MarianoMartinezPeck.25' message '* Make ''Default'' group load groups (''Core'' and ''Tests'') rather than pacakges directly. * Added new #version30: to be filled later * changed repo url of baseline3: to be ''http://smalltalkhub.com/mc/SvenVanCaekenberghe/Neo/main'' until we find another way. ' id '2c3c4acb-6020-0d00-b8b7-7fa50ea1a7a7' date '30 January 2018' time '11:19:56.827936 am' author 'MarianoMartinezPeck' ancestors ((name 'ConfigurationOfNeoJSON-MarianoMartinezPeck.24' message '* Make ''Default'' group load groups (''Core'' and ''Tests'') rather than pacakges directly. * Added new #version30: to be filled later * changed repo url of baseline3: to be ''http://smalltalkhub.com/mc/SvenVanCaekenberghe/Neo/main'' until we find another way. ' id 'e0f63ec5-6020-0d00-b8b6-a3ee0ea1a7a7' date '30 January 2018' time '11:18:15.425957 am' author 'MarianoMartinezPeck' ancestors ((name 'ConfigurationOfNeoJSON-marianopeck.23' message 'This commits aims to make NeoJSON more portable to other Smalltalk dialects like VAST. * Moved OrderedCollection and SmallDictionary neoJsonOn: to a new separate package ''Neo-JSON-Pharo-Core''. * Created new separate packages ''Neo-JSON-Pharo-Core'' and ''Neo-JSON-VASTMock''. ''Neo-JSON-VASTMock'' should not be imported in ENVY....its goal is that in ''Neo-JSON-VAST-Core'' we can define extension methods to classes defined in VAST but not existing in Pharo. So in ''Neo-JSON-VASTMock'' we simply create dummy classes with the sole purpose of being able to define extension methods for it. * Update ConfigurationOfNeoJSON so that it reflects this new package organization. This was done under a new #baseline3: ' id 'e748c783-6020-0d00-a474-14600e1160ba' date '30 January 2018' time '10:59:57.063606 am' author 'marianopeck' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.22' message 'stable version 17' id '1d5c2116-141d-0d00-9b74-78760f1f500e' date '19 December 2017' time '3:33:25.075282 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.21' message 'stable version 16' id '5085cfbb-0a0d-0d00-b0c5-ecd007d9622d' date '29 May 2017' time '2:40:49.012273 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.20' message 'stable version 15' id '9d33b13f-914f-4bdc-a0d4-7f921d1d939e' date '2 February 2017' time '1:50:59.42841 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.19' message 'stable version 14' id 'c70aff66-749a-4d5b-bba8-5dae3634439c' date '2 February 2017' time '1:47:00.840545 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.18' message 'remove fixed version for Pharo 2' id 'd0a7ed10-3489-4c44-8660-a32ca7e310f9' date '11 July 2016' time '10:24:09.934133 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.17' message 'new stable v13 fixed v13 as development & bleedingEdge for pharo 2' id 'e3db452a-9cb1-4905-8137-7d2000bffc5c' date '4 July 2016' time '3:05:08.240172 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.16' message 'new #stable version 12' id '01f3f962-be93-4c82-8202-811cb23ee382' date '22 January 2016' time '12:59:31.613337 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.15' message 'Added Pharo Catalog methods' id 'a72d39e2-a388-4a8b-bcd1-befe683fcd54' date '5 January 2016' time '9:44:59.254937 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.14' message 'updated to #stable version 11' id '02843207-1071-4d38-965e-9be4f6d00dd3' date '25 November 2015' time '9:35:11.431058 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.12' message 'upgrade to #stable version 10 for #common' id '556e99db-c3b6-4fe8-9aa4-dd6d254cc358' date '29 March 2015' time '11:40:22.992972 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-PaulDeBruicker.11' message 'Added GemStone to the configuration' id '568062a9-b890-418e-91f1-428f5ed94522' date '2 November 2014' time '8:40:58.359238 pm' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.10' message 'updated to #stable v9' id '14b025d0-da85-481f-924f-39f5fbdbc929' date '24 April 2014' time '1:30:05.463071 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.9' message 'v8' id '7ed1d4a7-e738-401a-9cac-69b85aa16b2e' date '21 January 2014' time '8:08:56.986201 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.8' message 'updated to stable v7' id '679ab4c1-1a64-426f-89ca-21722fc74519' date '27 December 2013' time '9:45:29.870451 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.7' message 'updated to stable v6' id '820b367a-f793-4fac-b5a2-1dd1ac73e48e' date '27 December 2013' time '7:03:35.869612 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.6' message 'New feature: NeoJSONWriter>>#asciiOnly: to escape all non ASCII characters in strings' id '27393a62-ca8a-4ad4-808c-ab2f6af1eff3' date '3 September 2013' time '12:23:21.522443 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.5' message 'updated to v4' id '7a79620f-07ab-4204-b37d-160779d1b946' date '30 August 2013' time '11:12:49.896139 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.4' message 'stable v3' id '8351f635-abd1-44eb-803b-05ae75b962d8' date '29 May 2013' time '3:54:34.113576 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.3' message 'stable version 2' id '4b6f70ed-72be-4f87-82a6-2f9745d99eba' date '18 December 2012' time '10:28:02.924 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.2' message 'added spec blessing: #release to all versiosn' id 'da8a252c-180e-4245-84d6-c0f0b3c43d8d' date '27 September 2012' time '8:30:34.121 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.1' message '1st version' id '43b49eb6-24b6-4665-a7b7-88fafe008cf9' date '22 June 2012' time '4:56:37.24 pm' author 'SvenVanCaekenberghe' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ()) \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/properties.json b/repository/ConfigurationOfNeoJSON.package/properties.json deleted file mode 100644 index 6f31cf5..0000000 --- a/repository/ConfigurationOfNeoJSON.package/properties.json +++ /dev/null @@ -1 +0,0 @@ -{ } \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON/ConfigurationOfNeoJSON.class.st b/repository/ConfigurationOfNeoJSON/ConfigurationOfNeoJSON.class.st new file mode 100644 index 0000000..bc352da --- /dev/null +++ b/repository/ConfigurationOfNeoJSON/ConfigurationOfNeoJSON.class.st @@ -0,0 +1,440 @@ +" +I am ConfigurationOfNeoJSON, a Metacello configuration for NeoJSON. + +NeoJSON is a flexible and efficient reader and writer for JSON. +" +Class { + #name : #ConfigurationOfNeoJSON, + #superclass : #Object, + #instVars : [ + 'project' + ], + #classVars : [ + 'LastVersionLoad' + ], + #category : 'ConfigurationOfNeoJSON' +} + +{ #category : #'development support' } +ConfigurationOfNeoJSON class >> DevelopmentSupport [ + +"See the methods in the 'development support' category on the class-side of MetacelloBaseConfiguration. Decide what development support methods you would like to use and copy them the the class-side of your configuration." + + +] + +{ #category : #private } +ConfigurationOfNeoJSON class >> baseConfigurationClassIfAbsent: aBlock [ + + ^Smalltalk + at: #MetacelloBaseConfiguration + ifAbsent: [ + self ensureMetacelloBaseConfiguration. + Smalltalk at: #MetacelloBaseConfiguration ifAbsent: aBlock ]. + +] + +{ #category : #accessing } +ConfigurationOfNeoJSON class >> catalogContactInfo [ + ^ 'Written and maintained by Sven Van Caekenberghe (http://stfx.eu) and the community. Discussions on the Pharo mailing lists.' +] + +{ #category : #accessing } +ConfigurationOfNeoJSON class >> catalogDescription [ + ^ 'JSON (JavaScript Object Notation) is a popular data-interchange format. NeoJSON is an elegant and efficient standalone Smalltalk framework to read and write JSON converting to or from Smalltalk objects.' +] + +{ #category : #accessing } +ConfigurationOfNeoJSON class >> catalogKeywords [ + ^ #(format input output json serialization encoding text javascript) +] + +{ #category : #private } +ConfigurationOfNeoJSON class >> ensureMetacello [ + + (self baseConfigurationClassIfAbsent: []) ensureMetacello +] + +{ #category : #private } +ConfigurationOfNeoJSON class >> ensureMetacelloBaseConfiguration [ + + Smalltalk + at: #MetacelloBaseConfiguration + ifAbsent: [ + | repository version | + repository := MCHttpRepository location: 'http://seaside.gemstone.com/ss/metacello' user: '' password: ''. + repository + versionReaderForFileNamed: 'Metacello-Base-DaleHenrichs.2.mcz' + do: [ :reader | + version := reader version. + version load. + version workingCopy repositoryGroup addRepository: repository ] ] +] + +{ #category : #'metacello tool support' } +ConfigurationOfNeoJSON class >> isMetacelloConfig [ + "Answer true and the Metacello tools will operate on you" + + ^true +] + +{ #category : #loading } +ConfigurationOfNeoJSON class >> load [ + "Load the #stable version defined for this platform. The #stable version is the version that is recommended to be used on this platform." + + "self load" + + + ^(self project version: #stable) load +] + +{ #category : #loading } +ConfigurationOfNeoJSON class >> loadBleedingEdge [ + "Load the latest versions of the mcz files defined for this project. It is not likely that the #bleedingEdge has been tested." + + "self loadBleedingEdge" + + + ^(self project version: #bleedingEdge) load +] + +{ #category : #loading } +ConfigurationOfNeoJSON class >> loadDevelopment [ + "Load the #development version defined for this platform. The #development version will change over time and is not expected to be stable." + + "self loadDevelopment" + + + ^(self project version: #development) load +] + +{ #category : #accessing } +ConfigurationOfNeoJSON class >> project [ + + ^self new project +] + +{ #category : #'development support' } +ConfigurationOfNeoJSON class >> validate [ + "Check the configuration for Errors, Critical Warnings, and Warnings (see class comment for MetacelloMCVersionValidator for more information). + Errors identify specification issues that will result in unexpected behaviour when you load the configuration. + Critical Warnings identify specification issues that may result in unexpected behavior when you load the configuration. + Warnings identify specification issues that are technically correct, but are worth take a look at." + + "self validate" + + + self ensureMetacello. + ^ ((Smalltalk at: #MetacelloToolBox) validateConfiguration: self debug: #() recurse: false) explore +] + +{ #category : #baselines } +ConfigurationOfNeoJSON >> baseline1: spec [ + + + spec for: #common do: [ + spec + blessing: #baseline; + repository: 'http://mc.stfx.eu/Neo'; + package: 'Neo-JSON-Core'; + package: 'Neo-JSON-Tests' with: [ spec requires: 'Neo-JSON-Core' ]; + group: 'default' with: #('Neo-JSON-Core' 'Neo-JSON-Tests'); + group: 'Core' with: #('Neo-JSON-Core'); + group: 'Tests' with: #('Neo-JSON-Tests') ] +] + +{ #category : #baselines } +ConfigurationOfNeoJSON >> baseline2: spec [ + + spec + for: #common + do: [ + spec + blessing: #baseline; + repository: 'http://mc.stfx.eu/Neo'; + package: 'Neo-JSON-Core'; + package: 'Neo-JSON-Tests' with: [ spec requires: 'Neo-JSON-Core' ]; + group: 'default' with: #('Neo-JSON-Core' 'Neo-JSON-Tests'); + group: 'Core' with: #('Neo-JSON-Core'); + group: 'Tests' with: #('Neo-JSON-Tests') ]. + spec + for: #gemstone + do: [ + spec + baseline: 'NeoJSON' with: [ spec repository: 'github://GsDevKit/NeoJSON:master/repository' ]; + import: 'NeoJSON' ] +] + +{ #category : #baselines } +ConfigurationOfNeoJSON >> baseline3: spec [ + + spec + for: #common + do: [ + spec + blessing: #baseline; + repository: 'http://mc.stfx.eu/Neo'; + package: 'Neo-JSON-Core'; + package: 'Neo-JSON-Tests' with: [ spec requires: 'Neo-JSON-Core' ]; + group: 'default' with: #('Core' 'Tests'); + group: 'Core' with: #('Neo-JSON-Core'); + group: 'Tests' with: #('Neo-JSON-Tests') ]. + + + spec + for: #pharo + do: [ + + spec + package: 'Neo-JSON-Pharo-Examples' with: [ spec requires: 'Neo-JSON-Core' ]; + group: 'Examples' with: #('Neo-JSON-Pharo-Examples'). + + "So far, it only contains Pharo-Specific extensions" + spec + package: 'Neo-JSON-Pharo-Core' with: [ spec requires: #( 'Neo-JSON-Core') ]; + package: 'Neo-JSON-Pharo-Tests' with: [ spec requires: #( 'Neo-JSON-Tests') ]; + group: 'Core' with: #('Neo-JSON-Core' 'Neo-JSON-Pharo-Core'). + + "CoreVASTExport group is used when we are exporting code to be later imported in VAST/ENVY via Monticello Importer. 'Neo-JSON-VASTMock' should not be imported in ENVY....its goal is that in 'Neo-JSON-VAST-Core' we can define extension methods to classes defined in VAST but not existing in Pharo. So in 'Neo-JSON-VASTMock' we simply create dummy classes with the sole purpose of being able to define extension methods for it. " + spec + package: 'Neo-JSON-VASTMock'; + package: 'Neo-JSON-VAST-Core' with: [ spec requires: #('Neo-JSON-VASTMock' 'Neo-JSON-Core') ]; + package: 'Neo-JSON-VAST-Tests' with: [ spec requires: #( 'Neo-JSON-Tests') ]; + group: 'CoreVASTExport' with: #('Neo-JSON-Core' 'Neo-JSON-VAST-Core' 'Tests' 'Neo-JSON-VAST-Tests' ). + ]. + + spec + for: #gemstone + do: [ + spec + baseline: 'NeoJSON' with: [ spec repository: 'github://GsDevKit/NeoJSON:master/repository' ]; + import: 'NeoJSON' ] +] + +{ #category : #'symbolic versions' } +ConfigurationOfNeoJSON >> bleedingEdge: spec [ + +] + +{ #category : #'symbolic versions' } +ConfigurationOfNeoJSON >> development: spec [ + +] + +{ #category : #accessing } +ConfigurationOfNeoJSON >> project [ + + ^ project ifNil: [ | constructor | + "Bootstrap Metacello if it is not already loaded" + (self class baseConfigurationClassIfAbsent: []) ensureMetacello. + "Construct Metacello project" + constructor := (Smalltalk at: #MetacelloVersionConstructor) on: self. + project := constructor project. + project loadType: #linear. "change to #atomic if desired" + project ] +] + +{ #category : #'symbolic versions' } +ConfigurationOfNeoJSON >> stable: spec [ + + + spec for: #common version: '17'. + + spec for: #gemstone version: '13'. +] + +{ #category : #versions } +ConfigurationOfNeoJSON >> version10: spec [ + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.29'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.26' ] +] + +{ #category : #versions } +ConfigurationOfNeoJSON >> version11: spec [ + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.30'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.30' ] +] + +{ #category : #versions } +ConfigurationOfNeoJSON >> version12: spec [ + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.31'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.31' ] +] + +{ #category : #versions } +ConfigurationOfNeoJSON >> version13: spec [ + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.33'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.33' ] +] + +{ #category : #versions } +ConfigurationOfNeoJSON >> version14: spec [ + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.37'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.35' ] +] + +{ #category : #versions } +ConfigurationOfNeoJSON >> version15: spec [ + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.37'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.36' ] +] + +{ #category : #versions } +ConfigurationOfNeoJSON >> version16: spec [ + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.42'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.39' ] +] + +{ #category : #versions } +ConfigurationOfNeoJSON >> version17: spec [ + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.46'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.44' ] +] + +{ #category : #versions } +ConfigurationOfNeoJSON >> version1: spec [ + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.17'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.15' ] +] + +{ #category : #versions } +ConfigurationOfNeoJSON >> version2: spec [ + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.19'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.16' ] +] + +{ #category : #versions } +ConfigurationOfNeoJSON >> version30: spec [ + + + spec for: #common do: [ + spec + blessing: #development ] +] + +{ #category : #versions } +ConfigurationOfNeoJSON >> version3: spec [ + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.20'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.16' ] +] + +{ #category : #versions } +ConfigurationOfNeoJSON >> version4: spec [ + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.23'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.18' ] +] + +{ #category : #versions } +ConfigurationOfNeoJSON >> version5: spec [ + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.24'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.19' ] +] + +{ #category : #versions } +ConfigurationOfNeoJSON >> version6: spec [ + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.24'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.20' ] +] + +{ #category : #versions } +ConfigurationOfNeoJSON >> version7: spec [ + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.24'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.21' ] +] + +{ #category : #versions } +ConfigurationOfNeoJSON >> version8: spec [ + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.24'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.22' ] +] + +{ #category : #versions } +ConfigurationOfNeoJSON >> version9: spec [ + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.27'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.24' ] +] diff --git a/repository/ConfigurationOfNeoJSON/package.st b/repository/ConfigurationOfNeoJSON/package.st new file mode 100644 index 0000000..759f18e --- /dev/null +++ b/repository/ConfigurationOfNeoJSON/package.st @@ -0,0 +1 @@ +Package { #name : #ConfigurationOfNeoJSON } diff --git a/repository/Neo-JSON-Core.package/.filetree b/repository/Neo-JSON-Core.package/.filetree deleted file mode 100644 index 57a6797..0000000 --- a/repository/Neo-JSON-Core.package/.filetree +++ /dev/null @@ -1,5 +0,0 @@ -{ - "separateMethodMetaAndSource" : false, - "noMethodMetaData" : true, - "useCypressPropertiesFile" : true -} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/Boolean.extension/instance/neoJsonOn..st b/repository/Neo-JSON-Core.package/Boolean.extension/instance/neoJsonOn..st deleted file mode 100644 index 1cc3c40..0000000 --- a/repository/Neo-JSON-Core.package/Boolean.extension/instance/neoJsonOn..st +++ /dev/null @@ -1,3 +0,0 @@ -*neo-json-core -neoJsonOn: neoJSONWriter - neoJSONWriter writeBoolean: self \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/Boolean.extension/methodProperties.json b/repository/Neo-JSON-Core.package/Boolean.extension/methodProperties.json deleted file mode 100644 index 1bb304b..0000000 --- a/repository/Neo-JSON-Core.package/Boolean.extension/methodProperties.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "instance" : { - "neoJsonOn:" : "SvenVanCaekenberghe 6/2/2012 22:14" - }, - "class" : { } -} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/Boolean.extension/properties.json b/repository/Neo-JSON-Core.package/Boolean.extension/properties.json deleted file mode 100644 index dd25360..0000000 --- a/repository/Neo-JSON-Core.package/Boolean.extension/properties.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "name" : "Boolean" -} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/Collection.extension/instance/neoJsonOn..st b/repository/Neo-JSON-Core.package/Collection.extension/instance/neoJsonOn..st deleted file mode 100644 index eaddd30..0000000 --- a/repository/Neo-JSON-Core.package/Collection.extension/instance/neoJsonOn..st +++ /dev/null @@ -1,3 +0,0 @@ -*neo-json-core -neoJsonOn: neoJSONWriter - neoJSONWriter writeList: self \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/Collection.extension/methodProperties.json b/repository/Neo-JSON-Core.package/Collection.extension/methodProperties.json deleted file mode 100644 index 11d075d..0000000 --- a/repository/Neo-JSON-Core.package/Collection.extension/methodProperties.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "instance" : { - "neoJsonOn:" : "SvenVanCaekenberghe 6/3/2012 19:29" - }, - "class" : { } -} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/Collection.extension/properties.json b/repository/Neo-JSON-Core.package/Collection.extension/properties.json deleted file mode 100644 index 48f9f8d..0000000 --- a/repository/Neo-JSON-Core.package/Collection.extension/properties.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "name" : "Collection" -} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/Dictionary.extension/instance/neoJsonOn..st b/repository/Neo-JSON-Core.package/Dictionary.extension/instance/neoJsonOn..st deleted file mode 100644 index 174eb53..0000000 --- a/repository/Neo-JSON-Core.package/Dictionary.extension/instance/neoJsonOn..st +++ /dev/null @@ -1,3 +0,0 @@ -*neo-json-core -neoJsonOn: neoJSONWriter - neoJSONWriter writeMap: self \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/Dictionary.extension/methodProperties.json b/repository/Neo-JSON-Core.package/Dictionary.extension/methodProperties.json deleted file mode 100644 index 9a93cbf..0000000 --- a/repository/Neo-JSON-Core.package/Dictionary.extension/methodProperties.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "instance" : { - "neoJsonOn:" : "SvenVanCaekenberghe 6/3/2012 19:30" - }, - "class" : { } -} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/Dictionary.extension/properties.json b/repository/Neo-JSON-Core.package/Dictionary.extension/properties.json deleted file mode 100644 index 3201c8d..0000000 --- a/repository/Neo-JSON-Core.package/Dictionary.extension/properties.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "name" : "Dictionary" -} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/Integer.extension/instance/neoJsonOn..st b/repository/Neo-JSON-Core.package/Integer.extension/instance/neoJsonOn..st deleted file mode 100644 index 8d200b0..0000000 --- a/repository/Neo-JSON-Core.package/Integer.extension/instance/neoJsonOn..st +++ /dev/null @@ -1,3 +0,0 @@ -*neo-json-core -neoJsonOn: neoJSONWriter - neoJSONWriter writeInteger: self \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/Integer.extension/methodProperties.json b/repository/Neo-JSON-Core.package/Integer.extension/methodProperties.json deleted file mode 100644 index d597374..0000000 --- a/repository/Neo-JSON-Core.package/Integer.extension/methodProperties.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "instance" : { - "neoJsonOn:" : "SvenVanCaekenberghe 6/2/2012 22:17" - }, - "class" : { } -} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/Integer.extension/properties.json b/repository/Neo-JSON-Core.package/Integer.extension/properties.json deleted file mode 100644 index a8c2b93..0000000 --- a/repository/Neo-JSON-Core.package/Integer.extension/properties.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "name" : "Integer" -} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/README.md b/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/README.md deleted file mode 100644 index 6e1a020..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/README.md +++ /dev/null @@ -1,3 +0,0 @@ -I am NeoJSONCustomMapping. - -I read the next JSON value and turn it into a Smalltalk object using a converter block. \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/decoder..st b/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/decoder..st deleted file mode 100644 index 135efff..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/decoder..st +++ /dev/null @@ -1,8 +0,0 @@ -mapping -decoder: block - "Set a decoder block that accepts the next object representation read - and converts it into the actual object to be returned." - - self reader: [ :jsonReader | | representation | - representation := jsonReader next. - block value: representation ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/encoder..st b/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/encoder..st deleted file mode 100644 index c7b2a43..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/encoder..st +++ /dev/null @@ -1,8 +0,0 @@ -mapping -encoder: block - "Set a encoder block that accepts the next object to be written - and converts it into the actual representation to be written." - - self writer: [ :jsonWriter :anObject | | representation | - representation := block value: anObject. - jsonWriter nextPut: representation ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/identifier.st b/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/identifier.st deleted file mode 100644 index 745eec3..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/identifier.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -identifier - ^ schemaName \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfElementSchema..st b/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfElementSchema..st deleted file mode 100644 index d1bad0f..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfElementSchema..st +++ /dev/null @@ -1,13 +0,0 @@ -mapping -listOfElementSchema: elementSchema - "Set the reader to a block that will create an instance of the - standard listClass while reading a list of elements of type elementSchema" - - self reader: [ :jsonReader | - jsonReader listClass streamContents: [ :stream | - jsonReader parseListDo: [ | element | - element := jsonReader nextAs: elementSchema. - stream nextPut: element ] ] ]. - self writer: [ :jsonWriter :list | - jsonWriter writeListStreamingDo: [ :listWriter | - list do: [ :each | listWriter writeElement: each as: elementSchema ] ] ] diff --git a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfType..st b/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfType..st deleted file mode 100644 index 9788690..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfType..st +++ /dev/null @@ -1,11 +0,0 @@ -mapping -listOfType: collectionClass - "Set the reader to a block that will create an instance of collectionClass - using #streamContents: while reading a list of elements" - - self reader: [ :jsonReader | - collectionClass streamContents: [ :stream | - jsonReader parseListDo: [ | element | - element := jsonReader next. - stream nextPut: element ] ] ] - "we do not set a writer, #neoJsonOn: should be sufficient, no element type known anyway" diff --git a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfType.andElementSchema..st b/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfType.andElementSchema..st deleted file mode 100644 index c06433b..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfType.andElementSchema..st +++ /dev/null @@ -1,14 +0,0 @@ -mapping -listOfType: collectionClass andElementSchema: elementSchema - "Set the reader to a block that will create an instance of collectionClass - using #streamContents: while reading a list of elements of type elementSchema" - - self reader: [ :jsonReader | - collectionClass streamContents: [ :stream | - jsonReader parseListDo: [ | element | - element := jsonReader nextAs: elementSchema. - stream nextPut: element ] ] ]. - self writer: [ :jsonWriter :list | - jsonWriter writeListStreamingDo: [ :listWriter | - list do: [ :each | - listWriter writeElement: each as: elementSchema ] ] ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/mapWithValueSchema..st b/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/mapWithValueSchema..st deleted file mode 100644 index 0b7e3fd..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/mapWithValueSchema..st +++ /dev/null @@ -1,16 +0,0 @@ -mapping -mapWithValueSchema: valueSchema - "Set the reader to a block that will create an instance of the - standard mapClass while reading values of type valueSchema, - with standard keys" - - self reader: [ :jsonReader | | map | - map := jsonReader mapClass new. - jsonReader parseMapKeysDo: [ :key | | value | - value := jsonReader nextAs: valueSchema. - map at: key put: value ]. - map ]. - self writer: [ :jsonWriter :map | - jsonWriter writeMapStreamingDo: [ :mapWriter | - map keysAndValuesDo: [ :key :value | - mapWriter writeKey: key value: value as: valueSchema ] ] ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/readFrom..st b/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/readFrom..st deleted file mode 100644 index 8237ad9..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/readFrom..st +++ /dev/null @@ -1,5 +0,0 @@ -parsing -readFrom: jsonReader - ^ reader - ifNil: [ jsonReader next ] - ifNotNil: [ reader value: jsonReader ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/reader..st b/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/reader..st deleted file mode 100644 index 89ea0b4..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/reader..st +++ /dev/null @@ -1,7 +0,0 @@ -accessing -reader: block - "Set the reader to block, a 1 argument block that when given - a jsonReader as argument reads the object that I represent. - When there is no reader block, the default #next will be used." - - reader := block \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/schemaName..st b/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/schemaName..st deleted file mode 100644 index 06ba93a..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/schemaName..st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -schemaName: schema - schemaName := schema \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/writeObject.on..st b/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/writeObject.on..st deleted file mode 100644 index dca04b6..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/writeObject.on..st +++ /dev/null @@ -1,5 +0,0 @@ -writing -writeObject: anObject on: jsonWriter - writer - ifNil: [ anObject neoJsonOn: jsonWriter ] - ifNotNil: [ writer value: jsonWriter value: anObject ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/writer..st b/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/writer..st deleted file mode 100644 index 7e4f1ef..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/writer..st +++ /dev/null @@ -1,7 +0,0 @@ -accessing -writer: block - "Set the writer to block, a 2 argument block that when given: a jsonWriter - and the object to write will write the object that I represent. - When there is no writer block, the default #neoJsonOn: will be used." - - writer := block \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/methodProperties.json b/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/methodProperties.json deleted file mode 100644 index 3cdc199..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/methodProperties.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "instance" : { - "decoder:" : "SvenVanCaekenberghe 6/13/2012 11:14", - "readFrom:" : "SvenVanCaekenberghe 3/24/2014 10:34", - "writer:" : "SvenVanCaekenberghe 3/23/2014 22:12", - "mapWithValueSchema:" : "SvenVanCaekenberghe 9/22/2017 14:45", - "writeObject:on:" : "SvenVanCaekenberghe 3/23/2014 22:10", - "schemaName:" : "SvenVanCaekenberghe 6/8/2012 21:09", - "listOfElementSchema:" : "SvenVanCaekenberghe 9/22/2017 14:46", - "encoder:" : "SvenVanCaekenberghe 6/13/2012 11:14", - "listOfType:andElementSchema:" : "SvenVanCaekenberghe 9/22/2017 14:46", - "reader:" : "SvenVanCaekenberghe 3/24/2014 10:36", - "identifier" : "SvenVanCaekenberghe 3/23/2014 19:24", - "listOfType:" : "SvenVanCaekenberghe 9/22/2017 14:45" - }, - "class" : { } -} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/properties.json b/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/properties.json deleted file mode 100644 index c3a0763..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/properties.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "commentStamp" : "", - "super" : "NeoJSONMapping", - "category" : "Neo-JSON-Core", - "classinstvars" : [ ], - "pools" : [ ], - "classvars" : [ ], - "instvars" : [ - "schemaName", - "reader", - "writer" - ], - "name" : "NeoJSONCustomMapping", - "type" : "normal" -} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMapper.class/README.md b/repository/Neo-JSON-Core.package/NeoJSONMapper.class/README.md deleted file mode 100644 index 7166c5e..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONMapper.class/README.md +++ /dev/null @@ -1,28 +0,0 @@ -I am NeoJSONMapper. -I hold a mapping from schema identifiers to objects that known how to read or write instances from or to JSON. - -Schema identifiers are either Smalltalk classes or Symbols. - -I offer a builder interface to construct mappings. - -The standard object mapping represents a Smalltalk object as a map, mapping some or all instance variables, or a set of accessors (getter/setter methods). Furthermore, for each value an optional schema can be specified. - -Using a custom mapping, a reader and/or writer block can deal with special cases such as specific collection types with an optional schema for the elements, or a direct mapping of semi primitive types such as Date or DateAndTime. - -A mapping can be specified explicitely on a mapper, or can be resolved using the #neoJsonMapping: class method. - -Here are some examples: - - mapper mapAllInstVarsFor: Point. - mapper for: TestObject do: [ :mapping | - mapping mapInstVars: #(id name). - (mapping mapInstVar: #timestamp to: 'created-at') valueSchema: DateAndTime. - (mapping mapInstVar: #points) valueSchema: #ArrayOfPoints. - (mapping mapInstVar: #bytes) valueSchema: ByteArray ]. - mapper for: DateAndTime customDo: [ :mapping | - mapping decoder: [ :string | DateAndTime fromString: string ]. - mapping encoder: [ :dateAndTime | dateAndTime printString ] ]. - mapper for: #ArrayOfPoints customDo: [ :mapping | - mapping listOfElementSchema: Point ]. - mapper for: ByteArray customDo: [ :mapping | - mapping listOfType: ByteArray ] diff --git a/repository/Neo-JSON-Core.package/NeoJSONMapper.class/instance/customMappingFor..st b/repository/Neo-JSON-Core.package/NeoJSONMapper.class/instance/customMappingFor..st deleted file mode 100644 index 289f589..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONMapper.class/instance/customMappingFor..st +++ /dev/null @@ -1,8 +0,0 @@ -private -customMappingFor: schemaName - ^ self mappings - at: schemaName - ifAbsentPut: [ - NeoJSONCustomMapping new - schemaName: schemaName; - yourself ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMapper.class/instance/for.customDo..st b/repository/Neo-JSON-Core.package/NeoJSONMapper.class/instance/for.customDo..st deleted file mode 100644 index 774c55b..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONMapper.class/instance/for.customDo..st +++ /dev/null @@ -1,9 +0,0 @@ -mapping -for: schemaName customDo: block - "Execute the code in block to further customize the mapping for schemaName. - Create and add a new custom mapping for schemaName if necessary." - - | mapping | - mapping := self customMappingFor: schemaName. - block value: mapping. - ^ mapping \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMapper.class/instance/for.do..st b/repository/Neo-JSON-Core.package/NeoJSONMapper.class/instance/for.do..st deleted file mode 100644 index e2455b6..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONMapper.class/instance/for.do..st +++ /dev/null @@ -1,9 +0,0 @@ -mapping -for: smalltalkClass do: block - "Execute the code in block to further customize the mapping for schemaName. - Create and add a new standard object mapping for schemaName if necessary." - - | mapping | - mapping := self objectMappingFor: smalltalkClass. - block value: mapping. - ^ mapping \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMapper.class/instance/mapAllInstVarsFor..st b/repository/Neo-JSON-Core.package/NeoJSONMapper.class/instance/mapAllInstVarsFor..st deleted file mode 100644 index fbca425..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONMapper.class/instance/mapAllInstVarsFor..st +++ /dev/null @@ -1,8 +0,0 @@ -convencience -mapAllInstVarsFor: smalltalkClass - "Map the instance variables of smalltalkClass and all its super classes" - - | mapping | - mapping := self objectMappingFor: smalltalkClass. - mapping mapAllInstVars. - ^ mapping \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMapper.class/instance/mapInstVarsFor..st b/repository/Neo-JSON-Core.package/NeoJSONMapper.class/instance/mapInstVarsFor..st deleted file mode 100644 index 9ff2de3..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONMapper.class/instance/mapInstVarsFor..st +++ /dev/null @@ -1,8 +0,0 @@ -convencience -mapInstVarsFor: smalltalkClass - "Map the instance variables of smalltalkClass" - - | mapping | - mapping := self objectMappingFor: smalltalkClass. - mapping mapInstVars. - ^ mapping \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMapper.class/instance/mappingFor..st b/repository/Neo-JSON-Core.package/NeoJSONMapper.class/instance/mappingFor..st deleted file mode 100644 index 6c821cd..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONMapper.class/instance/mappingFor..st +++ /dev/null @@ -1,5 +0,0 @@ -accessing -mappingFor: schema - ^ self - mappingFor: schema - ifAbsent: [ NeoJSONMappingNotFound signalFor: schema in: self ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMapper.class/instance/mappingFor.ifAbsent..st b/repository/Neo-JSON-Core.package/NeoJSONMapper.class/instance/mappingFor.ifAbsent..st deleted file mode 100644 index 707f669..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONMapper.class/instance/mappingFor.ifAbsent..st +++ /dev/null @@ -1,7 +0,0 @@ -accessing -mappingFor: schema ifAbsent: block - (self mappings includesKey: schema) - ifFalse: [ self resolveMappingFor: schema ]. - ^ self mappings - at: schema - ifAbsent: block \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMapper.class/instance/mappings.st b/repository/Neo-JSON-Core.package/NeoJSONMapper.class/instance/mappings.st deleted file mode 100644 index c543660..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONMapper.class/instance/mappings.st +++ /dev/null @@ -1,4 +0,0 @@ -private -mappings - ^ mappings - ifNil: [ mappings := Dictionary new ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMapper.class/instance/objectMappingFor..st b/repository/Neo-JSON-Core.package/NeoJSONMapper.class/instance/objectMappingFor..st deleted file mode 100644 index aede86f..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONMapper.class/instance/objectMappingFor..st +++ /dev/null @@ -1,8 +0,0 @@ -private -objectMappingFor: smalltalkClass - ^ self mappings - at: smalltalkClass - ifAbsentPut: [ - NeoJSONObjectMapping new - subjectClass: smalltalkClass; - yourself ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMapper.class/instance/resolveMappingFor..st b/repository/Neo-JSON-Core.package/NeoJSONMapper.class/instance/resolveMappingFor..st deleted file mode 100644 index 50c4f2c..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONMapper.class/instance/resolveMappingFor..st +++ /dev/null @@ -1,5 +0,0 @@ -private -resolveMappingFor: class - (class respondsTo: #neoJsonMapping:) - ifTrue: [ - class perform: #neoJsonMapping: with: self ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMapper.class/methodProperties.json b/repository/Neo-JSON-Core.package/NeoJSONMapper.class/methodProperties.json deleted file mode 100644 index e576626..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONMapper.class/methodProperties.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "instance" : { - "mapAllInstVarsFor:" : "SvenVanCaekenberghe 3/22/2014 10:54", - "customMappingFor:" : "SvenVanCaekenberghe 3/22/2014 10:57", - "for:customDo:" : "SvenVanCaekenberghe 3/22/2014 10:56", - "mappingFor:ifAbsent:" : "SvenVanCaekenberghe 6/9/2012 18:24", - "mappings" : "SvenVanCaekenberghe 6/7/2012 14:55", - "resolveMappingFor:" : "SvenVanCaekenberghe 6/9/2012 18:29", - "for:do:" : "SvenVanCaekenberghe 3/22/2014 10:57", - "objectMappingFor:" : "SvenVanCaekenberghe 3/22/2014 10:54", - "mapInstVarsFor:" : "SvenVanCaekenberghe 3/22/2014 10:54", - "mappingFor:" : "SvenVanCaekenberghe 6/12/2012 15:48" - }, - "class" : { } -} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMapper.class/properties.json b/repository/Neo-JSON-Core.package/NeoJSONMapper.class/properties.json deleted file mode 100644 index 38de404..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONMapper.class/properties.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "commentStamp" : "", - "super" : "Object", - "category" : "Neo-JSON-Core", - "classinstvars" : [ ], - "pools" : [ ], - "classvars" : [ ], - "instvars" : [ - "mappings" - ], - "name" : "NeoJSONMapper", - "type" : "normal" -} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMapping.class/README.md b/repository/Neo-JSON-Core.package/NeoJSONMapping.class/README.md deleted file mode 100644 index 6666cf6..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONMapping.class/README.md +++ /dev/null @@ -1 +0,0 @@ -I am NeoJSONMapping, an abstract superclass for mapping definitions. diff --git a/repository/Neo-JSON-Core.package/NeoJSONMapping.class/instance/identifier.st b/repository/Neo-JSON-Core.package/NeoJSONMapping.class/instance/identifier.st deleted file mode 100644 index 6c89cdf..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONMapping.class/instance/identifier.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -identifier - self subclassResponsibility \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMapping.class/instance/printOn..st b/repository/Neo-JSON-Core.package/NeoJSONMapping.class/instance/printOn..st deleted file mode 100644 index 3863183..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONMapping.class/instance/printOn..st +++ /dev/null @@ -1,4 +0,0 @@ -printing -printOn: stream - super printOn: stream. - stream nextPut: $(; print: self identifier; nextPut: $) \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMapping.class/instance/readFrom..st b/repository/Neo-JSON-Core.package/NeoJSONMapping.class/instance/readFrom..st deleted file mode 100644 index 5724e30..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONMapping.class/instance/readFrom..st +++ /dev/null @@ -1,3 +0,0 @@ -parsing -readFrom: jsonReader - self subclassResponsibility \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMapping.class/instance/writeObject.on..st b/repository/Neo-JSON-Core.package/NeoJSONMapping.class/instance/writeObject.on..st deleted file mode 100644 index 37d1968..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONMapping.class/instance/writeObject.on..st +++ /dev/null @@ -1,3 +0,0 @@ -writing -writeObject: anObject on: jsonWriter - self subclassResponsibility \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMapping.class/methodProperties.json b/repository/Neo-JSON-Core.package/NeoJSONMapping.class/methodProperties.json deleted file mode 100644 index 4d08e6a..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONMapping.class/methodProperties.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "instance" : { - "readFrom:" : "SvenVanCaekenberghe 3/23/2014 19:23", - "writeObject:on:" : "SvenVanCaekenberghe 3/23/2014 19:23", - "identifier" : "SvenVanCaekenberghe 3/23/2014 19:22", - "printOn:" : "SvenVanCaekenberghe 3/23/2014 19:24" - }, - "class" : { } -} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMapping.class/properties.json b/repository/Neo-JSON-Core.package/NeoJSONMapping.class/properties.json deleted file mode 100644 index cbf27a9..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONMapping.class/properties.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "commentStamp" : "SvenVanCaekenberghe 3/23/2014 19:22", - "super" : "Object", - "category" : "Neo-JSON-Core", - "classinstvars" : [ ], - "pools" : [ ], - "classvars" : [ ], - "instvars" : [ ], - "name" : "NeoJSONMapping", - "type" : "normal" -} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/README.md b/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/README.md deleted file mode 100644 index 5ce2759..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/README.md +++ /dev/null @@ -1,3 +0,0 @@ -I am NeoJSONMappingNotFound. I am signalled when no mapping is found for a schema. - -Portability comment: In Pharo, I could technically subclass from NotFound directly, avoid all my defined methods and only keep #messageText and #standardMessageText. However, NotFound exception does not exist in other dialects. To keep NeoJSON as portable as possible we duplicate some Pharo code into myself. \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/class/signalFor..st b/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/class/signalFor..st deleted file mode 100644 index 9c1dc48..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/class/signalFor..st +++ /dev/null @@ -1,7 +0,0 @@ -instance creation -signalFor: anObject - "Create and signal an exception for anObject in the default receiver." - - ^ self new - object: anObject; - signal \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/class/signalFor.in..st b/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/class/signalFor.in..st deleted file mode 100644 index e016a6a..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/class/signalFor.in..st +++ /dev/null @@ -1,8 +0,0 @@ -instance creation -signalFor: anObject in: aCollection - "Create and signal an exception for anObject in aCollection." - - ^ self new - object: anObject; - collection: aCollection; - signal \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/collection..st b/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/collection..st deleted file mode 100644 index 1cbebd7..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/collection..st +++ /dev/null @@ -1,5 +0,0 @@ -accessing -collection: aCollection - "Set the collection where something is not found in" - - collection := aCollection \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/collection.st b/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/collection.st deleted file mode 100644 index c2192ab..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/collection.st +++ /dev/null @@ -1,5 +0,0 @@ -accessing -collection - "Return the collection where something is not found in" - - ^ collection \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/messageText.st b/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/messageText.st deleted file mode 100644 index 89c4479..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/messageText.st +++ /dev/null @@ -1,5 +0,0 @@ -accessing -messageText - "Overwritten with standard text. To ease portability to other Smalltalk dialects we do not access the instVar 'messageText' as not all dialects have it. Not caching the value on the instVar shouldn't bring any performance hit in this case. " - - ^ self standardMessageText \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/object..st b/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/object..st deleted file mode 100644 index 17b79eb..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/object..st +++ /dev/null @@ -1,5 +0,0 @@ -accessing -object: anObject - "Set the object that was not found" - - object := anObject \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/object.st b/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/object.st deleted file mode 100644 index 44ae0b9..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/object.st +++ /dev/null @@ -1,5 +0,0 @@ -accessing -object - "Return the object that was not found" - - ^ object \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/standardMessageText.st b/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/standardMessageText.st deleted file mode 100644 index 182f3fe..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/standardMessageText.st +++ /dev/null @@ -1,7 +0,0 @@ -private -standardMessageText - ^ String streamContents: [ :stream | - stream << 'No mapping found for '. - stream print: self object. - stream << ' in '. - stream print: self collection class ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/methodProperties.json b/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/methodProperties.json deleted file mode 100644 index d51c37f..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/methodProperties.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "instance" : { - "collection" : "marianopeck 1/31/2018 09:10", - "collection:" : "marianopeck 1/31/2018 09:10", - "object:" : "MarianoMartinezPeck 1/25/2018 09:35", - "object" : "MarianoMartinezPeck 1/25/2018 09:35", - "messageText" : "MarianoMartinezPeck 1/30/2018 08:46", - "standardMessageText" : "MarianoMartinezPeck 1/25/2018 09:36" - }, - "class" : { - "signalFor:" : "MarianoMartinezPeck 1/30/2018 09:48", - "signalFor:in:" : "MarianoMartinezPeck 1/30/2018 09:48" - } -} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/properties.json b/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/properties.json deleted file mode 100644 index 85ff1ed..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/properties.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "commentStamp" : "MarianoMartinezPeck 1/30/2018 09:47", - "super" : "Error", - "category" : "Neo-JSON-Core", - "classinstvars" : [ ], - "pools" : [ ], - "classvars" : [ ], - "instvars" : [ - "object", - "collection" - ], - "name" : "NeoJSONMappingNotFound", - "type" : "normal" -} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObject.class/README.md b/repository/Neo-JSON-Core.package/NeoJSONObject.class/README.md deleted file mode 100644 index 41426e0..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONObject.class/README.md +++ /dev/null @@ -1,37 +0,0 @@ -I am NeoJSONObject. -I am a Dictionary. - -I behave more like a JavaScript object. I return nil for missing keys. I allow any property to be read or set by using a normal accessor message. - -The following are equivalent: - - self foo. - self at: #foo. - -As are the following - - self foo: 1. - self at: #foo put: 1. - -Except that in the first case, self is returned. - -I can optionally be used by NeoJSONReader as mapClass (see #mapClass:). - -For output, I act just like my superclass (it is thus not necessary to do any conversions). - -Example: - - NeoJSONObject fromString: '{"foo":1,"bar":-2}'. - NeoJSONObject new foo: 1; bar: -2. - { #x -> 100. #y -> 200 } as: NeoJSONObject. - (NeoJSONObject new data: (NeoJSONObject new id: #sensor1; value: 37.5)) asString. - -I use JSON as my printed representation. To convert me to JSON, use #printString or #asString. - -Additionally, I support path access for nested instances of me, using #atPath: and #atPath:put: - -The first is special because it returns nil as soon as a key is missing. The second is special because it creates extra levels (instances of me) as needed to follow the path of keys. - - NeoJSONObject new atPath: #(one two three) put: 42; yourself. - NeoJSONObject new atPath: #(one two three) put: 42; atPath: #(one two three). - \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObject.class/class/fromString..st b/repository/Neo-JSON-Core.package/NeoJSONObject.class/class/fromString..st deleted file mode 100644 index 9748d24..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONObject.class/class/fromString..st +++ /dev/null @@ -1,8 +0,0 @@ -convenience -fromString: string - "Parse string as JSON, so that maps become instances of me" - - ^ (NeoJSONReader on: string readStream) - mapClass: NeoJSONObject; - propertyNamesAsSymbols: true; - next \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/at..st b/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/at..st deleted file mode 100644 index ce6d923..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/at..st +++ /dev/null @@ -1,6 +0,0 @@ -accessing -at: key - "I return nil for missing keys. - My superclass would signal a KeyNotFound." - - ^ self at: key ifAbsent: [ nil ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/atPath..st b/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/atPath..st deleted file mode 100644 index 65d2520..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/atPath..st +++ /dev/null @@ -1,10 +0,0 @@ -accessing -atPath: keyCollection - "Use each key in keyCollection recursively, stop when nil is encountered" - - | value | - value := self. - keyCollection do: [ :each | - value := value at: each. - value ifNil: [ ^ nil ] ]. - ^ value \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/atPath.put..st b/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/atPath.put..st deleted file mode 100644 index 9c01d25..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/atPath.put..st +++ /dev/null @@ -1,12 +0,0 @@ -accessing -atPath: keyCollection put: newValue - "Use each key in keyCollection recursively, create new levels when needed" - - | target | - keyCollection ifEmpty: [ ^ self ]. - target := self. - keyCollection allButLastDo: [ :each | - (target at: each) - ifNil: [ target := target at: each put: target species new ] - ifNotNil: [ :subValue | target := subValue ] ]. - ^ target at: keyCollection last put: newValue \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/doesNotUnderstand..st b/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/doesNotUnderstand..st deleted file mode 100644 index 19f6e76..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/doesNotUnderstand..st +++ /dev/null @@ -1,12 +0,0 @@ -reflective operations -doesNotUnderstand: message - "Overwritten so that 'self foo' becomes 'self at: #foo' - and 'self foo: 1' becomes 'self at: #foo put: 1' except that self is returned" - - | key | - key := message selector. - key isUnary - ifTrue: [ ^ self at: key ]. - ^ (key isKeyword and: [ key numArgs = 1 ]) - ifTrue: [ self at: key allButLast asSymbol put: message arguments first; yourself ] - ifFalse: [ super doesNotUnderstand: message ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/name.st b/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/name.st deleted file mode 100644 index 7e63645..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/name.st +++ /dev/null @@ -1,5 +0,0 @@ -accessing -name - "Overwritten to make this accessor available as key" - - ^ self at: #name \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/printOn..st b/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/printOn..st deleted file mode 100644 index b48cac6..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/printOn..st +++ /dev/null @@ -1,10 +0,0 @@ -printing -printOn: stream - "I use my JSON representation when printing myself" - - [ (NeoJSONWriter on: stream) nextPut: self ] - on: Error - do: [ :exception | - stream - nextPutAll: ' Error printing JSON: '; - nextPutAll: exception printString ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/value.st b/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/value.st deleted file mode 100644 index fadaec3..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONObject.class/instance/value.st +++ /dev/null @@ -1,5 +0,0 @@ -evaluating -value - "Overwritten to make this accessor available as key" - - ^ self at: #value \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObject.class/methodProperties.json b/repository/Neo-JSON-Core.package/NeoJSONObject.class/methodProperties.json deleted file mode 100644 index 8fa5dc8..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONObject.class/methodProperties.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "instance" : { - "atPath:put:" : "SvenVanCaekenberghe 4/26/2017 11:29", - "value" : "SvenVanCaekenberghe 9/8/2014 11:46", - "printOn:" : "marianopeck 1/31/2018 11:33", - "at:" : "SvenVanCaekenberghe 9/8/2014 11:43", - "doesNotUnderstand:" : "SvenVanCaekenberghe 2/3/2017 14:29", - "atPath:" : "SvenVanCaekenberghe 4/26/2017 09:06", - "name" : "SvenVanCaekenberghe 9/8/2014 11:46" - }, - "class" : { - "fromString:" : "SvenVanCaekenberghe 9/8/2014 13:33" - } -} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObject.class/properties.json b/repository/Neo-JSON-Core.package/NeoJSONObject.class/properties.json deleted file mode 100644 index 6400592..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONObject.class/properties.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "commentStamp" : "SvenVanCaekenberghe 4/26/2017 10:53", - "super" : "Dictionary", - "category" : "Neo-JSON-Core", - "classinstvars" : [ ], - "pools" : [ ], - "classvars" : [ ], - "instvars" : [ ], - "name" : "NeoJSONObject", - "type" : "normal" -} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/README.md b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/README.md deleted file mode 100644 index 6957dea..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/README.md +++ /dev/null @@ -1,10 +0,0 @@ -I am NeoJSONObjectMapping. -I describe how instances of a Smalltalk class are mapped to a JSON map. - -I do this using set of NeoJSONPropertyMappings. - -I know the Smalltalk class that I am a mapping for. This class is the schema identifier and is used to instanciate new objects. - -A mapping can be based on any combination of instance variables or accessors (getter/setter pairs). - -I offer a builder interface to constuct property mappings. \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/allowNil.st b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/allowNil.st deleted file mode 100644 index 58dca2b..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/allowNil.st +++ /dev/null @@ -1,5 +0,0 @@ -initialize-release -allowNil - "Set that I will allow nil/null values when I read/expect an object" - - allowNil := true \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/identifier.st b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/identifier.st deleted file mode 100644 index cdf717c..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/identifier.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -identifier - ^ subjectClass \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/initialize.st b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/initialize.st deleted file mode 100644 index 074317d..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/initialize.st +++ /dev/null @@ -1,5 +0,0 @@ -initialize-release -initialize - super initialize. - properties := OrderedCollection new. - allowNil := false \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAccessor..st b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAccessor..st deleted file mode 100644 index d8d20b3..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAccessor..st +++ /dev/null @@ -1,3 +0,0 @@ -mapping -mapAccessor: accessor - ^ self mapAccessor: accessor to: accessor \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAccessor.mutator.to..st b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAccessor.mutator.to..st deleted file mode 100644 index b0078fd..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAccessor.mutator.to..st +++ /dev/null @@ -1,6 +0,0 @@ -mapping -mapAccessor: accessor mutator: mutator to: propertyName - ^ self - mapProperty: propertyName - getter: [ :object | object perform: accessor ] - setter: [ :object :value | object perform: mutator with: value ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAccessor.to..st b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAccessor.to..st deleted file mode 100644 index 0575f7a..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAccessor.to..st +++ /dev/null @@ -1,6 +0,0 @@ -mapping -mapAccessor: accessor to: propertyName - ^ self - mapProperty: propertyName - getter: [ :object | object perform: accessor ] - setter: [ :object :value | object perform: accessor asMutator with: value ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAccessors..st b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAccessors..st deleted file mode 100644 index e9552cd..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAccessors..st +++ /dev/null @@ -1,3 +0,0 @@ -mapping -mapAccessors: accessors - ^ accessors collect: [ :each | self mapAccessor: each ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAllInstVars.st b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAllInstVars.st deleted file mode 100644 index 740548c..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAllInstVars.st +++ /dev/null @@ -1,3 +0,0 @@ -convenience -mapAllInstVars - ^ self mapInstVars: subjectClass allInstVarNames \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVar..st b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVar..st deleted file mode 100644 index f29739f..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVar..st +++ /dev/null @@ -1,3 +0,0 @@ -mapping -mapInstVar: instVarName - ^ self mapInstVar: instVarName to: instVarName \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVar.to..st b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVar.to..st deleted file mode 100644 index 36ee121..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVar.to..st +++ /dev/null @@ -1,15 +0,0 @@ -mapping -mapInstVar: instVarName to: propertyName - | index | - index := - "For portability reasons, do not use instVarIndexFor:ifAbsent: - (it doesn't exist in all Smalltalk dialects) but the below approach. - Also, convert to symbols for portability reasons" - (subjectClass allInstVarNames collect: [ :each | each asSymbol ]) - indexOf: instVarName asSymbol - ifAbsent: [ self error: 'Inst var not found: ', instVarName printString ]. - ^ self - mapProperty: propertyName asString - getter: [ :object | object instVarAt: index ] - setter: [ :object :value | object instVarAt: index put: value ] - diff --git a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVars..st b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVars..st deleted file mode 100644 index 240320e..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVars..st +++ /dev/null @@ -1,3 +0,0 @@ -mapping -mapInstVars: instVarNames - ^ instVarNames collect: [ :each | self mapInstVar: each ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVars.st b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVars.st deleted file mode 100644 index c7296cb..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVars.st +++ /dev/null @@ -1,3 +0,0 @@ -convenience -mapInstVars - ^ self mapInstVars: subjectClass instVarNames \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapProperty.getter.setter..st b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapProperty.getter.setter..st deleted file mode 100644 index 88161b6..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapProperty.getter.setter..st +++ /dev/null @@ -1,11 +0,0 @@ -mapping -mapProperty: propertyName getter: readBlock setter: writeBlock - | propertyMapping | - propertyMapping := NeoJSONPropertyMapping new. - propertyMapping - propertyName: propertyName; - getter: readBlock; - setter: writeBlock. - properties removeAllSuchThat: [ :each | each propertyName = propertyMapping propertyName ]. - properties addLast: propertyMapping. - ^ propertyMapping \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/propertyNamed.ifAbsent..st b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/propertyNamed.ifAbsent..st deleted file mode 100644 index 975f27a..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/propertyNamed.ifAbsent..st +++ /dev/null @@ -1,5 +0,0 @@ -accessing -propertyNamed: propertyName ifAbsent: block - | symbolPropertyName | - symbolPropertyName := propertyName asSymbol. - ^ properties detect: [ :each | each propertyName = symbolPropertyName ] ifNone: block \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/readFrom..st b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/readFrom..st deleted file mode 100644 index ffb2d7d..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/readFrom..st +++ /dev/null @@ -1,15 +0,0 @@ -parsing -readFrom: jsonReader - | anObject | - anObject := subjectClass new. - allowNil ifTrue: [ - jsonReader parseConstantDo: [ :value | - ^ value ifNotNil: [ jsonReader error: 'Unexpected boolean constant' ] ] ]. - jsonReader parseMapKeysDo: [ :key | - (self propertyNamed: key ifAbsent: [ nil ]) - ifNil: [ - "read, skip & ignore value" - jsonReader next ] - ifNotNil: [ :mapping | - mapping readObject: anObject from: jsonReader ] ]. - ^ anObject \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/subjectClass..st b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/subjectClass..st deleted file mode 100644 index 8be311b..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/subjectClass..st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -subjectClass: smalltalkClass - subjectClass := smalltalkClass \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/writeObject.on..st b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/writeObject.on..st deleted file mode 100644 index 96857d6..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/writeObject.on..st +++ /dev/null @@ -1,5 +0,0 @@ -writing -writeObject: anObject on: jsonWriter - jsonWriter writeMapStreamingDo: [ :jsonMapWriter | - properties do: [ :each | - each writeObject: anObject on: jsonMapWriter ] ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/methodProperties.json b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/methodProperties.json deleted file mode 100644 index c5f0be9..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/methodProperties.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "instance" : { - "propertyNamed:ifAbsent:" : "SvenVanCaekenberghe 2/6/2018 17:31", - "mapInstVar:" : "SvenVanCaekenberghe 6/9/2012 18:37", - "mapInstVars:" : "SvenVanCaekenberghe 7/6/2017 09:55", - "mapAccessor:" : "SvenVanCaekenberghe 6/12/2012 13:13", - "allowNil" : "SvenVanCaekenberghe 11/13/2017 18:40", - "readFrom:" : "SvenVanCaekenberghe 12/30/2015 11:48", - "writeObject:on:" : "SvenVanCaekenberghe 7/11/2016 10:54", - "mapAccessors:" : "SvenVanCaekenberghe 7/6/2017 09:55", - "identifier" : "SvenVanCaekenberghe 3/23/2014 19:25", - "initialize" : "SvenVanCaekenberghe 7/11/2016 10:54", - "mapAllInstVars" : "SvenVanCaekenberghe 7/6/2017 09:55", - "mapInstVars" : "SvenVanCaekenberghe 7/6/2017 09:55", - "subjectClass:" : "SvenVanCaekenberghe 6/6/2012 15:32", - "mapProperty:getter:setter:" : "SvenVanCaekenberghe 2/6/2018 17:28", - "mapInstVar:to:" : "SvenVanCaekenberghe 2/6/2018 17:30", - "mapAccessor:mutator:to:" : "SvenVanCaekenberghe 6/12/2012 13:12", - "mapAccessor:to:" : "SvenVanCaekenberghe 6/12/2012 13:13" - }, - "class" : { } -} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/properties.json b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/properties.json deleted file mode 100644 index bc5f668..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/properties.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "commentStamp" : "", - "super" : "NeoJSONMapping", - "category" : "Neo-JSON-Core", - "classinstvars" : [ ], - "pools" : [ ], - "classvars" : [ ], - "instvars" : [ - "subjectClass", - "properties", - "allowNil" - ], - "name" : "NeoJSONObjectMapping", - "type" : "normal" -} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONParseError.class/README.md b/repository/Neo-JSON-Core.package/NeoJSONParseError.class/README.md deleted file mode 100644 index 378a11b..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONParseError.class/README.md +++ /dev/null @@ -1,4 +0,0 @@ -I am NeoJSONParseError. -I am an Error. - -I am signalled when JSON input is not valid while parsing. \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONParseError.class/methodProperties.json b/repository/Neo-JSON-Core.package/NeoJSONParseError.class/methodProperties.json deleted file mode 100644 index d158391..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONParseError.class/methodProperties.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "instance" : { }, - "class" : { } -} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONParseError.class/properties.json b/repository/Neo-JSON-Core.package/NeoJSONParseError.class/properties.json deleted file mode 100644 index 94c249b..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONParseError.class/properties.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "commentStamp" : "", - "super" : "Error", - "category" : "Neo-JSON-Core", - "classinstvars" : [ ], - "pools" : [ ], - "classvars" : [ ], - "instvars" : [ ], - "name" : "NeoJSONParseError", - "type" : "normal" -} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/README.md b/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/README.md deleted file mode 100644 index 1da0980..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/README.md +++ /dev/null @@ -1,7 +0,0 @@ -I am NeoJSONPropertyMapping. -I describe how a property of a Smalltalk class maps to a JSON property. - -A property is either an instance variable or getter/setter pair. -I hold a getter and setter block to do the actual work. The property name is used in JSON. - -Optionally, the schema for the value of my property can be specified. This is then used recursively. \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/getter..st b/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/getter..st deleted file mode 100644 index 70af252..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/getter..st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -getter: block - getter := block \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/printOn..st b/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/printOn..st deleted file mode 100644 index cb04aed..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/printOn..st +++ /dev/null @@ -1,4 +0,0 @@ -printing -printOn: stream - super printOn: stream. - stream nextPut: $(; print: propertyName; nextPut: $) \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/propertyName..st b/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/propertyName..st deleted file mode 100644 index 7b044f7..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/propertyName..st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -propertyName: symbolOrString - propertyName := symbolOrString asSymbol \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/propertyName.st b/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/propertyName.st deleted file mode 100644 index 2a727f6..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/propertyName.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -propertyName - ^ propertyName \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/readObject.from..st b/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/readObject.from..st deleted file mode 100644 index 59b4d21..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/readObject.from..st +++ /dev/null @@ -1,5 +0,0 @@ -parsing -readObject: anObject from: jsonReader - | value | - value := jsonReader nextAs: valueSchema. - setter value: anObject value: value \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/setter..st b/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/setter..st deleted file mode 100644 index 4b51f72..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/setter..st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -setter: block - setter := block \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/valueSchema..st b/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/valueSchema..st deleted file mode 100644 index 96d3f93..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/valueSchema..st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -valueSchema: schemaName - valueSchema := schemaName \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/writeObject.on..st b/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/writeObject.on..st deleted file mode 100644 index b3b0f51..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/writeObject.on..st +++ /dev/null @@ -1,6 +0,0 @@ -writing -writeObject: anObject on: jsonMapWriter - | value | - value := getter value: anObject. - (value notNil or: [ jsonMapWriter writeNil ]) - ifTrue: [ jsonMapWriter writeKey: propertyName value: value as: valueSchema ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/methodProperties.json b/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/methodProperties.json deleted file mode 100644 index 8ce6b72..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/methodProperties.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "instance" : { - "setter:" : "SvenVanCaekenberghe 6/6/2012 15:34", - "valueSchema:" : "SvenVanCaekenberghe 6/8/2012 17:01", - "printOn:" : "SvenVanCaekenberghe 7/4/2013 19:07", - "writeObject:on:" : "SvenVanCaekenberghe 5/28/2014 20:46", - "getter:" : "SvenVanCaekenberghe 6/6/2012 15:34", - "readObject:from:" : "SvenVanCaekenberghe 6/8/2012 17:04", - "propertyName:" : "SvenVanCaekenberghe 2/6/2018 17:26", - "propertyName" : "SvenVanCaekenberghe 7/11/2016 10:59" - }, - "class" : { } -} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/properties.json b/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/properties.json deleted file mode 100644 index c0e543e..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/properties.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "commentStamp" : "", - "super" : "Object", - "category" : "Neo-JSON-Core", - "classinstvars" : [ ], - "pools" : [ ], - "classvars" : [ ], - "instvars" : [ - "propertyName", - "valueSchema", - "getter", - "setter" - ], - "name" : "NeoJSONPropertyMapping", - "type" : "normal" -} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/README.md b/repository/Neo-JSON-Core.package/NeoJSONReader.class/README.md deleted file mode 100644 index 9a24cec..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/README.md +++ /dev/null @@ -1,29 +0,0 @@ -I am NeoJSONReader. -I am a NeoJSONMapper. -I parse a JSON representation from a textual stream into Smalltalk objects. - -Primitive types are automatically mapped to their Smalltalk counterpart: Numbers, Strings, Booleans and UndefinedObject. -When parsing using #next, lists normally become Arrays and maps become Dictionaries. -An alternative listClass or mapClass can be specified. - -When parsing using #nextAs: a schema can be specified. This schema defines a mapping to be used. - -Here are some examples: - - NeoJSONReader fromString: ' [ 1,2,3 ] '. - NeoJSONReader fromString: ' [ 3.14159, true, false, null, "string" ] '. - NeoJSONReader fromString: ' { "x" : 1, "y" : 2 } '. - - (NeoJSONReader on: ' { "x" : 1, "y" : 2 } ' readStream) - mapInstVarsFor: Point; - nextAs: Point. - - (NeoJSONReader on: '[ { "x" : 1, "y" : 2 }, { "x" : 3, "y" : 4 } ]' readStream) - mapInstVarsFor: Point; - for: #ArrayOfPoints customDo: [ :mapping | - mapping listOfElementSchema: Point ]; - nextAs: #ArrayOfPoints. - - (NeoJSONReader on: '[ { "x" : 1, "y" : 2 }, { "x" : 3, "y" : 4 } ]' readStream) - mapInstVarsFor: Point; - nextListAs: Point. \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/class/fromString..st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/class/fromString..st deleted file mode 100644 index 0fe69e0..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/class/fromString..st +++ /dev/null @@ -1,3 +0,0 @@ -convenience -fromString: string - ^ (self on: string readStream) next \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/class/fromString.as..st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/class/fromString.as..st deleted file mode 100644 index 949b95d..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/class/fromString.as..st +++ /dev/null @@ -1,3 +0,0 @@ -convenience -fromString: string as: schema - ^ (self on: string readStream) nextAs: schema \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/class/on..st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/class/on..st deleted file mode 100644 index 31100fa..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/class/on..st +++ /dev/null @@ -1,8 +0,0 @@ -instance creation -on: readStream - "Initialize on readStream, which should be a character stream that - implements #next, #peek, #atEnd and (optionally) #close." - - ^ self new - on: readStream; - yourself \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/atEnd.st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/atEnd.st deleted file mode 100644 index b761ce7..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/atEnd.st +++ /dev/null @@ -1,3 +0,0 @@ -testing -atEnd - ^ readStream atEnd \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/close.st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/close.st deleted file mode 100644 index 0b2225f..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/close.st +++ /dev/null @@ -1,5 +0,0 @@ -initialize-release -close - readStream ifNotNil: [ - readStream close. - readStream := nil ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/consumeWhitespace.st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/consumeWhitespace.st deleted file mode 100644 index a40b705..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/consumeWhitespace.st +++ /dev/null @@ -1,7 +0,0 @@ -private -consumeWhitespace - "Strip whitespaces from the input stream." - - [ readStream atEnd not and: [ readStream peek isSeparator ] ] - whileTrue: [ - readStream next ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/error..st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/error..st deleted file mode 100644 index f9b9bfc..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/error..st +++ /dev/null @@ -1,3 +0,0 @@ -private -error: text - NeoJSONParseError signal: text \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/expectChar..st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/expectChar..st deleted file mode 100644 index aaa555c..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/expectChar..st +++ /dev/null @@ -1,7 +0,0 @@ -private -expectChar: character - "Expect character and consume input and optional whitespace at the end, - throw an error otherwise." - - (self matchChar: character) - ifFalse: [ self error: character asString, ' expected' ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/failIfNotAtEnd.st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/failIfNotAtEnd.st deleted file mode 100644 index 2db27e9..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/failIfNotAtEnd.st +++ /dev/null @@ -1,4 +0,0 @@ -parsing -failIfNotAtEnd - self atEnd - ifFalse: [ self error: 'extraneous input detected' ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/initialize.st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/initialize.st deleted file mode 100644 index d8a66ad..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/initialize.st +++ /dev/null @@ -1,4 +0,0 @@ -initialize-release -initialize - super initialize. - propertyNamesAsSymbols := false \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/listClass..st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/listClass..st deleted file mode 100644 index b4c3791..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/listClass..st +++ /dev/null @@ -1,3 +0,0 @@ -initialize-release -listClass: collectionClass - listClass := collectionClass \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/listClass.st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/listClass.st deleted file mode 100644 index 79121bd..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/listClass.st +++ /dev/null @@ -1,5 +0,0 @@ -accessing -listClass - "Return the collection type to use for JSON lists" - - ^ listClass ifNil: [ Array ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/mapClass..st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/mapClass..st deleted file mode 100644 index e52f3f3..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/mapClass..st +++ /dev/null @@ -1,3 +0,0 @@ -initialize-release -mapClass: collectionClass - mapClass := collectionClass \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/mapClass.st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/mapClass.st deleted file mode 100644 index 8d9c040..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/mapClass.st +++ /dev/null @@ -1,5 +0,0 @@ -accessing -mapClass - "Return the collection type to use for JSON maps" - - ^ mapClass ifNil: [ Dictionary ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/match.do..st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/match.do..st deleted file mode 100644 index 7109d1b..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/match.do..st +++ /dev/null @@ -1,9 +0,0 @@ -private -match: string do: block - "Try to read and consume string and execute block if successful. - Else do nothing (but do not back up)" - - (string allSatisfy: [ :each | readStream peekFor: each ]) - ifTrue: [ - self consumeWhitespace. - block value ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/matchChar..st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/matchChar..st deleted file mode 100644 index 2b91639..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/matchChar..st +++ /dev/null @@ -1,11 +0,0 @@ -private -matchChar: character - "Tries to match character, consume input and - answer true if successful and consumes whitespace at the end. - When character does not match, return false and leave stream untouched." - - ^ (readStream peekFor: character) - ifTrue: [ - self consumeWhitespace. - true ] - ifFalse: [ false ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/next.st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/next.st deleted file mode 100644 index e8c5a5c..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/next.st +++ /dev/null @@ -1,8 +0,0 @@ -accessing -next - "Primary interface to parse a JSON value. - Return either primitives, a listClass or a mapClass instance." - - ^ self - consumeWhitespace; - parseValue \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/nextAs..st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/nextAs..st deleted file mode 100644 index d41ad39..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/nextAs..st +++ /dev/null @@ -1,11 +0,0 @@ -accessing -nextAs: schema - "Secondary interface to parse JSON. - Return an object according to schema. - If schema is nil, act like #next" - - | mapping | - schema ifNil: [ ^ self next ]. - self consumeWhitespace. - mapping := self mappingFor: schema. - ^ mapping readFrom: self \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/nextListAs..st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/nextListAs..st deleted file mode 100644 index 564fd76..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/nextListAs..st +++ /dev/null @@ -1,8 +0,0 @@ -accessing -nextListAs: schema - "Secondary interface to parse JSON. - Return a list of objects, each element according to schema." - - ^ self listClass streamContents: [ :stream | - self parseListDo: [ - stream nextPut: (self nextAs: schema) ] ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/on..st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/on..st deleted file mode 100644 index d6071ec..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/on..st +++ /dev/null @@ -1,6 +0,0 @@ -initialize-release -on: aReadStream - "Initialize on aReadStream, which should be a character stream that - implements #next, #peek, #atEnd and (optionally) #close." - - readStream := aReadStream \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacter.st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacter.st deleted file mode 100644 index b71f65f..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacter.st +++ /dev/null @@ -1,14 +0,0 @@ -parsing -parseCharacter - | char | - (char := readStream next) = $\ - ifFalse: [ ^ char ]. - ('/"\' includes: (char := readStream next)) - ifTrue: [ ^ char ]. - ('bfnrt' includes: char) - ifTrue: [ ^ self unescapeChar: char ]. - char = $u - ifTrue: [ ^ self parseCharacterHex ]. - char - ifNil: [ self error: 'invalid escape, end of file' ] - ifNotNil: [ self error: 'invalid escape character \' , char asString ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacterHex.st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacterHex.st deleted file mode 100644 index 78a4862..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacterHex.st +++ /dev/null @@ -1,14 +0,0 @@ -private -parseCharacterHex - | value codePoint | - value := self parseCharacterHex4Value. - (value < 16rD800 or: [ value > 16rDBFF ]) - ifTrue: [ codePoint := value ] - ifFalse: [ | leadSurrogate trailSurrogate | - "Characters not in the Basic Multilingual Plane are encoded as a UTF-16 surrogate pair" - "See https://tools.ietf.org/html/rfc7159#section-7" - leadSurrogate := value. - trailSurrogate := self parseTrailingSurrogateHexEscape. - codePoint := (leadSurrogate - 16rD800) * 16r400 + (trailSurrogate - 16rDC00). - codePoint := 16r10000 + codePoint ]. - ^ Character codePoint: codePoint \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacterHex4Value.st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacterHex4Value.st deleted file mode 100644 index 00ccdc0..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacterHex4Value.st +++ /dev/null @@ -1,7 +0,0 @@ -private -parseCharacterHex4Value - | value | - value := self parseCharacterHexDigit. - 3 timesRepeat: [ - value := (value << 4) + self parseCharacterHexDigit ]. - ^ value \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacterHexDigit.st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacterHexDigit.st deleted file mode 100644 index 0456f7a..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacterHexDigit.st +++ /dev/null @@ -1,13 +0,0 @@ -private -parseCharacterHexDigit - | digit | - readStream atEnd - ifFalse: [ - digit := readStream next asInteger. - (digit between: "$0" 48 and: "$9" 57) - ifTrue: [ ^ digit - 48 ]. - (digit between: "$A" 65 and: "$F" 70) - ifTrue: [ ^ digit - 55 ]. - (digit between: "$a" 97 and: "$f" 102) - ifTrue: [ ^ digit - 87 ] ]. - self error: 'hex-digit expected' \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseConstantDo..st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseConstantDo..st deleted file mode 100644 index ac998b8..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseConstantDo..st +++ /dev/null @@ -1,15 +0,0 @@ -private -parseConstantDo: block - "Parse and consume either true|false|nil|null and execute block - or else do nothing (but do not back up). - Hand written implementation to avoid the use of #position:" - - (readStream peek = $t) - ifTrue: [ - ^ self match: 'true' do: [ block value: true ] ]. - (readStream peek = $f) - ifTrue: [ - ^ self match: 'false' do: [ block value: false ] ]. - (readStream peek = $n) - ifTrue: [ - ^ self match: 'null' do: [ block value: nil ] ] diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseList.st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseList.st deleted file mode 100644 index 54b9be3..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseList.st +++ /dev/null @@ -1,8 +0,0 @@ -parsing -parseList - ^ self listClass - streamContents: [ :stream | - self parseListElementsDo: [ :each | - stream nextPut: each ] ] - - \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseListDo..st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseListDo..st deleted file mode 100644 index 4eb0a50..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseListDo..st +++ /dev/null @@ -1,13 +0,0 @@ -parsing -parseListDo: block - self expectChar: $[. - (self matchChar: $]) - ifTrue: [ ^ self ]. - [ readStream atEnd ] - whileFalse: [ - block value. - (self matchChar: $]) - ifTrue: [ ^ self ]. - (self matchChar: $,) - ifFalse: [ self error: ', or ] expected' ] ]. - self error: 'incomplete list' \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseListElementsDo..st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseListElementsDo..st deleted file mode 100644 index 015726a..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseListElementsDo..st +++ /dev/null @@ -1,4 +0,0 @@ -parsing -parseListElementsDo: block - self parseListDo: [ - block value: self parseValue ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseMap.st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseMap.st deleted file mode 100644 index 3e841fa..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseMap.st +++ /dev/null @@ -1,7 +0,0 @@ -parsing -parseMap - | map | - map := self mapClass new. - self parseMapKeysAndValuesDo: [ :key :value | - map at: key put: value ]. - ^ map \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseMapDo..st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseMapDo..st deleted file mode 100644 index df2fdf2..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseMapDo..st +++ /dev/null @@ -1,12 +0,0 @@ -parsing -parseMapDo: block - self expectChar: ${. - (self matchChar: $}) - ifTrue: [ ^ self ]. - [ readStream atEnd ] whileFalse: [ - block value. - (self matchChar: $}) - ifTrue: [ ^ self ]. - (self matchChar: $,) - ifFalse: [ self error: ', or } expected' ] ]. - self error: 'incomplete map' \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseMapKeysAndValuesDo..st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseMapKeysAndValuesDo..st deleted file mode 100644 index 2193008..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseMapKeysAndValuesDo..st +++ /dev/null @@ -1,4 +0,0 @@ -parsing -parseMapKeysAndValuesDo: block - self parseMapKeysDo: [ :key | - block value: key value: self parseValue ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseMapKeysDo..st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseMapKeysDo..st deleted file mode 100644 index e55020e..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseMapKeysDo..st +++ /dev/null @@ -1,6 +0,0 @@ -parsing -parseMapKeysDo: block - self parseMapDo: [ | key | - key := self parsePropertyName. - self expectChar: $:. - block value: key ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseNumber.st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseNumber.st deleted file mode 100644 index 512df2f..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseNumber.st +++ /dev/null @@ -1,13 +0,0 @@ -parsing -parseNumber - | negated number | - negated := readStream peekFor: $-. - number := self parseNumberInteger. - (readStream peekFor: $.) - ifTrue: [ number := number + self parseNumberFraction ]. - ((readStream peekFor: $e) or: [ readStream peekFor: $E ]) - ifTrue: [ number := number * self parseNumberExponent ]. - negated - ifTrue: [ number := number negated ]. - self consumeWhitespace. - ^ number \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseNumberExponent.st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseNumberExponent.st deleted file mode 100644 index e5a310a..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseNumberExponent.st +++ /dev/null @@ -1,16 +0,0 @@ -parsing -parseNumberExponent - | number negated | - number := 0. - (negated := readStream peekFor: $-) - ifFalse: [ readStream peekFor: $+ ]. - (readStream atEnd or: [ readStream peek isDigit not ]) - ifTrue: [ self error: 'number exponent expected' ]. - [ readStream atEnd not and: [ readStream peek isDigit ] ] - whileTrue: [ number := 10 * number + readStream next digitValue ]. - negated - ifTrue: [ number := number negated ]. - number positive - ifTrue: [ number > Float emax ifTrue: [ self error: 'number exponent too large' ] ] - ifFalse: [ number < Float emin ifTrue: [ self error: 'number exponent too small' ] ]. - ^ 10 raisedTo: number \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseNumberFraction.st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseNumberFraction.st deleted file mode 100644 index 2e03bc8..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseNumberFraction.st +++ /dev/null @@ -1,10 +0,0 @@ -parsing -parseNumberFraction - | number power | - number := 0. - power := 1.0. - [ readStream atEnd not and: [ readStream peek isDigit ] ] - whileTrue: [ - number := 10 * number + readStream next digitValue. - power := power * 10.0 ]. - ^ number / power \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseNumberInteger.st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseNumberInteger.st deleted file mode 100644 index a4b8941..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseNumberInteger.st +++ /dev/null @@ -1,9 +0,0 @@ -parsing -parseNumberInteger - | number | - number := nil. - [ readStream atEnd not and: [ readStream peek isDigit ] ] - whileTrue: [ - number := 10 * (number ifNil: [ 0 ]) + readStream next digitValue ]. - number ifNil: [ self error: 'Integer digit expected' ]. - ^ number \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parsePropertyName.st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parsePropertyName.st deleted file mode 100644 index 912f789..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parsePropertyName.st +++ /dev/null @@ -1,11 +0,0 @@ -parsing -parsePropertyName - | name | - name := self parseValue. - ^ name isString - ifTrue: [ - propertyNamesAsSymbols - ifTrue: [ name asSymbol ] - ifFalse: [ name ] ] - ifFalse: [ - self error: 'property name must be a string, not ', name asString ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseString.st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseString.st deleted file mode 100644 index ea36a0f..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseString.st +++ /dev/null @@ -1,10 +0,0 @@ -parsing -parseString - | result | - (readStream peekFor: $") - ifFalse: [ self error: '" expected' ]. - result := self stringStreamContents: [ :stream | - [ readStream atEnd or: [ readStream peek = $" ] ] - whileFalse: [ stream nextPut: self parseCharacter ] ]. - self expectChar: $". - ^ result \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseTrailingSurrogateHexEscape.st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseTrailingSurrogateHexEscape.st deleted file mode 100644 index 00fbbda..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseTrailingSurrogateHexEscape.st +++ /dev/null @@ -1,5 +0,0 @@ -private -parseTrailingSurrogateHexEscape - (readStream next = $\ and: [ readStream next = $u ]) - ifTrue: [ ^ self parseCharacterHex4Value ] - ifFalse: [ self error: 'trailing surrogate hex escape expected' ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseValue.st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseValue.st deleted file mode 100644 index 8cba65c..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseValue.st +++ /dev/null @@ -1,15 +0,0 @@ -parsing -parseValue - | char | - readStream atEnd ifFalse: [ - char := readStream peek. - char = ${ - ifTrue: [ ^ self parseMap ]. - char = $[ - ifTrue: [ ^ self parseList ]. - char = $" - ifTrue: [ ^ self parseString ]. - (char = $- or: [ char isDigit ]) - ifTrue: [ ^ self parseNumber ]. - self parseConstantDo: [ :value | ^ value ] ]. - self error: 'invalid input: ', char asString \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/propertyNamesAsSymbols..st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/propertyNamesAsSymbols..st deleted file mode 100644 index 4cd6d5e..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/propertyNamesAsSymbols..st +++ /dev/null @@ -1,3 +0,0 @@ -initialize-release -propertyNamesAsSymbols: boolean - propertyNamesAsSymbols := boolean \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/stringStreamContents..st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/stringStreamContents..st deleted file mode 100644 index ab32e4c..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/stringStreamContents..st +++ /dev/null @@ -1,11 +0,0 @@ -private -stringStreamContents: block - "Like String streamContents: block - but reusing the underlying buffer for improved efficiency" - - stringStream - ifNil: [ - stringStream := (String new: 32) writeStream ]. - stringStream reset. - block value: stringStream. - ^ stringStream contents \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/unescapeChar..st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/unescapeChar..st deleted file mode 100644 index a07a9f5..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/unescapeChar..st +++ /dev/null @@ -1,15 +0,0 @@ -private -unescapeChar: char - "Handle one of the named character escapes, b, f, n, r or t. Else fail." - - char = $b - ifTrue: [ ^ Character backspace ]. - char = $f - ifTrue: [ ^ Character newPage ]. - char = $n - ifTrue: [ ^ Character lf ]. - char = $r - ifTrue: [ ^ Character cr ]. - char = $t - ifTrue: [ ^ Character tab ]. - self error: 'Unknown escape char: ', (String with: char) \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/methodProperties.json b/repository/Neo-JSON-Core.package/NeoJSONReader.class/methodProperties.json deleted file mode 100644 index bb6cde8..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/methodProperties.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "instance" : { - "error:" : "SvenVanCaekenberghe 6/12/2012 15:54", - "parseNumberFraction" : "SvenVanCaekenberghe 6/2/2012 14:00", - "parseValue" : "SvenVanCaekenberghe 6/12/2012 15:56", - "nextListAs:" : "SvenVanCaekenberghe 3/16/2016 10:58", - "parseConstantDo:" : "SvenVanCaekenberghe 6/2/2012 14:16", - "consumeWhitespace" : "SvenVanCaekenberghe 6/2/2012 21:26", - "mapClass:" : "SvenVanCaekenberghe 6/13/2012 09:38", - "parseListElementsDo:" : "SvenVanCaekenberghe 6/7/2012 17:16", - "stringStreamContents:" : "SvenVanCaekenberghe 6/7/2012 16:54", - "parseCharacterHexDigit" : "SvenVanCaekenberghe 6/2/2012 14:21", - "listClass:" : "SvenVanCaekenberghe 6/13/2012 09:38", - "failIfNotAtEnd" : "SvenVanCaekenberghe 5/29/2017 09:38", - "parseMapKeysDo:" : "SvenVanCaekenberghe 6/7/2012 17:23", - "parseNumber" : "SvenVanCaekenberghe 12/3/2012 11:08", - "unescapeChar:" : "SvenVanCaekenberghe 6/7/2012 16:55", - "parseListDo:" : "SvenVanCaekenberghe 5/29/2017 10:56", - "parseCharacter" : "SvenVanCaekenberghe 5/29/2017 10:25", - "parseMapDo:" : "SvenVanCaekenberghe 5/29/2017 10:56", - "listClass" : "SvenVanCaekenberghe 6/13/2012 09:37", - "propertyNamesAsSymbols:" : "SvenVanCaekenberghe 6/13/2012 09:39", - "initialize" : "SvenVanCaekenberghe 6/13/2012 09:39", - "parseList" : "SvenVanCaekenberghe 6/7/2012 17:17", - "mapClass" : "SvenVanCaekenberghe 6/13/2012 09:37", - "parseNumberInteger" : "SvenVanCaekenberghe 6/12/2012 16:15", - "matchChar:" : "SvenVanCaekenberghe 12/3/2012 10:51", - "on:" : "SvenVanCaekenberghe 6/13/2012 16:10", - "atEnd" : "SvenVanCaekenberghe 3/6/2013 14:46", - "parseNumberExponent" : "SvenVanCaekenberghe 5/29/2017 09:45", - "nextAs:" : "SvenVanCaekenberghe 3/16/2016 11:21", - "expectChar:" : "SvenVanCaekenberghe 6/2/2012 14:01", - "match:do:" : "SvenVanCaekenberghe 12/3/2012 10:57", - "parsePropertyName" : "SvenVanCaekenberghe 6/13/2012 09:40", - "parseString" : "SvenVanCaekenberghe 3/10/2017 13:51", - "next" : "SvenVanCaekenberghe 6/7/2012 16:56", - "parseMapKeysAndValuesDo:" : "SvenVanCaekenberghe 6/7/2012 17:22", - "parseMap" : "SvenVanCaekenberghe 6/7/2012 17:23", - "parseCharacterHex4Value" : "SvenVanCaekenberghe 2/24/2016 14:41", - "close" : "SvenVanCaekenberghe 6/2/2012 13:50", - "parseCharacterHex" : "SvenVanCaekenberghe 2/24/2016 14:48", - "parseTrailingSurrogateHexEscape" : "SvenVanCaekenberghe 2/24/2016 14:49" - }, - "class" : { - "fromString:as:" : "SvenVanCaekenberghe 6/9/2012 18:30", - "fromString:" : "SvenVanCaekenberghe 6/9/2012 18:26", - "on:" : "SvenVanCaekenberghe 6/13/2012 16:10" - } -} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/properties.json b/repository/Neo-JSON-Core.package/NeoJSONReader.class/properties.json deleted file mode 100644 index eef6e54..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/properties.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "commentStamp" : "SvenVanCaekenberghe 3/16/2016 11:23", - "super" : "NeoJSONMapper", - "category" : "Neo-JSON-Core", - "classinstvars" : [ ], - "pools" : [ ], - "classvars" : [ ], - "instvars" : [ - "readStream", - "stringStream", - "listClass", - "mapClass", - "propertyNamesAsSymbols" - ], - "name" : "NeoJSONReader", - "type" : "normal" -} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/README.md b/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/README.md deleted file mode 100644 index 0c90034..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/README.md +++ /dev/null @@ -1,4 +0,0 @@ -I am NeoJSONStreamingWriter. -I help in writing streamed maps and lists. - -This is an internal class used by NeoJSONWriter to deal with interleaving elements and separators as well as pretty printing. \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/class/on..st b/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/class/on..st deleted file mode 100644 index bb5f485..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/class/on..st +++ /dev/null @@ -1,5 +0,0 @@ -instance creation -on: jsonWriter - ^ self new - on: jsonWriter; - yourself \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/initialize.st b/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/initialize.st deleted file mode 100644 index a0c1206..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/initialize.st +++ /dev/null @@ -1,4 +0,0 @@ -initialize-release -initialize - super initialize. - first := true \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/on..st b/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/on..st deleted file mode 100644 index 69247ab..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/on..st +++ /dev/null @@ -1,3 +0,0 @@ -initialize-release -on: aJSONWriter - jsonWriter := aJSONWriter \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/wasUsed.st b/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/wasUsed.st deleted file mode 100644 index 07306d2..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/wasUsed.st +++ /dev/null @@ -1,3 +0,0 @@ -testing -wasUsed - ^ first not \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeElement..st b/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeElement..st deleted file mode 100644 index f3ea4f8..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeElement..st +++ /dev/null @@ -1,9 +0,0 @@ -writing -writeElement: value - first - ifTrue: [ - jsonWriter newlineIndent. - first := false ] - ifFalse: [ - jsonWriter listElementSeparator ]. - jsonWriter nextPut: value \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeElement.as..st b/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeElement.as..st deleted file mode 100644 index e3c7106..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeElement.as..st +++ /dev/null @@ -1,9 +0,0 @@ -writing -writeElement: value as: valueSchema - first - ifTrue: [ - jsonWriter newlineIndent. - first := false ] - ifFalse: [ - jsonWriter listElementSeparator ]. - jsonWriter nextPut: value as: valueSchema \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeKey.value..st b/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeKey.value..st deleted file mode 100644 index 1534966..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeKey.value..st +++ /dev/null @@ -1,9 +0,0 @@ -writing -writeKey: key value: value - first - ifTrue: [ - jsonWriter newlineIndent. - first := false ] - ifFalse: [ - jsonWriter mapElementSeparator ]. - jsonWriter encodeKey: key value: value \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeKey.value.as..st b/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeKey.value.as..st deleted file mode 100644 index 5fdc025..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeKey.value.as..st +++ /dev/null @@ -1,9 +0,0 @@ -writing -writeKey: key value: value as: valueSchema - first - ifTrue: [ - jsonWriter newlineIndent. - first := false ] - ifFalse: [ - jsonWriter mapElementSeparator ]. - jsonWriter encodeKey: key value: value as: valueSchema \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeNil.st b/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeNil.st deleted file mode 100644 index eb17c6d..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeNil.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -writeNil - ^ jsonWriter writeNil \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/methodProperties.json b/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/methodProperties.json deleted file mode 100644 index 2f819d8..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/methodProperties.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "instance" : { - "on:" : "SvenVanCaekenberghe 6/6/2012 14:49", - "writeKey:value:as:" : "SvenVanCaekenberghe 3/23/2014 21:53", - "wasUsed" : "SvenVanCaekenberghe 6/6/2012 15:00", - "initialize" : "SvenVanCaekenberghe 6/6/2012 14:48", - "writeNil" : "SvenVanCaekenberghe 5/28/2014 20:45", - "writeElement:" : "SvenVanCaekenberghe 6/6/2012 15:15", - "writeElement:as:" : "SvenVanCaekenberghe 9/22/2017 14:38", - "writeKey:value:" : "SvenVanCaekenberghe 6/6/2012 15:01" - }, - "class" : { - "on:" : "SvenVanCaekenberghe 6/6/2012 15:05" - } -} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/properties.json b/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/properties.json deleted file mode 100644 index 8f93742..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/properties.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "commentStamp" : "", - "super" : "Object", - "category" : "Neo-JSON-Core", - "classinstvars" : [ ], - "pools" : [ ], - "classvars" : [ ], - "instvars" : [ - "jsonWriter", - "first" - ], - "name" : "NeoJSONStreamingWriter", - "type" : "normal" -} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/README.md b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/README.md deleted file mode 100644 index e3ae21c..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/README.md +++ /dev/null @@ -1,22 +0,0 @@ -I am NeoJSONWriter. -I am a NeoJSONMapper. -I write a JSON representation of Smalltalk objects to a textual stream. - -Objects implementing #neoJsonOn: can be encoded. -A number of primitive types, like Strings, Numbers, Booleans and UndefinedObject are treated specially. -Collection are encoded as lists, except for Dictionaries that are encoded as maps. - -All other objects need a mapping to help in doing the encoding. - -Here are some examples: - - NeoJSONWriter toString: #(1 2 3). - NeoJSONWriter toString: { Float pi. true. false. 'string' }. - NeoJSONWriter toStringPretty: (Dictionary new at: #x put: 1; at: #y put: 2; yourself). - - String streamContents: [ :stream | - (NeoJSONWriter on: stream) - prettyPrint: true; - mapInstVarsFor: Point; - nextPut: (Array with: 1@3 with: -1@3) ]. - \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/class/on..st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/class/on..st deleted file mode 100644 index e2fd9e0..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/class/on..st +++ /dev/null @@ -1,8 +0,0 @@ -instance creation -on: writeStream - "Initialize on writeStream, which should be a character stream that - implements #nextPut:, #nextPutAll:, #space and (optionally) #close." - - ^ self new - on: writeStream; - yourself \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/class/toString..st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/class/toString..st deleted file mode 100644 index 02c72ef..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/class/toString..st +++ /dev/null @@ -1,4 +0,0 @@ -convenience -toString: object - ^ String streamContents: [ :stream | - (self on: stream) nextPut: object ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/class/toStringPretty..st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/class/toStringPretty..st deleted file mode 100644 index f088ef2..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/class/toStringPretty..st +++ /dev/null @@ -1,6 +0,0 @@ -convenience -toStringPretty: object - ^ String streamContents: [ :stream | - (self on: stream) - prettyPrint: true; - nextPut: object ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/asciiOnly..st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/asciiOnly..st deleted file mode 100644 index 14b2730..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/asciiOnly..st +++ /dev/null @@ -1,5 +0,0 @@ -initialize-release -asciiOnly: boolean - "Set whether I should escape all non ASCII characters or not" - - asciiOnly := boolean \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/close.st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/close.st deleted file mode 100644 index 73b1b7d..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/close.st +++ /dev/null @@ -1,7 +0,0 @@ -initialize-release -close - "Close the stream that I write to" - - writeStream ifNotNil: [ - writeStream close. - writeStream := nil ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/doesCodePointNeedEscaping..st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/doesCodePointNeedEscaping..st deleted file mode 100644 index 5b8c464..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/doesCodePointNeedEscaping..st +++ /dev/null @@ -1,5 +0,0 @@ -private -doesCodePointNeedEscaping: code - code < 32 ifTrue: [ ^ true ]. - ( code = 34 or: [ code = 92 ]) ifTrue: [ ^ true ]. - ^ asciiOnly and: [ code > 126 ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/encodeChar..st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/encodeChar..st deleted file mode 100644 index 9b11d82..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/encodeChar..st +++ /dev/null @@ -1,7 +0,0 @@ -private -encodeChar: char - | code | - code := char codePoint. - (self doesCodePointNeedEscaping: code) - ifTrue: [ self escapeChar: code ] - ifFalse: [ writeStream nextPut: char ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/encodeKey.value..st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/encodeKey.value..st deleted file mode 100644 index c758a10..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/encodeKey.value..st +++ /dev/null @@ -1,7 +0,0 @@ -private -encodeKey: key value: value - self nextPut: key. - self prettyPrintSpace. - writeStream nextPut: $:. - self prettyPrintSpace. - self nextPut: value \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/encodeKey.value.as..st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/encodeKey.value.as..st deleted file mode 100644 index 88e6699..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/encodeKey.value.as..st +++ /dev/null @@ -1,7 +0,0 @@ -private -encodeKey: key value: value as: valueSchema - self nextPut: key. - self prettyPrintSpace. - writeStream nextPut: $:. - self prettyPrintSpace. - self nextPut: value as: valueSchema \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/escapeChar..st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/escapeChar..st deleted file mode 100644 index fdedb11..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/escapeChar..st +++ /dev/null @@ -1,19 +0,0 @@ -private -escapeChar: code - code = 34 - ifTrue: [ ^ writeStream nextPutAll: '\"' ]. - code = 92 - ifTrue: [ ^ writeStream nextPutAll: '\\' ]. - code = 47 - ifTrue: [ ^ writeStream nextPutAll: '\/' ]. - code = 8 - ifTrue: [ ^ writeStream nextPutAll: '\b' ]. - code = 12 - ifTrue: [ ^ writeStream nextPutAll: '\f' ]. - code = 10 - ifTrue: [ ^ writeStream nextPutAll: '\n' ]. - code = 13 - ifTrue: [ ^ writeStream nextPutAll: '\r' ]. - code = 9 - ifTrue: [ ^ writeStream nextPutAll: '\t' ]. - self escapeUnicode: code \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/escapeUnicode..st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/escapeUnicode..st deleted file mode 100644 index 702458f..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/escapeUnicode..st +++ /dev/null @@ -1,15 +0,0 @@ -private -escapeUnicode: codePoint - codePoint <= 16rFFFF - ifTrue: [ self escapeUnicode4: codePoint ] - ifFalse: [ - codePoint <= 16r10FFFF - ifTrue: [ | leadSurrogate trailSurrogate shifted | - "Characters not in the Basic Multilingual Plane are encoded as a UTF-16 surrogate pair" - "See https://tools.ietf.org/html/rfc7159#section-7" - shifted := codePoint - 16r10000. - leadSurrogate := 16rD800 + (shifted // 16r400). - trailSurrogate := 16rDC00 + (shifted \\ 16r400). - self escapeUnicode4: leadSurrogate. - self escapeUnicode4: trailSurrogate ] - ifFalse: [ self error: 'Character Unicode code point outside encoder range' ] ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/escapeUnicode4..st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/escapeUnicode4..st deleted file mode 100644 index 0bfa39c..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/escapeUnicode4..st +++ /dev/null @@ -1,4 +0,0 @@ -private -escapeUnicode4: codePoint - writeStream nextPutAll: '\u'. - codePoint printOn: writeStream base: 16 nDigits: 4 \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/indentedDo..st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/indentedDo..st deleted file mode 100644 index c1d5260..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/indentedDo..st +++ /dev/null @@ -1,5 +0,0 @@ -private -indentedDo: block - level := level + 1. - block value. - level := level - 1 \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/initialize.st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/initialize.st deleted file mode 100644 index f6b84a0..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/initialize.st +++ /dev/null @@ -1,9 +0,0 @@ -initialize-release -initialize - super initialize. - "For portability reasons use `Character cr asString` rather than `String cr`" - self newLine: Character cr asString. - self prettyPrint: false. - self asciiOnly: false. - self writeNil: false. - level := 0 \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/listElementSeparator.st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/listElementSeparator.st deleted file mode 100644 index 62af1c2..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/listElementSeparator.st +++ /dev/null @@ -1,4 +0,0 @@ -private -listElementSeparator - writeStream nextPut: $,. - self newlineIndent diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/mapElementSeparator.st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/mapElementSeparator.st deleted file mode 100644 index c3c5a99..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/mapElementSeparator.st +++ /dev/null @@ -1,4 +0,0 @@ -private -mapElementSeparator - writeStream nextPut: $,. - self newlineIndent diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/newLine..st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/newLine..st deleted file mode 100644 index 16be4fb..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/newLine..st +++ /dev/null @@ -1,5 +0,0 @@ -initialize-release -newLine: string - "Set the newline string that I should use when pretty printing" - - newLine := string \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/newline.st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/newline.st deleted file mode 100644 index 3e5a509..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/newline.st +++ /dev/null @@ -1,6 +0,0 @@ -accessing -newline - "Write a newline on the stream that I wrap. - What gets written depends on the configuration, see #newLine:" - - writeStream nextPutAll: newLine \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/newlineIndent.st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/newlineIndent.st deleted file mode 100644 index 26798b9..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/newlineIndent.st +++ /dev/null @@ -1,6 +0,0 @@ -private -newlineIndent - prettyPrint - ifTrue: [ - self newline. - level timesRepeat: [ writeStream nextPut: Character tab ] ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/nextPut..st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/nextPut..st deleted file mode 100644 index 3bee296..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/nextPut..st +++ /dev/null @@ -1,5 +0,0 @@ -accessing -nextPut: anObject - "Primary interface. Write a JSON representation of anObject to my stream." - - anObject neoJsonOn: self \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/nextPut.as..st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/nextPut.as..st deleted file mode 100644 index e13f80c..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/nextPut.as..st +++ /dev/null @@ -1,9 +0,0 @@ -accessing -nextPut: anObject as: schema - "Secondary interface to write JSON. - Write objects according to schema." - - | mapping | - (schema isNil or: [ anObject isNil ]) ifTrue: [ ^ self nextPut: anObject ]. - mapping := self mappingFor: schema. - ^ mapping writeObject: anObject on: self \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/on..st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/on..st deleted file mode 100644 index cf995e3..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/on..st +++ /dev/null @@ -1,6 +0,0 @@ -initialize-release -on: aWriteStream - "Initialize on aWriteStream, which should be a character stream that - implements #nextPut:, #nextPutAll:, #space and (optionally) #close." - - writeStream := aWriteStream diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/prettyPrint..st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/prettyPrint..st deleted file mode 100644 index 4f00d06..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/prettyPrint..st +++ /dev/null @@ -1,5 +0,0 @@ -initialize-release -prettyPrint: boolean - "Set whether I should pretty print the JSON that I write" - - prettyPrint := boolean \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/prettyPrintSpace.st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/prettyPrintSpace.st deleted file mode 100644 index 29fc223..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/prettyPrintSpace.st +++ /dev/null @@ -1,4 +0,0 @@ -private -prettyPrintSpace - prettyPrint - ifTrue: [ writeStream nextPut: Character space ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeBoolean..st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeBoolean..st deleted file mode 100644 index 873bfee..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeBoolean..st +++ /dev/null @@ -1,3 +0,0 @@ -writing -writeBoolean: boolean - boolean printOn: writeStream \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeFloat..st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeFloat..st deleted file mode 100644 index 9d47313..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeFloat..st +++ /dev/null @@ -1,3 +0,0 @@ -writing -writeFloat: float - float printOn: writeStream \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeInteger..st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeInteger..st deleted file mode 100644 index 7140a2c..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeInteger..st +++ /dev/null @@ -1,4 +0,0 @@ -writing -writeInteger: integer - integer printOn: writeStream - \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeList..st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeList..st deleted file mode 100644 index b61e5e7..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeList..st +++ /dev/null @@ -1,5 +0,0 @@ -writing -writeList: collection - self writeListStreamingDo: [ :jsonListWriter | - collection do: [ :each | - jsonListWriter writeElement: each ] ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeListStreamingDo..st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeListStreamingDo..st deleted file mode 100644 index b5e2d9c..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeListStreamingDo..st +++ /dev/null @@ -1,5 +0,0 @@ -writing -writeListStreamingDo: block - writeStream nextPut: $[. - self writeStreamingDo: block. - writeStream nextPut: $] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeMap..st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeMap..st deleted file mode 100644 index 316dd54..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeMap..st +++ /dev/null @@ -1,5 +0,0 @@ -writing -writeMap: keyValueCollection - self writeMapStreamingDo: [ :jsonMapWriter | - keyValueCollection keysAndValuesDo: [ :key :value | - jsonMapWriter writeKey: key value: value ] ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeMapStreamingDo..st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeMapStreamingDo..st deleted file mode 100644 index 398c8de..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeMapStreamingDo..st +++ /dev/null @@ -1,5 +0,0 @@ -writing -writeMapStreamingDo: block - writeStream nextPut: ${. - self writeStreamingDo: block. - writeStream nextPut: $} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeNil..st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeNil..st deleted file mode 100644 index c51986c..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeNil..st +++ /dev/null @@ -1,5 +0,0 @@ -initialize-release -writeNil: boolean - "Set whether I will write nil/null properties of objects or skip them." - - writeNil := boolean \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeNil.st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeNil.st deleted file mode 100644 index f6d78d5..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeNil.st +++ /dev/null @@ -1,5 +0,0 @@ -accessing -writeNil - "Return whether I will write nil/null properties of objects or skip them." - - ^ writeNil \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeNull.st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeNull.st deleted file mode 100644 index 3847bad..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeNull.st +++ /dev/null @@ -1,3 +0,0 @@ -writing -writeNull - writeStream nextPutAll: 'null' \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeObject..st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeObject..st deleted file mode 100644 index 50b89ce..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeObject..st +++ /dev/null @@ -1,7 +0,0 @@ -writing -writeObject: anObject - | mapping | - mapping := self mappingFor: anObject class. - mapping - writeObject: anObject - on: self \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeStreamingDo..st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeStreamingDo..st deleted file mode 100644 index 57ef9d9..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeStreamingDo..st +++ /dev/null @@ -1,9 +0,0 @@ -writing -writeStreamingDo: block - | mapWriter | - mapWriter := NeoJSONStreamingWriter on: self. - self indentedDo: [ - block value: mapWriter ]. - mapWriter wasUsed - ifTrue: [ self newlineIndent ] - ifFalse: [ self prettyPrintSpace ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeString..st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeString..st deleted file mode 100644 index e2107ed..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeString..st +++ /dev/null @@ -1,6 +0,0 @@ -writing -writeString: string - writeStream nextPut: $". - 1 to: string size do: [ :index | - self encodeChar: (string at: index) ]. - writeStream nextPut: $" \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/methodProperties.json b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/methodProperties.json deleted file mode 100644 index 5c2ef92..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/methodProperties.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "instance" : { - "close" : "SvenVanCaekenberghe 11/13/2017 18:37", - "writeStreamingDo:" : "SvenVanCaekenberghe 6/6/2012 15:19", - "initialize" : "marianopeck 1/30/2018 12:49", - "newlineIndent" : "SvenVanCaekenberghe 4/17/2014 11:55", - "doesCodePointNeedEscaping:" : "SvenVanCaekenberghe 9/3/2013 11:58", - "writeList:" : "SvenVanCaekenberghe 6/6/2012 15:20", - "mapElementSeparator" : "SvenVanCaekenberghe 6/3/2012 19:32", - "newline" : "SvenVanCaekenberghe 4/17/2014 11:58", - "prettyPrint:" : "SvenVanCaekenberghe 11/13/2017 18:38", - "newLine:" : "SvenVanCaekenberghe 11/13/2017 18:38", - "writeFloat:" : "SvenVanCaekenberghe 6/2/2012 22:19", - "encodeChar:" : "SvenVanCaekenberghe 9/3/2013 11:55", - "writeMap:" : "SvenVanCaekenberghe 6/6/2012 15:04", - "writeNil" : "SvenVanCaekenberghe 11/13/2017 18:35", - "prettyPrintSpace" : "SvenVanCaekenberghe 12/10/2012 16:33", - "escapeUnicode4:" : "SvenVanCaekenberghe 2/24/2016 14:29", - "encodeKey:value:" : "SvenVanCaekenberghe 6/3/2012 19:41", - "writeListStreamingDo:" : "SvenVanCaekenberghe 6/6/2012 15:19", - "escapeUnicode:" : "SvenVanCaekenberghe 11/24/2016 10:06", - "writeNull" : "SvenVanCaekenberghe 6/2/2012 22:15", - "escapeChar:" : "SvenVanCaekenberghe 2/24/2016 14:17", - "asciiOnly:" : "SvenVanCaekenberghe 11/13/2017 18:37", - "listElementSeparator" : "SvenVanCaekenberghe 6/3/2012 19:32", - "writeMapStreamingDo:" : "SvenVanCaekenberghe 6/6/2012 15:19", - "writeNil:" : "SvenVanCaekenberghe 11/13/2017 18:39", - "writeString:" : "MaxLeske 4/30/2017 13:40", - "writeInteger:" : "SvenVanCaekenberghe 6/2/2012 22:18", - "on:" : "SvenVanCaekenberghe 6/14/2012 09:54", - "nextPut:" : "SvenVanCaekenberghe 11/13/2017 18:34", - "indentedDo:" : "SvenVanCaekenberghe 6/3/2012 19:31", - "writeBoolean:" : "SvenVanCaekenberghe 6/2/2012 22:18", - "writeObject:" : "SvenVanCaekenberghe 6/7/2012 15:55", - "encodeKey:value:as:" : "SvenVanCaekenberghe 3/23/2014 21:53", - "nextPut:as:" : "SvenVanCaekenberghe 11/13/2017 18:30" - }, - "class" : { - "toString:" : "SvenVanCaekenberghe 6/9/2012 18:27", - "on:" : "SvenVanCaekenberghe 6/14/2012 09:54", - "toStringPretty:" : "SvenVanCaekenberghe 6/9/2012 18:28" - } -} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/properties.json b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/properties.json deleted file mode 100644 index 8607a8e..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/properties.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "commentStamp" : "", - "super" : "NeoJSONMapper", - "category" : "Neo-JSON-Core", - "classinstvars" : [ ], - "pools" : [ ], - "classvars" : [ ], - "instvars" : [ - "writeStream", - "prettyPrint", - "level", - "newLine", - "asciiOnly", - "writeNil" - ], - "name" : "NeoJSONWriter", - "type" : "normal" -} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/Number.extension/instance/neoJsonOn..st b/repository/Neo-JSON-Core.package/Number.extension/instance/neoJsonOn..st deleted file mode 100644 index 92d21e4..0000000 --- a/repository/Neo-JSON-Core.package/Number.extension/instance/neoJsonOn..st +++ /dev/null @@ -1,3 +0,0 @@ -*neo-json-core -neoJsonOn: neoJSONWriter - neoJSONWriter writeFloat: self asFloat \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/Number.extension/methodProperties.json b/repository/Neo-JSON-Core.package/Number.extension/methodProperties.json deleted file mode 100644 index d597374..0000000 --- a/repository/Neo-JSON-Core.package/Number.extension/methodProperties.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "instance" : { - "neoJsonOn:" : "SvenVanCaekenberghe 6/2/2012 22:17" - }, - "class" : { } -} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/Number.extension/properties.json b/repository/Neo-JSON-Core.package/Number.extension/properties.json deleted file mode 100644 index 71dace8..0000000 --- a/repository/Neo-JSON-Core.package/Number.extension/properties.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "name" : "Number" -} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/Object.extension/instance/neoJsonOn..st b/repository/Neo-JSON-Core.package/Object.extension/instance/neoJsonOn..st deleted file mode 100644 index 7cf491c..0000000 --- a/repository/Neo-JSON-Core.package/Object.extension/instance/neoJsonOn..st +++ /dev/null @@ -1,3 +0,0 @@ -*neo-json-core -neoJsonOn: neoJSONWriter - neoJSONWriter writeObject: self \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/Object.extension/methodProperties.json b/repository/Neo-JSON-Core.package/Object.extension/methodProperties.json deleted file mode 100644 index b08a45e..0000000 --- a/repository/Neo-JSON-Core.package/Object.extension/methodProperties.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "instance" : { - "neoJsonOn:" : "SvenVanCaekenberghe 6/5/2012 22:29" - }, - "class" : { } -} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/Object.extension/properties.json b/repository/Neo-JSON-Core.package/Object.extension/properties.json deleted file mode 100644 index f30a86e..0000000 --- a/repository/Neo-JSON-Core.package/Object.extension/properties.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "name" : "Object" -} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/String.extension/instance/neoJsonOn..st b/repository/Neo-JSON-Core.package/String.extension/instance/neoJsonOn..st deleted file mode 100644 index b41f066..0000000 --- a/repository/Neo-JSON-Core.package/String.extension/instance/neoJsonOn..st +++ /dev/null @@ -1,3 +0,0 @@ -*neo-json-core -neoJsonOn: neoJSONWriter - neoJSONWriter writeString: self \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/String.extension/methodProperties.json b/repository/Neo-JSON-Core.package/String.extension/methodProperties.json deleted file mode 100644 index 2cc7a54..0000000 --- a/repository/Neo-JSON-Core.package/String.extension/methodProperties.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "instance" : { - "neoJsonOn:" : "SvenVanCaekenberghe 6/2/2012 22:26" - }, - "class" : { } -} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/String.extension/properties.json b/repository/Neo-JSON-Core.package/String.extension/properties.json deleted file mode 100644 index b20f2de..0000000 --- a/repository/Neo-JSON-Core.package/String.extension/properties.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "name" : "String" -} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/UndefinedObject.extension/instance/neoJsonOn..st b/repository/Neo-JSON-Core.package/UndefinedObject.extension/instance/neoJsonOn..st deleted file mode 100644 index 3d0cf7b..0000000 --- a/repository/Neo-JSON-Core.package/UndefinedObject.extension/instance/neoJsonOn..st +++ /dev/null @@ -1,3 +0,0 @@ -*neo-json-core -neoJsonOn: neoJSONWriter - neoJSONWriter writeNull \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/UndefinedObject.extension/methodProperties.json b/repository/Neo-JSON-Core.package/UndefinedObject.extension/methodProperties.json deleted file mode 100644 index df8767c..0000000 --- a/repository/Neo-JSON-Core.package/UndefinedObject.extension/methodProperties.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "instance" : { - "neoJsonOn:" : "SvenVanCaekenberghe 6/2/2012 22:15" - }, - "class" : { } -} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/UndefinedObject.extension/properties.json b/repository/Neo-JSON-Core.package/UndefinedObject.extension/properties.json deleted file mode 100644 index b2d2e56..0000000 --- a/repository/Neo-JSON-Core.package/UndefinedObject.extension/properties.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "name" : "UndefinedObject" -} \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/monticello.meta/categories.st b/repository/Neo-JSON-Core.package/monticello.meta/categories.st deleted file mode 100644 index 9cba366..0000000 --- a/repository/Neo-JSON-Core.package/monticello.meta/categories.st +++ /dev/null @@ -1 +0,0 @@ -SystemOrganization addCategory: #'Neo-JSON-Core'! diff --git a/repository/Neo-JSON-Core.package/monticello.meta/initializers.st b/repository/Neo-JSON-Core.package/monticello.meta/initializers.st deleted file mode 100644 index e69de29..0000000 diff --git a/repository/Neo-JSON-Core.package/monticello.meta/package b/repository/Neo-JSON-Core.package/monticello.meta/package deleted file mode 100644 index 657f530..0000000 --- a/repository/Neo-JSON-Core.package/monticello.meta/package +++ /dev/null @@ -1 +0,0 @@ -(name 'Neo-JSON-Core') \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/monticello.meta/version b/repository/Neo-JSON-Core.package/monticello.meta/version deleted file mode 100644 index 6439520..0000000 --- a/repository/Neo-JSON-Core.package/monticello.meta/version +++ /dev/null @@ -1 +0,0 @@ -(name 'Neo-JSON-Core-SvenVanCaekenberghe.57' message 'Always store #propertyName in NeoJSONPropertyMapping as Symbol. Use this invariant in NeoJSONObjectMapping, specifically in #propertyNamed:ifAbsent: #mapProperty:getter:setter: and #mapInstVar:to: to minimize the number of conversions needed. Add NeoJSONMappingTests>>#testSymbolOrStringInstVarMapping to make sure both String and Symbols are allowed as instance variable mapping specification. ' id '8f26cb9d-ef20-0d00-9ccb-0dac050dd8ac' date '6 February 2018' time '5:43:33.847976 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-marianopeck.56' message '* Make a more robuts NeoJSONObject >> printOn: * Last 2 small edits for string vs symbol ' id 'dd16df1d-7520-0d00-bd5b-447e0307cbab' date '31 January 2018' time '11:34:41.660838 am' author 'marianopeck' ancestors ((name 'Neo-JSON-Core-marianopeck.55' message '* Added ''collection'' instVar to NeoJSONMappingNotFound and not use ''signaler''. ' id '9527791e-7320-0d00-be53-6ad8006b589b' date '31 January 2018' time '9:11:41.823112 am' author 'marianopeck' ancestors ((name 'Neo-JSON-Core-marianopeck.54' message 'NeoJSON was assuming that #x = ''x'' is always true, which is correct in Pharo, but not so in GemStone, VAST, VW, etc. So we tried to force a #asString in a few places so that regardless of the impementation we are always safe. This might have a small performance (to be later checked via benchmarks). ' id 'c310cc64-6820-0d00-be52-3323006b589b' date '30 January 2018' time '8:23:57.021603 pm' author 'marianopeck' ancestors ((name 'Neo-JSON-Core-marianopeck.53' message 'For portability reasons use `Character cr asString` rather than `String cr`' id 'e1afc10e-6220-0d00-a479-595d0e1160ba' date '30 January 2018' time '12:50:23.697085 pm' author 'marianopeck' ancestors ((name 'Neo-JSON-Core-marianopeck.52' message 'This commits aims to make NeoJSON more portable to other Smalltalk dialects like VAST. * Moved OrderedCollection and SmallDictionary neoJsonOn: to a new separate package ''Neo-JSON-Pharo-Core''. * Duplicate code from Pharo-specific NotFound to NeoJSONMappingNotFound and make the later subclass from Error (any other Smalltalk have NotFound exception). See NeoJSONMappingNotFound class comment for more details. ' id '6b05827e-6020-0d00-a470-708e0e1160ba' date '30 January 2018' time '10:58:28.638268 am' author 'marianopeck' ancestors ((name 'Neo-JSON-Core-marianopeck.51' message 'This commits aims to make NeoJSON more portable to other Smalltalk dialects like VAST. * Moved OrderedCollection and SmallDictionary neoJsonOn: to a new separate package ''Neo-JSON-Pharo-Core''. * Duplicate code from Pharo-specific NotFound to NeoJSONMappingNotFound and make the later subclass from Error (any other Smalltalk have NotFound exception). See NeoJSONMappingNotFound class comment for more details. ' id '26b6eb6e-6020-0d00-a46f-04550e1160ba' date '30 January 2018' time '10:54:07.129344 am' author 'marianopeck' ancestors ((name 'Neo-JSON-Core-MarianoMartinezPeck.50' message 'MonticelloPreparation' id '9d84b6d8-fa1f-0d00-b8c0-f00b00e5ebf6' date '25 January 2018' time '9:42:15.363973 am' author 'MarianoMartinezPeck' ancestors ((name 'Neo-JSON-Core-MarianoMartinezPeck.49' message 'MonticelloPreparation' id 'c85bb7c6-fa1f-0d00-b8bf-775a00e5ebf6' date '25 January 2018' time '9:37:13.429169 am' author 'MarianoMartinezPeck' ancestors ((name 'Neo-JSON-Core-MarianoMartinezPeck.48' message 'MonticelloPreparation' id '1fd55aa9-fa1f-0d00-b8be-da9100e5ebf6' date '25 January 2018' time '9:29:00.826099 am' author 'MarianoMartinezPeck' ancestors ((name 'Neo-JSON-Core-MarianoMartinezPeck.47' message 'MonticelloPreparation' id '25c20ba3-fa1f-0d00-b8bd-455500e5ebf6' date '25 January 2018' time '9:27:14.98062 am' author 'MarianoMartinezPeck' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.46' message 'Fix the NeoJSONWriter>>#writeNil: true option by adding a short circuit to NeoJSONWriter>>nextPut:as: (as reported by Juraj Kubelka) Add #testRectanglePointsWithNil' id 'f412799a-431a-0d00-850e-5c3c05ce5378' date '13 November 2017' time '6:59:13.995868 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.45' message 'merge' id '8601ddc6-7716-0d00-beb9-5e2a04c5ff7e' date '26 September 2017' time '1:33:10.530717 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.44' message 'Implement some missing code in NeoJSONCustomMapping (the writing part of #listOfElementSchema: #listOfType:andElementSchema: #mapWithValueSchema:) Add NeoJSONStreamingWriter>>#writeElementAs: Add NeoJSONMappingTests>>#testDynamicTyping as an example' id 'f1ebeade-2816-0d00-a04c-ae370e598362' date '22 September 2017' time '3:24:51.679449 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.42' message 'Improve error handling and compliance. Added NeoJSONValidation that uses some external positive/negative specifications Added NeoJSONReader>>#failIfNotAtEnd to optionally force correct end of input parsing and catch extraneous input Improve NeoJSONReader>>#parseCharacter error reporting in case of incomplete escapes Improve NeoJSONReader>>#parseListDo: & #parseMapDo: error reporting NeoJSONReader>>#parseNumberExponent (1) add error for missing exponents (2) add errors for too large & too small exponents versus Float limits' id 'bbc9c32b-080d-0d00-a713-b0590189d909' date '29 May 2017' time '11:37:22.389793 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-MaxLeske.41' message '* changed NeoJSONWriter>>writeString: to use #to:do: instead of #do: to improve performance when writing large strings' id 'e525dc7a-f6f4-4107-94d9-621d7ad184c6' date '30 April 2017' time '1:41:23.628708 pm' author 'MaxLeske' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.40' message 'Add NeoJSONObject>>#atPath: and #atPath:put: Add NeoJSONObjectTests>>#testAtPath and #testAtPathPut' id 'c336587e-740a-0d00-b51a-dacd0088e41c' date '26 April 2017' time '4:35:49.433269 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.39' message 'Fix a bug where initial whitespace when reading a string was consumed (thx Max Leske) Patch NeoJSONReader>>#parseString to simply #peekFor: $"' id 'c6e689c2-c106-0d00-9800-d9b20c8d4a06' date '10 March 2017' time '2:05:59.511 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.38' message 'Change NeoJSONObjects'' #doesNotUnderstand: behavour for setters to return self which makes for easier usage. Extend NeoJSONObjects'' class comment' id '9817797c-3dd7-43a5-a936-7964a1effb90' date '3 February 2017' time '3:33:07.073384 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.37' message 'Bugfix to NeoJSONWriter>>#escapeUnicode: [thank you, Tomohiro Oda] code points between 16rFFF and 16rFFFF where encoded wrongly when #asciiOnly was true Add high code point string to NeoJSONWriteReadTests>>#testStrings and add new NeoJSONWriteReadAsciiOnlyTests subclass' id '788cd6b1-71ed-474c-b387-e005a7137896' date '24 November 2016' time '10:30:16.165149 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.36' message 'Use an OrderedCollection instead of a some Dictionary to store the properties inside a NeoJSONObjectMapping ' id 'aab6c89f-0fbc-4f3c-8aa9-4da1c71f72b2' date '11 July 2016' time '11:03:30.192353 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.35' message 'Add NeoJSONObjectMapping>>#dictionaryForProperties with hack to cover more Pharo versions' id 'a137c050-87c4-4d1c-89c3-d558cfe78ff5' date '11 July 2016' time '10:23:25.017843 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.34' message 'Use an OrderedDictionary instead of a regular Dictionary to store the properties inside a NeoJSONObjectMapping - this allows the user to control the order of properties while writing, if needed Add NeoJSONWriterTests>>#testPreservePropertyOrder' id 'ded70581-c06f-4687-936c-11a029a39ba4' date '2 July 2016' time '12:03:08.919979 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.33' message 'Added NeoJSONReader>>#nextListAs: as suggested by Norbert Hartl Added NeoJSONReaderTests>>#testArrayOfPointsUsingNextListAs' id '34aac279-4fef-4476-9201-95a64efaea6f' date '16 March 2016' time '11:24:47.837176 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.32' message 'Added support for characters not in the Basic Multilingual Plane encoding as a UTF-16 surrogate pair See https://tools.ietf.org/html/rfc7159#section-7' id 'fd9330ff-1b0e-4e0c-b011-defc809a9a9e' date '24 February 2016' time '2:51:06.880365 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.31' message 'New #allowNil option to Object mapping so that null values are accepted and returned as nil when reading a schema using #nextAs: (off by default) Added NeoJSONObjectMapping>>#allowNil Added NeoJSONReaderTests>>#testAllowNil' id 'fb235526-3c04-4e5f-a543-9a7e9eaaac2a' date '30 December 2015' time '12:31:59.303349 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.30' message 'Add OrderedDictionary>>#neoJsonOn: to write it as a map (Thx Paul Wilke)' id '9f42a6bd-1b9f-4ecd-99de-d9283fac6920' date '26 August 2015' time '12:42:05.743206 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.29' message 'Added NeoJSONObject, a convencience subclass of Dictionary that mimics some JavaScript behavior' id '4d5a39e4-c7f3-48ee-9366-36d9e45068ce' date '8 September 2014' time '2:26:09.557335 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.28' message 'Added NeoJSONWriter #writeNil property, defaulting to false; when true, nil instance variables will be written as null by NeoJSONPropertyMapping, else they will be skipped' id 'd6927f86-5b87-4ba2-99c1-cfe5b58ed22f' date '28 May 2014' time '8:52:57.799163 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.27' message 'Added NeoJSONWriter>>#newline to write an end of line on the wrapped stream depending on the #newLine: setting' id '5a262fd6-a42d-4102-b554-26e4f1eade3d' date '17 April 2014' time '12:12:47.207836 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.26' message 'Added new feature NeoJSONWriter>>#nextPutAs: symmetrical to NeoJSONReader>>#next:as: More specifically NeoJSONPropertyMapping>>#writeObjectOn: now respects the valueSchema if it exists using NeoJSONStreamingWriter>>#writeKey:value:as: and NeoJSONWriter>>#encodeKey:value:as: Made both the reader and writer blocks in NeoJSONCustomMapping optional with a fallback to default behavior Refactoring: added NeoJSONMapping abstract superclass above NeoJSONObjectMapping and NeoJSONCustomMapping to better clarify the design' id '41d2075d-bca4-4c08-bdf8-ed0c8da9bcf2' date '24 March 2014' time '12:18:21.026173 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.25' message 'Added basic support for mapping using inheritance when using #neoJonMapping : (see #testObject3) Renamed #new[Custom|Object]MappingFor: to [custom|object]MappingFor: to better reflect the new behavior Thanks Philippe Back for making these suggestions!' id '3051cd7d-a857-4aee-b5ba-d56a4085517b' date '22 March 2014' time '11:03:31.510538 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.24' message 'New feature: NeoJSONWriter>>#asciiOnly: to escape all non ASCII characters in strings' id '9f2d3ef6-abbb-46c1-bce7-95a6bd8b4954' date '3 September 2013' time '12:21:28.781401 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.23' message 'Added NeoJSONCustomMapping>>#mapWithValueSchema:' id '6d0d538b-6fb1-41ac-92ee-05721924c5c4' date '30 August 2013' time '11:09:17.235312 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.22' message 'Fix more double dots in the source code of #printOn: that hampered Gemstone compatibility (thx Sebastian Heidbrink)' id 'd15895fc-5743-4ec8-b99f-76fa5f72baf4' date '4 July 2013' time '7:25:56.931 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.21' message 'Fix a double dot in the source code of NeoJSONCustomWrapper>>#printOn: that hampered Gemstone compatibility (thx Sebastian Heidbrink)' id '3fcb3755-32a9-4c17-ac08-6721bf37a301' date '4 July 2013' time '6:41:52.665 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.20' message 'Added NeoJSONReader>>#atEnd' id 'afd8e136-e594-4bef-ad4b-7d3bc48fc36e' date '6 March 2013' time '3:24:11.242 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.19' message 'added NeoJSONWriter>>#newLine: to customize the end of line convention when pretty printing' id 'bf3e7e59-8300-44a6-889e-1f866c8d2977' date '10 December 2012' time '5:11:36.655 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.18' message 'minor refactoring using #peekFor:' id 'e1330b1e-87f4-4ea3-b81c-5deb03652c0d' date '3 December 2012' time '11:10:22.335 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.17' message 'modified by accident, not really changed' id 'a18f519f-c220-4ea1-a6bb-163e2c70eab7' date '14 June 2012' time '10:01:07.225 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.16' message 'documented the character stream API being used' id '5ba3bcd2-e7a6-4b07-91af-af04c7f98624' date '13 June 2012' time '4:29:08.628 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.15' message 'bugfix in NeoJSONReader>>#match:do: added examples to class comments' id '89ad4ee7-3035-43af-9d5c-cbbef6bcb3f0' date '13 June 2012' time '2:58:00.219 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.14' message 'extended NeoJSONReader with settable listClass and mapClass as well as a propertyNamesAsSymbols option extended class and method comments' id '3f749c2c-b53b-4d56-bb65-bfe964b5a69b' date '13 June 2012' time '11:56:19.567 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.13' message 'made NeoJSONReader>>parseNumberInteger more strict' id '5233f22a-8653-43c2-8651-bf5fa274b3da' date '12 June 2012' time '4:19:27.63 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.12' message 'introduced some custom exceptions' id 'bb6ec6aa-4e5d-4fac-9aa4-629ea6f068b6' date '12 June 2012' time '3:57:32.274 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.11' message 'major simplification: removed NeoJSON[Composite|List|Map]Mapping, all to be handled by blocks in NeoJSONCustomMapping renamed forCustom:do: to for:customDo: accessor based mapping to NeoJSONObjectMapping ' id '82a72131-e968-4ffe-af32-60085b4ecc67' date '12 June 2012' time '1:36:03.263 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.10' message 'optimized NeoJSONWriter>>#encodeChar: to do minimal work' id 'a684bb8c-d2d0-4a4b-8af2-da24c3f5fda4' date '10 June 2012' time '9:27:46.001 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.9' message 'added NeoJSONTestObject1 with class side #neoJsonMapping: method' id '49129177-ee36-4e4b-890e-314e92f23d76' date '9 June 2012' time '6:56:12.413 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.8' message 'added custom mapping' id 'b02af4e3-7a91-471f-81a0-57db8b43a87d' date '8 June 2012' time '10:09:41.079 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.7' message 'adding valueSchema to propertyMapping' id '61c29ad0-e2a6-40af-8360-24952a5e6633' date '8 June 2012' time '8:35:55 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.6' message '1st version where list mapping works on some simple examples' id 'e3250e47-9c16-461e-8d2e-e8031e4cc2be' date '8 June 2012' time '4:40:26 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.5' message 'introduced NeoJSONMapper 1st simplified version of NeoJSONReader>>#nextAs:' id '8a4a2338-c728-4ec5-bae9-8232abd6d7f6' date '7 June 2012' time '3:52:29 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.4' message '1st version with working object mapping for writer' id '0208c7c7-3ab1-4081-9061-9c6ca9d7e7cf' date '6 June 2012' time '8:47:04 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.3' message 'added more tests and a simple benchmark' id '2567c409-eb97-428e-a865-e6d078d23dff' date '4 June 2012' time '6:52:34 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.2' message 'first simple version of NeoJSONWriter' id '7e6474b7-70ed-4cb0-8348-05adddc17853' date '3 June 2012' time '7:57:41 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.1' message 'first simple version of NeoJSONReader' id 'e0039613-c57d-47ae-8838-db64917ca722' date '2 June 2012' time '9:59:42 pm' author 'SvenVanCaekenberghe' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())(name 'Neo-JSON-Core-SvenVanCaekenberghe.43' message 'Added NeoJSONExamplesTests with #testPoints and #testRectanglePoints Changed NeoJSONObjectMapping #mapAccessors: #mapAllInstVars #mapInstVars and #mapInstVars: to return a collection of the generated mappings Thanks Juraj Kubelka ! ' id 'aa59f5b6-0310-0d00-8c5f-00ce0702b82a' date '6 July 2017' time '10:33:57.717792 am' author 'SvenVanCaekenberghe' ancestors ((id 'bbc9c32b-080d-0d00-a713-b0590189d909')) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ()) \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/properties.json b/repository/Neo-JSON-Core.package/properties.json deleted file mode 100644 index 6f31cf5..0000000 --- a/repository/Neo-JSON-Core.package/properties.json +++ /dev/null @@ -1 +0,0 @@ -{ } \ No newline at end of file diff --git a/repository/Neo-JSON-Core/Boolean.extension.st b/repository/Neo-JSON-Core/Boolean.extension.st new file mode 100644 index 0000000..7357183 --- /dev/null +++ b/repository/Neo-JSON-Core/Boolean.extension.st @@ -0,0 +1,6 @@ +Extension { #name : #Boolean } + +{ #category : #'*neo-json-core' } +Boolean >> neoJsonOn: neoJSONWriter [ + neoJSONWriter writeBoolean: self +] diff --git a/repository/Neo-JSON-Core/Collection.extension.st b/repository/Neo-JSON-Core/Collection.extension.st new file mode 100644 index 0000000..c98f1a5 --- /dev/null +++ b/repository/Neo-JSON-Core/Collection.extension.st @@ -0,0 +1,6 @@ +Extension { #name : #Collection } + +{ #category : #'*neo-json-core' } +Collection >> neoJsonOn: neoJSONWriter [ + neoJSONWriter writeList: self +] diff --git a/repository/Neo-JSON-Core/Dictionary.extension.st b/repository/Neo-JSON-Core/Dictionary.extension.st new file mode 100644 index 0000000..85fb99f --- /dev/null +++ b/repository/Neo-JSON-Core/Dictionary.extension.st @@ -0,0 +1,6 @@ +Extension { #name : #Dictionary } + +{ #category : #'*neo-json-core' } +Dictionary >> neoJsonOn: neoJSONWriter [ + neoJSONWriter writeMap: self +] diff --git a/repository/Neo-JSON-Core/Integer.extension.st b/repository/Neo-JSON-Core/Integer.extension.st new file mode 100644 index 0000000..701ccef --- /dev/null +++ b/repository/Neo-JSON-Core/Integer.extension.st @@ -0,0 +1,6 @@ +Extension { #name : #Integer } + +{ #category : #'*neo-json-core' } +Integer >> neoJsonOn: neoJSONWriter [ + neoJSONWriter writeInteger: self +] diff --git a/repository/Neo-JSON-Core/NeoJSONCustomMapping.class.st b/repository/Neo-JSON-Core/NeoJSONCustomMapping.class.st new file mode 100644 index 0000000..6c0f47a --- /dev/null +++ b/repository/Neo-JSON-Core/NeoJSONCustomMapping.class.st @@ -0,0 +1,141 @@ +" +I am NeoJSONCustomMapping. + +I read the next JSON value and turn it into a Smalltalk object using a converter block. +" +Class { + #name : #NeoJSONCustomMapping, + #superclass : #NeoJSONMapping, + #instVars : [ + 'schemaName', + 'reader', + 'writer' + ], + #category : 'Neo-JSON-Core' +} + +{ #category : #mapping } +NeoJSONCustomMapping >> decoder: block [ + "Set a decoder block that accepts the next object representation read + and converts it into the actual object to be returned." + + self reader: [ :jsonReader | | representation | + representation := jsonReader next. + block value: representation ] +] + +{ #category : #mapping } +NeoJSONCustomMapping >> encoder: block [ + "Set a encoder block that accepts the next object to be written + and converts it into the actual representation to be written." + + self writer: [ :jsonWriter :anObject | | representation | + representation := block value: anObject. + jsonWriter nextPut: representation ] +] + +{ #category : #accessing } +NeoJSONCustomMapping >> identifier [ + ^ schemaName +] + +{ #category : #mapping } +NeoJSONCustomMapping >> listOfElementSchema: elementSchema [ + "Set the reader to a block that will create an instance of the + standard listClass while reading a list of elements of type elementSchema" + + self reader: [ :jsonReader | + jsonReader listClass streamContents: [ :stream | + jsonReader parseListDo: [ | element | + element := jsonReader nextAs: elementSchema. + stream nextPut: element ] ] ]. + self writer: [ :jsonWriter :list | + jsonWriter writeListStreamingDo: [ :listWriter | + list do: [ :each | listWriter writeElement: each as: elementSchema ] ] ] + +] + +{ #category : #mapping } +NeoJSONCustomMapping >> listOfType: collectionClass [ + "Set the reader to a block that will create an instance of collectionClass + using #streamContents: while reading a list of elements" + + self reader: [ :jsonReader | + collectionClass streamContents: [ :stream | + jsonReader parseListDo: [ | element | + element := jsonReader next. + stream nextPut: element ] ] ] + "we do not set a writer, #neoJsonOn: should be sufficient, no element type known anyway" + +] + +{ #category : #mapping } +NeoJSONCustomMapping >> listOfType: collectionClass andElementSchema: elementSchema [ + "Set the reader to a block that will create an instance of collectionClass + using #streamContents: while reading a list of elements of type elementSchema" + + self reader: [ :jsonReader | + collectionClass streamContents: [ :stream | + jsonReader parseListDo: [ | element | + element := jsonReader nextAs: elementSchema. + stream nextPut: element ] ] ]. + self writer: [ :jsonWriter :list | + jsonWriter writeListStreamingDo: [ :listWriter | + list do: [ :each | + listWriter writeElement: each as: elementSchema ] ] ] +] + +{ #category : #mapping } +NeoJSONCustomMapping >> mapWithValueSchema: valueSchema [ + "Set the reader to a block that will create an instance of the + standard mapClass while reading values of type valueSchema, + with standard keys" + + self reader: [ :jsonReader | | map | + map := jsonReader mapClass new. + jsonReader parseMapKeysDo: [ :key | | value | + value := jsonReader nextAs: valueSchema. + map at: key put: value ]. + map ]. + self writer: [ :jsonWriter :map | + jsonWriter writeMapStreamingDo: [ :mapWriter | + map keysAndValuesDo: [ :key :value | + mapWriter writeKey: key value: value as: valueSchema ] ] ] +] + +{ #category : #parsing } +NeoJSONCustomMapping >> readFrom: jsonReader [ + ^ reader + ifNil: [ jsonReader next ] + ifNotNil: [ reader value: jsonReader ] +] + +{ #category : #accessing } +NeoJSONCustomMapping >> reader: block [ + "Set the reader to block, a 1 argument block that when given + a jsonReader as argument reads the object that I represent. + When there is no reader block, the default #next will be used." + + reader := block +] + +{ #category : #accessing } +NeoJSONCustomMapping >> schemaName: schema [ + schemaName := schema +] + +{ #category : #writing } +NeoJSONCustomMapping >> writeObject: anObject on: jsonWriter [ + writer + ifNil: [ anObject neoJsonOn: jsonWriter ] + ifNotNil: [ writer value: jsonWriter value: anObject ] +] + +{ #category : #accessing } +NeoJSONCustomMapping >> writer: block [ + "Set the writer to block, a 2 argument block that when given: a jsonWriter + and the object to write will write the object that I represent. + When there is no writer block, the default #neoJsonOn: will be used." + + writer := block +] diff --git a/repository/Neo-JSON-Core/NeoJSONMapper.class.st b/repository/Neo-JSON-Core/NeoJSONMapper.class.st new file mode 100644 index 0000000..ca85a63 --- /dev/null +++ b/repository/Neo-JSON-Core/NeoJSONMapper.class.st @@ -0,0 +1,130 @@ +" +I am NeoJSONMapper. +I hold a mapping from schema identifiers to objects that known how to read or write instances from or to JSON. + +Schema identifiers are either Smalltalk classes or Symbols. + +I offer a builder interface to construct mappings. + +The standard object mapping represents a Smalltalk object as a map, mapping some or all instance variables, or a set of accessors (getter/setter methods). Furthermore, for each value an optional schema can be specified. + +Using a custom mapping, a reader and/or writer block can deal with special cases such as specific collection types with an optional schema for the elements, or a direct mapping of semi primitive types such as Date or DateAndTime. + +A mapping can be specified explicitely on a mapper, or can be resolved using the #neoJsonMapping: class method. + +Here are some examples: + + mapper mapAllInstVarsFor: Point. + mapper for: TestObject do: [ :mapping | + mapping mapInstVars: #(id name). + (mapping mapInstVar: #timestamp to: 'created-at') valueSchema: DateAndTime. + (mapping mapInstVar: #points) valueSchema: #ArrayOfPoints. + (mapping mapInstVar: #bytes) valueSchema: ByteArray ]. + mapper for: DateAndTime customDo: [ :mapping | + mapping decoder: [ :string | DateAndTime fromString: string ]. + mapping encoder: [ :dateAndTime | dateAndTime printString ] ]. + mapper for: #ArrayOfPoints customDo: [ :mapping | + mapping listOfElementSchema: Point ]. + mapper for: ByteArray customDo: [ :mapping | + mapping listOfType: ByteArray ] + +" +Class { + #name : #NeoJSONMapper, + #superclass : #Object, + #instVars : [ + 'mappings' + ], + #category : 'Neo-JSON-Core' +} + +{ #category : #private } +NeoJSONMapper >> customMappingFor: schemaName [ + ^ self mappings + at: schemaName + ifAbsentPut: [ + NeoJSONCustomMapping new + schemaName: schemaName; + yourself ] +] + +{ #category : #mapping } +NeoJSONMapper >> for: schemaName customDo: block [ + "Execute the code in block to further customize the mapping for schemaName. + Create and add a new custom mapping for schemaName if necessary." + + | mapping | + mapping := self customMappingFor: schemaName. + block value: mapping. + ^ mapping +] + +{ #category : #mapping } +NeoJSONMapper >> for: smalltalkClass do: block [ + "Execute the code in block to further customize the mapping for schemaName. + Create and add a new standard object mapping for schemaName if necessary." + + | mapping | + mapping := self objectMappingFor: smalltalkClass. + block value: mapping. + ^ mapping +] + +{ #category : #convencience } +NeoJSONMapper >> mapAllInstVarsFor: smalltalkClass [ + "Map the instance variables of smalltalkClass and all its super classes" + + | mapping | + mapping := self objectMappingFor: smalltalkClass. + mapping mapAllInstVars. + ^ mapping +] + +{ #category : #convencience } +NeoJSONMapper >> mapInstVarsFor: smalltalkClass [ + "Map the instance variables of smalltalkClass" + + | mapping | + mapping := self objectMappingFor: smalltalkClass. + mapping mapInstVars. + ^ mapping +] + +{ #category : #accessing } +NeoJSONMapper >> mappingFor: schema [ + ^ self + mappingFor: schema + ifAbsent: [ NeoJSONMappingNotFound signalFor: schema in: self ] +] + +{ #category : #accessing } +NeoJSONMapper >> mappingFor: schema ifAbsent: block [ + (self mappings includesKey: schema) + ifFalse: [ self resolveMappingFor: schema ]. + ^ self mappings + at: schema + ifAbsent: block +] + +{ #category : #private } +NeoJSONMapper >> mappings [ + ^ mappings + ifNil: [ mappings := Dictionary new ] +] + +{ #category : #private } +NeoJSONMapper >> objectMappingFor: smalltalkClass [ + ^ self mappings + at: smalltalkClass + ifAbsentPut: [ + NeoJSONObjectMapping new + subjectClass: smalltalkClass; + yourself ] +] + +{ #category : #private } +NeoJSONMapper >> resolveMappingFor: class [ + (class respondsTo: #neoJsonMapping:) + ifTrue: [ + class perform: #neoJsonMapping: with: self ] +] diff --git a/repository/Neo-JSON-Core/NeoJSONMapping.class.st b/repository/Neo-JSON-Core/NeoJSONMapping.class.st new file mode 100644 index 0000000..019f11b --- /dev/null +++ b/repository/Neo-JSON-Core/NeoJSONMapping.class.st @@ -0,0 +1,30 @@ +" +I am NeoJSONMapping, an abstract superclass for mapping definitions. + +" +Class { + #name : #NeoJSONMapping, + #superclass : #Object, + #category : 'Neo-JSON-Core' +} + +{ #category : #accessing } +NeoJSONMapping >> identifier [ + self subclassResponsibility +] + +{ #category : #printing } +NeoJSONMapping >> printOn: stream [ + super printOn: stream. + stream nextPut: $(; print: self identifier; nextPut: $) +] + +{ #category : #parsing } +NeoJSONMapping >> readFrom: jsonReader [ + self subclassResponsibility +] + +{ #category : #writing } +NeoJSONMapping >> writeObject: anObject on: jsonWriter [ + self subclassResponsibility +] diff --git a/repository/Neo-JSON-Core/NeoJSONMappingNotFound.class.st b/repository/Neo-JSON-Core/NeoJSONMappingNotFound.class.st new file mode 100644 index 0000000..cf8a6a1 --- /dev/null +++ b/repository/Neo-JSON-Core/NeoJSONMappingNotFound.class.st @@ -0,0 +1,77 @@ +" +I am NeoJSONMappingNotFound. I am signalled when no mapping is found for a schema. + +Portability comment: In Pharo, I could technically subclass from NotFound directly, avoid all my defined methods and only keep #messageText and #standardMessageText. However, NotFound exception does not exist in other dialects. To keep NeoJSON as portable as possible we duplicate some Pharo code into myself. +" +Class { + #name : #NeoJSONMappingNotFound, + #superclass : #Error, + #instVars : [ + 'object', + 'collection' + ], + #category : 'Neo-JSON-Core' +} + +{ #category : #'instance creation' } +NeoJSONMappingNotFound class >> signalFor: anObject [ + "Create and signal an exception for anObject in the default receiver." + + ^ self new + object: anObject; + signal +] + +{ #category : #'instance creation' } +NeoJSONMappingNotFound class >> signalFor: anObject in: aCollection [ + "Create and signal an exception for anObject in aCollection." + + ^ self new + object: anObject; + collection: aCollection; + signal +] + +{ #category : #accessing } +NeoJSONMappingNotFound >> collection [ + "Return the collection where something is not found in" + + ^ collection +] + +{ #category : #accessing } +NeoJSONMappingNotFound >> collection: aCollection [ + "Set the collection where something is not found in" + + collection := aCollection +] + +{ #category : #accessing } +NeoJSONMappingNotFound >> messageText [ + "Overwritten with standard text. To ease portability to other Smalltalk dialects we do not access the instVar 'messageText' as not all dialects have it. Not caching the value on the instVar shouldn't bring any performance hit in this case. " + + ^ self standardMessageText +] + +{ #category : #accessing } +NeoJSONMappingNotFound >> object [ + "Return the object that was not found" + + ^ object +] + +{ #category : #accessing } +NeoJSONMappingNotFound >> object: anObject [ + "Set the object that was not found" + + object := anObject +] + +{ #category : #private } +NeoJSONMappingNotFound >> standardMessageText [ + ^ String streamContents: [ :stream | + stream << 'No mapping found for '. + stream print: self object. + stream << ' in '. + stream print: self collection class ] +] diff --git a/repository/Neo-JSON-Core/NeoJSONObject.class.st b/repository/Neo-JSON-Core/NeoJSONObject.class.st new file mode 100644 index 0000000..0cbac9c --- /dev/null +++ b/repository/Neo-JSON-Core/NeoJSONObject.class.st @@ -0,0 +1,128 @@ +" +I am NeoJSONObject. +I am a Dictionary. + +I behave more like a JavaScript object. I return nil for missing keys. I allow any property to be read or set by using a normal accessor message. + +The following are equivalent: + + self foo. + self at: #foo. + +As are the following + + self foo: 1. + self at: #foo put: 1. + +Except that in the first case, self is returned. + +I can optionally be used by NeoJSONReader as mapClass (see #mapClass:). + +For output, I act just like my superclass (it is thus not necessary to do any conversions). + +Example: + + NeoJSONObject fromString: '{""foo"":1,""bar"":-2}'. + NeoJSONObject new foo: 1; bar: -2. + { #x -> 100. #y -> 200 } as: NeoJSONObject. + (NeoJSONObject new data: (NeoJSONObject new id: #sensor1; value: 37.5)) asString. + +I use JSON as my printed representation. To convert me to JSON, use #printString or #asString. + +Additionally, I support path access for nested instances of me, using #atPath: and #atPath:put: + +The first is special because it returns nil as soon as a key is missing. The second is special because it creates extra levels (instances of me) as needed to follow the path of keys. + + NeoJSONObject new atPath: #(one two three) put: 42; yourself. + NeoJSONObject new atPath: #(one two three) put: 42; atPath: #(one two three). + +" +Class { + #name : #NeoJSONObject, + #superclass : #Dictionary, + #category : 'Neo-JSON-Core' +} + +{ #category : #convenience } +NeoJSONObject class >> fromString: string [ + "Parse string as JSON, so that maps become instances of me" + + ^ (NeoJSONReader on: string readStream) + mapClass: NeoJSONObject; + propertyNamesAsSymbols: true; + next +] + +{ #category : #accessing } +NeoJSONObject >> at: key [ + "I return nil for missing keys. + My superclass would signal a KeyNotFound." + + ^ self at: key ifAbsent: [ nil ] +] + +{ #category : #accessing } +NeoJSONObject >> atPath: keyCollection [ + "Use each key in keyCollection recursively, stop when nil is encountered" + + | value | + value := self. + keyCollection do: [ :each | + value := value at: each. + value ifNil: [ ^ nil ] ]. + ^ value +] + +{ #category : #accessing } +NeoJSONObject >> atPath: keyCollection put: newValue [ + "Use each key in keyCollection recursively, create new levels when needed" + + | target | + keyCollection ifEmpty: [ ^ self ]. + target := self. + keyCollection allButLastDo: [ :each | + (target at: each) + ifNil: [ target := target at: each put: target species new ] + ifNotNil: [ :subValue | target := subValue ] ]. + ^ target at: keyCollection last put: newValue +] + +{ #category : #'reflective operations' } +NeoJSONObject >> doesNotUnderstand: message [ + "Overwritten so that 'self foo' becomes 'self at: #foo' + and 'self foo: 1' becomes 'self at: #foo put: 1' except that self is returned" + + | key | + key := message selector. + key isUnary + ifTrue: [ ^ self at: key ]. + ^ (key isKeyword and: [ key numArgs = 1 ]) + ifTrue: [ self at: key allButLast asSymbol put: message arguments first; yourself ] + ifFalse: [ super doesNotUnderstand: message ] +] + +{ #category : #accessing } +NeoJSONObject >> name [ + "Overwritten to make this accessor available as key" + + ^ self at: #name +] + +{ #category : #printing } +NeoJSONObject >> printOn: stream [ + "I use my JSON representation when printing myself" + + [ (NeoJSONWriter on: stream) nextPut: self ] + on: Error + do: [ :exception | + stream + nextPutAll: ' Error printing JSON: '; + nextPutAll: exception printString ] +] + +{ #category : #evaluating } +NeoJSONObject >> value [ + "Overwritten to make this accessor available as key" + + ^ self at: #value +] diff --git a/repository/Neo-JSON-Core/NeoJSONObjectMapping.class.st b/repository/Neo-JSON-Core/NeoJSONObjectMapping.class.st new file mode 100644 index 0000000..4217682 --- /dev/null +++ b/repository/Neo-JSON-Core/NeoJSONObjectMapping.class.st @@ -0,0 +1,154 @@ +" +I am NeoJSONObjectMapping. +I describe how instances of a Smalltalk class are mapped to a JSON map. + +I do this using set of NeoJSONPropertyMappings. + +I know the Smalltalk class that I am a mapping for. This class is the schema identifier and is used to instanciate new objects. + +A mapping can be based on any combination of instance variables or accessors (getter/setter pairs). + +I offer a builder interface to constuct property mappings. +" +Class { + #name : #NeoJSONObjectMapping, + #superclass : #NeoJSONMapping, + #instVars : [ + 'subjectClass', + 'properties', + 'allowNil' + ], + #category : 'Neo-JSON-Core' +} + +{ #category : #'initialize-release' } +NeoJSONObjectMapping >> allowNil [ + "Set that I will allow nil/null values when I read/expect an object" + + allowNil := true +] + +{ #category : #accessing } +NeoJSONObjectMapping >> identifier [ + ^ subjectClass +] + +{ #category : #'initialize-release' } +NeoJSONObjectMapping >> initialize [ + super initialize. + properties := OrderedCollection new. + allowNil := false +] + +{ #category : #mapping } +NeoJSONObjectMapping >> mapAccessor: accessor [ + ^ self mapAccessor: accessor to: accessor +] + +{ #category : #mapping } +NeoJSONObjectMapping >> mapAccessor: accessor mutator: mutator to: propertyName [ + ^ self + mapProperty: propertyName + getter: [ :object | object perform: accessor ] + setter: [ :object :value | object perform: mutator with: value ] +] + +{ #category : #mapping } +NeoJSONObjectMapping >> mapAccessor: accessor to: propertyName [ + ^ self + mapProperty: propertyName + getter: [ :object | object perform: accessor ] + setter: [ :object :value | object perform: accessor asMutator with: value ] +] + +{ #category : #mapping } +NeoJSONObjectMapping >> mapAccessors: accessors [ + ^ accessors collect: [ :each | self mapAccessor: each ] +] + +{ #category : #convenience } +NeoJSONObjectMapping >> mapAllInstVars [ + ^ self mapInstVars: subjectClass allInstVarNames +] + +{ #category : #mapping } +NeoJSONObjectMapping >> mapInstVar: instVarName [ + ^ self mapInstVar: instVarName to: instVarName +] + +{ #category : #mapping } +NeoJSONObjectMapping >> mapInstVar: instVarName to: propertyName [ + | index | + index := + "For portability reasons, do not use instVarIndexFor:ifAbsent: + (it doesn't exist in all Smalltalk dialects) but the below approach. + Also, convert to symbols for portability reasons" + (subjectClass allInstVarNames collect: [ :each | each asSymbol ]) + indexOf: instVarName asSymbol + ifAbsent: [ self error: 'Inst var not found: ', instVarName printString ]. + ^ self + mapProperty: propertyName asString + getter: [ :object | object instVarAt: index ] + setter: [ :object :value | object instVarAt: index put: value ] + + +] + +{ #category : #convenience } +NeoJSONObjectMapping >> mapInstVars [ + ^ self mapInstVars: subjectClass instVarNames +] + +{ #category : #mapping } +NeoJSONObjectMapping >> mapInstVars: instVarNames [ + ^ instVarNames collect: [ :each | self mapInstVar: each ] +] + +{ #category : #mapping } +NeoJSONObjectMapping >> mapProperty: propertyName getter: readBlock setter: writeBlock [ + | propertyMapping | + propertyMapping := NeoJSONPropertyMapping new. + propertyMapping + propertyName: propertyName; + getter: readBlock; + setter: writeBlock. + properties removeAllSuchThat: [ :each | each propertyName = propertyMapping propertyName ]. + properties addLast: propertyMapping. + ^ propertyMapping +] + +{ #category : #accessing } +NeoJSONObjectMapping >> propertyNamed: propertyName ifAbsent: block [ + | symbolPropertyName | + symbolPropertyName := propertyName asSymbol. + ^ properties detect: [ :each | each propertyName = symbolPropertyName ] ifNone: block +] + +{ #category : #parsing } +NeoJSONObjectMapping >> readFrom: jsonReader [ + | anObject | + anObject := subjectClass new. + allowNil ifTrue: [ + jsonReader parseConstantDo: [ :value | + ^ value ifNotNil: [ jsonReader error: 'Unexpected boolean constant' ] ] ]. + jsonReader parseMapKeysDo: [ :key | + (self propertyNamed: key ifAbsent: [ nil ]) + ifNil: [ + "read, skip & ignore value" + jsonReader next ] + ifNotNil: [ :mapping | + mapping readObject: anObject from: jsonReader ] ]. + ^ anObject +] + +{ #category : #accessing } +NeoJSONObjectMapping >> subjectClass: smalltalkClass [ + subjectClass := smalltalkClass +] + +{ #category : #writing } +NeoJSONObjectMapping >> writeObject: anObject on: jsonWriter [ + jsonWriter writeMapStreamingDo: [ :jsonMapWriter | + properties do: [ :each | + each writeObject: anObject on: jsonMapWriter ] ] +] diff --git a/repository/Neo-JSON-Core/NeoJSONParseError.class.st b/repository/Neo-JSON-Core/NeoJSONParseError.class.st new file mode 100644 index 0000000..7ac00ab --- /dev/null +++ b/repository/Neo-JSON-Core/NeoJSONParseError.class.st @@ -0,0 +1,11 @@ +" +I am NeoJSONParseError. +I am an Error. + +I am signalled when JSON input is not valid while parsing. +" +Class { + #name : #NeoJSONParseError, + #superclass : #Error, + #category : 'Neo-JSON-Core' +} diff --git a/repository/Neo-JSON-Core/NeoJSONPropertyMapping.class.st b/repository/Neo-JSON-Core/NeoJSONPropertyMapping.class.st new file mode 100644 index 0000000..67a9951 --- /dev/null +++ b/repository/Neo-JSON-Core/NeoJSONPropertyMapping.class.st @@ -0,0 +1,66 @@ +" +I am NeoJSONPropertyMapping. +I describe how a property of a Smalltalk class maps to a JSON property. + +A property is either an instance variable or getter/setter pair. +I hold a getter and setter block to do the actual work. The property name is used in JSON. + +Optionally, the schema for the value of my property can be specified. This is then used recursively. +" +Class { + #name : #NeoJSONPropertyMapping, + #superclass : #Object, + #instVars : [ + 'propertyName', + 'valueSchema', + 'getter', + 'setter' + ], + #category : 'Neo-JSON-Core' +} + +{ #category : #accessing } +NeoJSONPropertyMapping >> getter: block [ + getter := block +] + +{ #category : #printing } +NeoJSONPropertyMapping >> printOn: stream [ + super printOn: stream. + stream nextPut: $(; print: propertyName; nextPut: $) +] + +{ #category : #accessing } +NeoJSONPropertyMapping >> propertyName [ + ^ propertyName +] + +{ #category : #accessing } +NeoJSONPropertyMapping >> propertyName: symbolOrString [ + propertyName := symbolOrString asSymbol +] + +{ #category : #parsing } +NeoJSONPropertyMapping >> readObject: anObject from: jsonReader [ + | value | + value := jsonReader nextAs: valueSchema. + setter value: anObject value: value +] + +{ #category : #accessing } +NeoJSONPropertyMapping >> setter: block [ + setter := block +] + +{ #category : #accessing } +NeoJSONPropertyMapping >> valueSchema: schemaName [ + valueSchema := schemaName +] + +{ #category : #writing } +NeoJSONPropertyMapping >> writeObject: anObject on: jsonMapWriter [ + | value | + value := getter value: anObject. + (value notNil or: [ jsonMapWriter writeNil ]) + ifTrue: [ jsonMapWriter writeKey: propertyName value: value as: valueSchema ] +] diff --git a/repository/Neo-JSON-Core/NeoJSONReader.class.st b/repository/Neo-JSON-Core/NeoJSONReader.class.st new file mode 100644 index 0000000..1019299 --- /dev/null +++ b/repository/Neo-JSON-Core/NeoJSONReader.class.st @@ -0,0 +1,481 @@ +" +I am NeoJSONReader. +I am a NeoJSONMapper. +I parse a JSON representation from a textual stream into Smalltalk objects. + +Primitive types are automatically mapped to their Smalltalk counterpart: Numbers, Strings, Booleans and UndefinedObject. +When parsing using #next, lists normally become Arrays and maps become Dictionaries. +An alternative listClass or mapClass can be specified. + +When parsing using #nextAs: a schema can be specified. This schema defines a mapping to be used. + +Here are some examples: + + NeoJSONReader fromString: ' [ 1,2,3 ] '. + NeoJSONReader fromString: ' [ 3.14159, true, false, null, ""string"" ] '. + NeoJSONReader fromString: ' { ""x"" : 1, ""y"" : 2 } '. + + (NeoJSONReader on: ' { ""x"" : 1, ""y"" : 2 } ' readStream) + mapInstVarsFor: Point; + nextAs: Point. + + (NeoJSONReader on: '[ { ""x"" : 1, ""y"" : 2 }, { ""x"" : 3, ""y"" : 4 } ]' readStream) + mapInstVarsFor: Point; + for: #ArrayOfPoints customDo: [ :mapping | + mapping listOfElementSchema: Point ]; + nextAs: #ArrayOfPoints. + + (NeoJSONReader on: '[ { ""x"" : 1, ""y"" : 2 }, { ""x"" : 3, ""y"" : 4 } ]' readStream) + mapInstVarsFor: Point; + nextListAs: Point. +" +Class { + #name : #NeoJSONReader, + #superclass : #NeoJSONMapper, + #instVars : [ + 'readStream', + 'stringStream', + 'listClass', + 'mapClass', + 'propertyNamesAsSymbols' + ], + #category : 'Neo-JSON-Core' +} + +{ #category : #convenience } +NeoJSONReader class >> fromString: string [ + ^ (self on: string readStream) next +] + +{ #category : #convenience } +NeoJSONReader class >> fromString: string as: schema [ + ^ (self on: string readStream) nextAs: schema +] + +{ #category : #'instance creation' } +NeoJSONReader class >> on: readStream [ + "Initialize on readStream, which should be a character stream that + implements #next, #peek, #atEnd and (optionally) #close." + + ^ self new + on: readStream; + yourself +] + +{ #category : #testing } +NeoJSONReader >> atEnd [ + ^ readStream atEnd +] + +{ #category : #'initialize-release' } +NeoJSONReader >> close [ + readStream ifNotNil: [ + readStream close. + readStream := nil ] +] + +{ #category : #private } +NeoJSONReader >> consumeWhitespace [ + "Strip whitespaces from the input stream." + + [ readStream atEnd not and: [ readStream peek isSeparator ] ] + whileTrue: [ + readStream next ] +] + +{ #category : #private } +NeoJSONReader >> error: text [ + NeoJSONParseError signal: text +] + +{ #category : #private } +NeoJSONReader >> expectChar: character [ + "Expect character and consume input and optional whitespace at the end, + throw an error otherwise." + + (self matchChar: character) + ifFalse: [ self error: character asString, ' expected' ] +] + +{ #category : #parsing } +NeoJSONReader >> failIfNotAtEnd [ + self atEnd + ifFalse: [ self error: 'extraneous input detected' ] +] + +{ #category : #'initialize-release' } +NeoJSONReader >> initialize [ + super initialize. + propertyNamesAsSymbols := false +] + +{ #category : #accessing } +NeoJSONReader >> listClass [ + "Return the collection type to use for JSON lists" + + ^ listClass ifNil: [ Array ] +] + +{ #category : #'initialize-release' } +NeoJSONReader >> listClass: collectionClass [ + listClass := collectionClass +] + +{ #category : #accessing } +NeoJSONReader >> mapClass [ + "Return the collection type to use for JSON maps" + + ^ mapClass ifNil: [ Dictionary ] +] + +{ #category : #'initialize-release' } +NeoJSONReader >> mapClass: collectionClass [ + mapClass := collectionClass +] + +{ #category : #private } +NeoJSONReader >> match: string do: block [ + "Try to read and consume string and execute block if successful. + Else do nothing (but do not back up)" + + (string allSatisfy: [ :each | readStream peekFor: each ]) + ifTrue: [ + self consumeWhitespace. + block value ] +] + +{ #category : #private } +NeoJSONReader >> matchChar: character [ + "Tries to match character, consume input and + answer true if successful and consumes whitespace at the end. + When character does not match, return false and leave stream untouched." + + ^ (readStream peekFor: character) + ifTrue: [ + self consumeWhitespace. + true ] + ifFalse: [ false ] +] + +{ #category : #accessing } +NeoJSONReader >> next [ + "Primary interface to parse a JSON value. + Return either primitives, a listClass or a mapClass instance." + + ^ self + consumeWhitespace; + parseValue +] + +{ #category : #accessing } +NeoJSONReader >> nextAs: schema [ + "Secondary interface to parse JSON. + Return an object according to schema. + If schema is nil, act like #next" + + | mapping | + schema ifNil: [ ^ self next ]. + self consumeWhitespace. + mapping := self mappingFor: schema. + ^ mapping readFrom: self +] + +{ #category : #accessing } +NeoJSONReader >> nextListAs: schema [ + "Secondary interface to parse JSON. + Return a list of objects, each element according to schema." + + ^ self listClass streamContents: [ :stream | + self parseListDo: [ + stream nextPut: (self nextAs: schema) ] ] +] + +{ #category : #'initialize-release' } +NeoJSONReader >> on: aReadStream [ + "Initialize on aReadStream, which should be a character stream that + implements #next, #peek, #atEnd and (optionally) #close." + + readStream := aReadStream +] + +{ #category : #parsing } +NeoJSONReader >> parseCharacter [ + | char | + (char := readStream next) = $\ + ifFalse: [ ^ char ]. + ('/"\' includes: (char := readStream next)) + ifTrue: [ ^ char ]. + ('bfnrt' includes: char) + ifTrue: [ ^ self unescapeChar: char ]. + char = $u + ifTrue: [ ^ self parseCharacterHex ]. + char + ifNil: [ self error: 'invalid escape, end of file' ] + ifNotNil: [ self error: 'invalid escape character \' , char asString ] +] + +{ #category : #private } +NeoJSONReader >> parseCharacterHex [ + | value codePoint | + value := self parseCharacterHex4Value. + (value < 16rD800 or: [ value > 16rDBFF ]) + ifTrue: [ codePoint := value ] + ifFalse: [ | leadSurrogate trailSurrogate | + "Characters not in the Basic Multilingual Plane are encoded as a UTF-16 surrogate pair" + "See https://tools.ietf.org/html/rfc7159#section-7" + leadSurrogate := value. + trailSurrogate := self parseTrailingSurrogateHexEscape. + codePoint := (leadSurrogate - 16rD800) * 16r400 + (trailSurrogate - 16rDC00). + codePoint := 16r10000 + codePoint ]. + ^ Character codePoint: codePoint +] + +{ #category : #private } +NeoJSONReader >> parseCharacterHex4Value [ + | value | + value := self parseCharacterHexDigit. + 3 timesRepeat: [ + value := (value << 4) + self parseCharacterHexDigit ]. + ^ value +] + +{ #category : #private } +NeoJSONReader >> parseCharacterHexDigit [ + | digit | + readStream atEnd + ifFalse: [ + digit := readStream next asInteger. + (digit between: "$0" 48 and: "$9" 57) + ifTrue: [ ^ digit - 48 ]. + (digit between: "$A" 65 and: "$F" 70) + ifTrue: [ ^ digit - 55 ]. + (digit between: "$a" 97 and: "$f" 102) + ifTrue: [ ^ digit - 87 ] ]. + self error: 'hex-digit expected' +] + +{ #category : #private } +NeoJSONReader >> parseConstantDo: block [ + "Parse and consume either true|false|nil|null and execute block + or else do nothing (but do not back up). + Hand written implementation to avoid the use of #position:" + + (readStream peek = $t) + ifTrue: [ + ^ self match: 'true' do: [ block value: true ] ]. + (readStream peek = $f) + ifTrue: [ + ^ self match: 'false' do: [ block value: false ] ]. + (readStream peek = $n) + ifTrue: [ + ^ self match: 'null' do: [ block value: nil ] ] + +] + +{ #category : #parsing } +NeoJSONReader >> parseList [ + ^ self listClass + streamContents: [ :stream | + self parseListElementsDo: [ :each | + stream nextPut: each ] ] + + +] + +{ #category : #parsing } +NeoJSONReader >> parseListDo: block [ + self expectChar: $[. + (self matchChar: $]) + ifTrue: [ ^ self ]. + [ readStream atEnd ] + whileFalse: [ + block value. + (self matchChar: $]) + ifTrue: [ ^ self ]. + (self matchChar: $,) + ifFalse: [ self error: ', or ] expected' ] ]. + self error: 'incomplete list' +] + +{ #category : #parsing } +NeoJSONReader >> parseListElementsDo: block [ + self parseListDo: [ + block value: self parseValue ] +] + +{ #category : #parsing } +NeoJSONReader >> parseMap [ + | map | + map := self mapClass new. + self parseMapKeysAndValuesDo: [ :key :value | + map at: key put: value ]. + ^ map +] + +{ #category : #parsing } +NeoJSONReader >> parseMapDo: block [ + self expectChar: ${. + (self matchChar: $}) + ifTrue: [ ^ self ]. + [ readStream atEnd ] whileFalse: [ + block value. + (self matchChar: $}) + ifTrue: [ ^ self ]. + (self matchChar: $,) + ifFalse: [ self error: ', or } expected' ] ]. + self error: 'incomplete map' +] + +{ #category : #parsing } +NeoJSONReader >> parseMapKeysAndValuesDo: block [ + self parseMapKeysDo: [ :key | + block value: key value: self parseValue ] +] + +{ #category : #parsing } +NeoJSONReader >> parseMapKeysDo: block [ + self parseMapDo: [ | key | + key := self parsePropertyName. + self expectChar: $:. + block value: key ] +] + +{ #category : #parsing } +NeoJSONReader >> parseNumber [ + | negated number | + negated := readStream peekFor: $-. + number := self parseNumberInteger. + (readStream peekFor: $.) + ifTrue: [ number := number + self parseNumberFraction ]. + ((readStream peekFor: $e) or: [ readStream peekFor: $E ]) + ifTrue: [ number := number * self parseNumberExponent ]. + negated + ifTrue: [ number := number negated ]. + self consumeWhitespace. + ^ number +] + +{ #category : #parsing } +NeoJSONReader >> parseNumberExponent [ + | number negated | + number := 0. + (negated := readStream peekFor: $-) + ifFalse: [ readStream peekFor: $+ ]. + (readStream atEnd or: [ readStream peek isDigit not ]) + ifTrue: [ self error: 'number exponent expected' ]. + [ readStream atEnd not and: [ readStream peek isDigit ] ] + whileTrue: [ number := 10 * number + readStream next digitValue ]. + negated + ifTrue: [ number := number negated ]. + number positive + ifTrue: [ number > Float emax ifTrue: [ self error: 'number exponent too large' ] ] + ifFalse: [ number < Float emin ifTrue: [ self error: 'number exponent too small' ] ]. + ^ 10 raisedTo: number +] + +{ #category : #parsing } +NeoJSONReader >> parseNumberFraction [ + | number power | + number := 0. + power := 1.0. + [ readStream atEnd not and: [ readStream peek isDigit ] ] + whileTrue: [ + number := 10 * number + readStream next digitValue. + power := power * 10.0 ]. + ^ number / power +] + +{ #category : #parsing } +NeoJSONReader >> parseNumberInteger [ + | number | + number := nil. + [ readStream atEnd not and: [ readStream peek isDigit ] ] + whileTrue: [ + number := 10 * (number ifNil: [ 0 ]) + readStream next digitValue ]. + number ifNil: [ self error: 'Integer digit expected' ]. + ^ number +] + +{ #category : #parsing } +NeoJSONReader >> parsePropertyName [ + | name | + name := self parseValue. + ^ name isString + ifTrue: [ + propertyNamesAsSymbols + ifTrue: [ name asSymbol ] + ifFalse: [ name ] ] + ifFalse: [ + self error: 'property name must be a string, not ', name asString ] +] + +{ #category : #parsing } +NeoJSONReader >> parseString [ + | result | + (readStream peekFor: $") + ifFalse: [ self error: '" expected' ]. + result := self stringStreamContents: [ :stream | + [ readStream atEnd or: [ readStream peek = $" ] ] + whileFalse: [ stream nextPut: self parseCharacter ] ]. + self expectChar: $". + ^ result +] + +{ #category : #private } +NeoJSONReader >> parseTrailingSurrogateHexEscape [ + (readStream next = $\ and: [ readStream next = $u ]) + ifTrue: [ ^ self parseCharacterHex4Value ] + ifFalse: [ self error: 'trailing surrogate hex escape expected' ] +] + +{ #category : #parsing } +NeoJSONReader >> parseValue [ + | char | + readStream atEnd ifFalse: [ + char := readStream peek. + char = ${ + ifTrue: [ ^ self parseMap ]. + char = $[ + ifTrue: [ ^ self parseList ]. + char = $" + ifTrue: [ ^ self parseString ]. + (char = $- or: [ char isDigit ]) + ifTrue: [ ^ self parseNumber ]. + self parseConstantDo: [ :value | ^ value ] ]. + self error: 'invalid input: ', char asString +] + +{ #category : #'initialize-release' } +NeoJSONReader >> propertyNamesAsSymbols: boolean [ + propertyNamesAsSymbols := boolean +] + +{ #category : #private } +NeoJSONReader >> stringStreamContents: block [ + "Like String streamContents: block + but reusing the underlying buffer for improved efficiency" + + stringStream + ifNil: [ + stringStream := (String new: 32) writeStream ]. + stringStream reset. + block value: stringStream. + ^ stringStream contents +] + +{ #category : #private } +NeoJSONReader >> unescapeChar: char [ + "Handle one of the named character escapes, b, f, n, r or t. Else fail." + + char = $b + ifTrue: [ ^ Character backspace ]. + char = $f + ifTrue: [ ^ Character newPage ]. + char = $n + ifTrue: [ ^ Character lf ]. + char = $r + ifTrue: [ ^ Character cr ]. + char = $t + ifTrue: [ ^ Character tab ]. + self error: 'Unknown escape char: ', (String with: char) +] diff --git a/repository/Neo-JSON-Core/NeoJSONStreamingWriter.class.st b/repository/Neo-JSON-Core/NeoJSONStreamingWriter.class.st new file mode 100644 index 0000000..f2c885e --- /dev/null +++ b/repository/Neo-JSON-Core/NeoJSONStreamingWriter.class.st @@ -0,0 +1,87 @@ +" +I am NeoJSONStreamingWriter. +I help in writing streamed maps and lists. + +This is an internal class used by NeoJSONWriter to deal with interleaving elements and separators as well as pretty printing. +" +Class { + #name : #NeoJSONStreamingWriter, + #superclass : #Object, + #instVars : [ + 'jsonWriter', + 'first' + ], + #category : 'Neo-JSON-Core' +} + +{ #category : #'instance creation' } +NeoJSONStreamingWriter class >> on: jsonWriter [ + ^ self new + on: jsonWriter; + yourself +] + +{ #category : #'initialize-release' } +NeoJSONStreamingWriter >> initialize [ + super initialize. + first := true +] + +{ #category : #'initialize-release' } +NeoJSONStreamingWriter >> on: aJSONWriter [ + jsonWriter := aJSONWriter +] + +{ #category : #testing } +NeoJSONStreamingWriter >> wasUsed [ + ^ first not +] + +{ #category : #writing } +NeoJSONStreamingWriter >> writeElement: value [ + first + ifTrue: [ + jsonWriter newlineIndent. + first := false ] + ifFalse: [ + jsonWriter listElementSeparator ]. + jsonWriter nextPut: value +] + +{ #category : #writing } +NeoJSONStreamingWriter >> writeElement: value as: valueSchema [ + first + ifTrue: [ + jsonWriter newlineIndent. + first := false ] + ifFalse: [ + jsonWriter listElementSeparator ]. + jsonWriter nextPut: value as: valueSchema +] + +{ #category : #writing } +NeoJSONStreamingWriter >> writeKey: key value: value [ + first + ifTrue: [ + jsonWriter newlineIndent. + first := false ] + ifFalse: [ + jsonWriter mapElementSeparator ]. + jsonWriter encodeKey: key value: value +] + +{ #category : #writing } +NeoJSONStreamingWriter >> writeKey: key value: value as: valueSchema [ + first + ifTrue: [ + jsonWriter newlineIndent. + first := false ] + ifFalse: [ + jsonWriter mapElementSeparator ]. + jsonWriter encodeKey: key value: value as: valueSchema +] + +{ #category : #accessing } +NeoJSONStreamingWriter >> writeNil [ + ^ jsonWriter writeNil +] diff --git a/repository/Neo-JSON-Core/NeoJSONWriter.class.st b/repository/Neo-JSON-Core/NeoJSONWriter.class.st new file mode 100644 index 0000000..4616e64 --- /dev/null +++ b/repository/Neo-JSON-Core/NeoJSONWriter.class.st @@ -0,0 +1,341 @@ +" +I am NeoJSONWriter. +I am a NeoJSONMapper. +I write a JSON representation of Smalltalk objects to a textual stream. + +Objects implementing #neoJsonOn: can be encoded. +A number of primitive types, like Strings, Numbers, Booleans and UndefinedObject are treated specially. +Collection are encoded as lists, except for Dictionaries that are encoded as maps. + +All other objects need a mapping to help in doing the encoding. + +Here are some examples: + + NeoJSONWriter toString: #(1 2 3). + NeoJSONWriter toString: { Float pi. true. false. 'string' }. + NeoJSONWriter toStringPretty: (Dictionary new at: #x put: 1; at: #y put: 2; yourself). + + String streamContents: [ :stream | + (NeoJSONWriter on: stream) + prettyPrint: true; + mapInstVarsFor: Point; + nextPut: (Array with: 1@3 with: -1@3) ]. + +" +Class { + #name : #NeoJSONWriter, + #superclass : #NeoJSONMapper, + #instVars : [ + 'writeStream', + 'prettyPrint', + 'level', + 'newLine', + 'asciiOnly', + 'writeNil' + ], + #category : 'Neo-JSON-Core' +} + +{ #category : #'instance creation' } +NeoJSONWriter class >> on: writeStream [ + "Initialize on writeStream, which should be a character stream that + implements #nextPut:, #nextPutAll:, #space and (optionally) #close." + + ^ self new + on: writeStream; + yourself +] + +{ #category : #convenience } +NeoJSONWriter class >> toString: object [ + ^ String streamContents: [ :stream | + (self on: stream) nextPut: object ] +] + +{ #category : #convenience } +NeoJSONWriter class >> toStringPretty: object [ + ^ String streamContents: [ :stream | + (self on: stream) + prettyPrint: true; + nextPut: object ] +] + +{ #category : #'initialize-release' } +NeoJSONWriter >> asciiOnly: boolean [ + "Set whether I should escape all non ASCII characters or not" + + asciiOnly := boolean +] + +{ #category : #'initialize-release' } +NeoJSONWriter >> close [ + "Close the stream that I write to" + + writeStream ifNotNil: [ + writeStream close. + writeStream := nil ] +] + +{ #category : #private } +NeoJSONWriter >> doesCodePointNeedEscaping: code [ + code < 32 ifTrue: [ ^ true ]. + ( code = 34 or: [ code = 92 ]) ifTrue: [ ^ true ]. + ^ asciiOnly and: [ code > 126 ] +] + +{ #category : #private } +NeoJSONWriter >> encodeChar: char [ + | code | + code := char codePoint. + (self doesCodePointNeedEscaping: code) + ifTrue: [ self escapeChar: code ] + ifFalse: [ writeStream nextPut: char ] +] + +{ #category : #private } +NeoJSONWriter >> encodeKey: key value: value [ + self nextPut: key. + self prettyPrintSpace. + writeStream nextPut: $:. + self prettyPrintSpace. + self nextPut: value +] + +{ #category : #private } +NeoJSONWriter >> encodeKey: key value: value as: valueSchema [ + self nextPut: key. + self prettyPrintSpace. + writeStream nextPut: $:. + self prettyPrintSpace. + self nextPut: value as: valueSchema +] + +{ #category : #private } +NeoJSONWriter >> escapeChar: code [ + code = 34 + ifTrue: [ ^ writeStream nextPutAll: '\"' ]. + code = 92 + ifTrue: [ ^ writeStream nextPutAll: '\\' ]. + code = 47 + ifTrue: [ ^ writeStream nextPutAll: '\/' ]. + code = 8 + ifTrue: [ ^ writeStream nextPutAll: '\b' ]. + code = 12 + ifTrue: [ ^ writeStream nextPutAll: '\f' ]. + code = 10 + ifTrue: [ ^ writeStream nextPutAll: '\n' ]. + code = 13 + ifTrue: [ ^ writeStream nextPutAll: '\r' ]. + code = 9 + ifTrue: [ ^ writeStream nextPutAll: '\t' ]. + self escapeUnicode: code +] + +{ #category : #private } +NeoJSONWriter >> escapeUnicode4: codePoint [ + writeStream nextPutAll: '\u'. + codePoint printOn: writeStream base: 16 nDigits: 4 +] + +{ #category : #private } +NeoJSONWriter >> escapeUnicode: codePoint [ + codePoint <= 16rFFFF + ifTrue: [ self escapeUnicode4: codePoint ] + ifFalse: [ + codePoint <= 16r10FFFF + ifTrue: [ | leadSurrogate trailSurrogate shifted | + "Characters not in the Basic Multilingual Plane are encoded as a UTF-16 surrogate pair" + "See https://tools.ietf.org/html/rfc7159#section-7" + shifted := codePoint - 16r10000. + leadSurrogate := 16rD800 + (shifted // 16r400). + trailSurrogate := 16rDC00 + (shifted \\ 16r400). + self escapeUnicode4: leadSurrogate. + self escapeUnicode4: trailSurrogate ] + ifFalse: [ self error: 'Character Unicode code point outside encoder range' ] ] +] + +{ #category : #private } +NeoJSONWriter >> indentedDo: block [ + level := level + 1. + block value. + level := level - 1 +] + +{ #category : #'initialize-release' } +NeoJSONWriter >> initialize [ + super initialize. + "For portability reasons use `Character cr asString` rather than `String cr`" + self newLine: Character cr asString. + self prettyPrint: false. + self asciiOnly: false. + self writeNil: false. + level := 0 +] + +{ #category : #private } +NeoJSONWriter >> listElementSeparator [ + writeStream nextPut: $,. + self newlineIndent + +] + +{ #category : #private } +NeoJSONWriter >> mapElementSeparator [ + writeStream nextPut: $,. + self newlineIndent + +] + +{ #category : #'initialize-release' } +NeoJSONWriter >> newLine: string [ + "Set the newline string that I should use when pretty printing" + + newLine := string +] + +{ #category : #accessing } +NeoJSONWriter >> newline [ + "Write a newline on the stream that I wrap. + What gets written depends on the configuration, see #newLine:" + + writeStream nextPutAll: newLine +] + +{ #category : #private } +NeoJSONWriter >> newlineIndent [ + prettyPrint + ifTrue: [ + self newline. + level timesRepeat: [ writeStream nextPut: Character tab ] ] +] + +{ #category : #accessing } +NeoJSONWriter >> nextPut: anObject [ + "Primary interface. Write a JSON representation of anObject to my stream." + + anObject neoJsonOn: self +] + +{ #category : #accessing } +NeoJSONWriter >> nextPut: anObject as: schema [ + "Secondary interface to write JSON. + Write objects according to schema." + + | mapping | + (schema isNil or: [ anObject isNil ]) ifTrue: [ ^ self nextPut: anObject ]. + mapping := self mappingFor: schema. + ^ mapping writeObject: anObject on: self +] + +{ #category : #'initialize-release' } +NeoJSONWriter >> on: aWriteStream [ + "Initialize on aWriteStream, which should be a character stream that + implements #nextPut:, #nextPutAll:, #space and (optionally) #close." + + writeStream := aWriteStream + +] + +{ #category : #'initialize-release' } +NeoJSONWriter >> prettyPrint: boolean [ + "Set whether I should pretty print the JSON that I write" + + prettyPrint := boolean +] + +{ #category : #private } +NeoJSONWriter >> prettyPrintSpace [ + prettyPrint + ifTrue: [ writeStream nextPut: Character space ] +] + +{ #category : #writing } +NeoJSONWriter >> writeBoolean: boolean [ + boolean printOn: writeStream +] + +{ #category : #writing } +NeoJSONWriter >> writeFloat: float [ + float printOn: writeStream +] + +{ #category : #writing } +NeoJSONWriter >> writeInteger: integer [ + integer printOn: writeStream + +] + +{ #category : #writing } +NeoJSONWriter >> writeList: collection [ + self writeListStreamingDo: [ :jsonListWriter | + collection do: [ :each | + jsonListWriter writeElement: each ] ] +] + +{ #category : #writing } +NeoJSONWriter >> writeListStreamingDo: block [ + writeStream nextPut: $[. + self writeStreamingDo: block. + writeStream nextPut: $] +] + +{ #category : #writing } +NeoJSONWriter >> writeMap: keyValueCollection [ + self writeMapStreamingDo: [ :jsonMapWriter | + keyValueCollection keysAndValuesDo: [ :key :value | + jsonMapWriter writeKey: key value: value ] ] +] + +{ #category : #writing } +NeoJSONWriter >> writeMapStreamingDo: block [ + writeStream nextPut: ${. + self writeStreamingDo: block. + writeStream nextPut: $} +] + +{ #category : #accessing } +NeoJSONWriter >> writeNil [ + "Return whether I will write nil/null properties of objects or skip them." + + ^ writeNil +] + +{ #category : #'initialize-release' } +NeoJSONWriter >> writeNil: boolean [ + "Set whether I will write nil/null properties of objects or skip them." + + writeNil := boolean +] + +{ #category : #writing } +NeoJSONWriter >> writeNull [ + writeStream nextPutAll: 'null' +] + +{ #category : #writing } +NeoJSONWriter >> writeObject: anObject [ + | mapping | + mapping := self mappingFor: anObject class. + mapping + writeObject: anObject + on: self +] + +{ #category : #writing } +NeoJSONWriter >> writeStreamingDo: block [ + | mapWriter | + mapWriter := NeoJSONStreamingWriter on: self. + self indentedDo: [ + block value: mapWriter ]. + mapWriter wasUsed + ifTrue: [ self newlineIndent ] + ifFalse: [ self prettyPrintSpace ] +] + +{ #category : #writing } +NeoJSONWriter >> writeString: string [ + writeStream nextPut: $". + 1 to: string size do: [ :index | + self encodeChar: (string at: index) ]. + writeStream nextPut: $" +] diff --git a/repository/Neo-JSON-Core/Number.extension.st b/repository/Neo-JSON-Core/Number.extension.st new file mode 100644 index 0000000..773aae7 --- /dev/null +++ b/repository/Neo-JSON-Core/Number.extension.st @@ -0,0 +1,6 @@ +Extension { #name : #Number } + +{ #category : #'*neo-json-core' } +Number >> neoJsonOn: neoJSONWriter [ + neoJSONWriter writeFloat: self asFloat +] diff --git a/repository/Neo-JSON-Core/Object.extension.st b/repository/Neo-JSON-Core/Object.extension.st new file mode 100644 index 0000000..33b54ae --- /dev/null +++ b/repository/Neo-JSON-Core/Object.extension.st @@ -0,0 +1,6 @@ +Extension { #name : #Object } + +{ #category : #'*neo-json-core' } +Object >> neoJsonOn: neoJSONWriter [ + neoJSONWriter writeObject: self +] diff --git a/repository/Neo-JSON-Core/String.extension.st b/repository/Neo-JSON-Core/String.extension.st new file mode 100644 index 0000000..a08484f --- /dev/null +++ b/repository/Neo-JSON-Core/String.extension.st @@ -0,0 +1,6 @@ +Extension { #name : #String } + +{ #category : #'*neo-json-core' } +String >> neoJsonOn: neoJSONWriter [ + neoJSONWriter writeString: self +] diff --git a/repository/Neo-JSON-Core/UndefinedObject.extension.st b/repository/Neo-JSON-Core/UndefinedObject.extension.st new file mode 100644 index 0000000..1979e16 --- /dev/null +++ b/repository/Neo-JSON-Core/UndefinedObject.extension.st @@ -0,0 +1,6 @@ +Extension { #name : #UndefinedObject } + +{ #category : #'*neo-json-core' } +UndefinedObject >> neoJsonOn: neoJSONWriter [ + neoJSONWriter writeNull +] diff --git a/repository/Neo-JSON-Core/package.st b/repository/Neo-JSON-Core/package.st new file mode 100644 index 0000000..61507be --- /dev/null +++ b/repository/Neo-JSON-Core/package.st @@ -0,0 +1 @@ +Package { #name : #'Neo-JSON-Core' } diff --git a/repository/Neo-JSON-Pharo-Core.package/.filetree b/repository/Neo-JSON-Pharo-Core.package/.filetree deleted file mode 100644 index 57a6797..0000000 --- a/repository/Neo-JSON-Pharo-Core.package/.filetree +++ /dev/null @@ -1,5 +0,0 @@ -{ - "separateMethodMetaAndSource" : false, - "noMethodMetaData" : true, - "useCypressPropertiesFile" : true -} \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Core.package/OrderedDictionary.extension/instance/neoJsonOn..st b/repository/Neo-JSON-Pharo-Core.package/OrderedDictionary.extension/instance/neoJsonOn..st deleted file mode 100644 index 61a9c65..0000000 --- a/repository/Neo-JSON-Pharo-Core.package/OrderedDictionary.extension/instance/neoJsonOn..st +++ /dev/null @@ -1,3 +0,0 @@ -*neo-json-pharo-core -neoJsonOn: neoJSONWriter - neoJSONWriter writeMap: self \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Core.package/OrderedDictionary.extension/methodProperties.json b/repository/Neo-JSON-Pharo-Core.package/OrderedDictionary.extension/methodProperties.json deleted file mode 100644 index 9175e3e..0000000 --- a/repository/Neo-JSON-Pharo-Core.package/OrderedDictionary.extension/methodProperties.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "instance" : { - "neoJsonOn:" : "MarianoMartinezPeck 1/30/2018 09:19" - }, - "class" : { } -} \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Core.package/OrderedDictionary.extension/properties.json b/repository/Neo-JSON-Pharo-Core.package/OrderedDictionary.extension/properties.json deleted file mode 100644 index d25bad0..0000000 --- a/repository/Neo-JSON-Pharo-Core.package/OrderedDictionary.extension/properties.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "name" : "OrderedDictionary" -} \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Core.package/SmallDictionary.extension/instance/neoJsonOn..st b/repository/Neo-JSON-Pharo-Core.package/SmallDictionary.extension/instance/neoJsonOn..st deleted file mode 100644 index 61a9c65..0000000 --- a/repository/Neo-JSON-Pharo-Core.package/SmallDictionary.extension/instance/neoJsonOn..st +++ /dev/null @@ -1,3 +0,0 @@ -*neo-json-pharo-core -neoJsonOn: neoJSONWriter - neoJSONWriter writeMap: self \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Core.package/SmallDictionary.extension/methodProperties.json b/repository/Neo-JSON-Pharo-Core.package/SmallDictionary.extension/methodProperties.json deleted file mode 100644 index 9175e3e..0000000 --- a/repository/Neo-JSON-Pharo-Core.package/SmallDictionary.extension/methodProperties.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "instance" : { - "neoJsonOn:" : "MarianoMartinezPeck 1/30/2018 09:19" - }, - "class" : { } -} \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Core.package/SmallDictionary.extension/properties.json b/repository/Neo-JSON-Pharo-Core.package/SmallDictionary.extension/properties.json deleted file mode 100644 index 47f0739..0000000 --- a/repository/Neo-JSON-Pharo-Core.package/SmallDictionary.extension/properties.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "name" : "SmallDictionary" -} \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Core.package/monticello.meta/categories.st b/repository/Neo-JSON-Pharo-Core.package/monticello.meta/categories.st deleted file mode 100644 index 3eed96e..0000000 --- a/repository/Neo-JSON-Pharo-Core.package/monticello.meta/categories.st +++ /dev/null @@ -1 +0,0 @@ -SystemOrganization addCategory: #'Neo-JSON-Pharo-Core'! diff --git a/repository/Neo-JSON-Pharo-Core.package/monticello.meta/initializers.st b/repository/Neo-JSON-Pharo-Core.package/monticello.meta/initializers.st deleted file mode 100644 index e69de29..0000000 diff --git a/repository/Neo-JSON-Pharo-Core.package/monticello.meta/package b/repository/Neo-JSON-Pharo-Core.package/monticello.meta/package deleted file mode 100644 index 414908e..0000000 --- a/repository/Neo-JSON-Pharo-Core.package/monticello.meta/package +++ /dev/null @@ -1 +0,0 @@ -(name 'Neo-JSON-Pharo-Core') \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Core.package/monticello.meta/version b/repository/Neo-JSON-Pharo-Core.package/monticello.meta/version deleted file mode 100644 index 3861103..0000000 --- a/repository/Neo-JSON-Pharo-Core.package/monticello.meta/version +++ /dev/null @@ -1 +0,0 @@ -(name 'Neo-JSON-Pharo-Core-marianopeck.5' message '* Remove Date newDay:monthIndex:year: and change tests to use #fromString: ' id '0808b7e4-eb20-0d00-8085-371f07903797' date '6 February 2018' time '9:17:03.842522 am' author 'marianopeck' ancestors ((name 'Neo-JSON-Pharo-Core-marianopeck.4' message 'Sorry includesSubString: should have been in tests package' id 'dfa8fbb7-7920-0d00-bd67-46830307cbab' date '31 January 2018' time '5:04:07.093681 pm' author 'marianopeck' ancestors ((name 'Neo-JSON-Pharo-Core-marianopeck.3' message 'Added includesSubString for compatibility. Will try to remove it soon. ' id 'bae2f9af-7920-0d00-bd64-a73b0307cbab' date '31 January 2018' time '5:01:52.759683 pm' author 'marianopeck' ancestors ((name 'Neo-JSON-Pharo-Core-marianopeck.2' message 'Use newDay: day monthIndex: month year: year' id '6ae7ff91-7920-0d00-bd63-ed880307cbab' date '31 January 2018' time '4:53:29.837641 pm' author 'marianopeck' ancestors ((name 'Neo-JSON-Pharo-Core-marianopeck.1' message 'This commits aims to make NeoJSON more portable to other Smalltalk dialects like VAST. * Moved OrderedCollection and SmallDictionary neoJsonOn: to a new separate package ''Neo-JSON-Pharo-Core''. ' id '95833380-6020-0d00-a471-abf20e1160ba' date '30 January 2018' time '10:58:57.047661 am' author 'marianopeck' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ()) \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Core.package/properties.json b/repository/Neo-JSON-Pharo-Core.package/properties.json deleted file mode 100644 index 6f31cf5..0000000 --- a/repository/Neo-JSON-Pharo-Core.package/properties.json +++ /dev/null @@ -1 +0,0 @@ -{ } \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Core/OrderedDictionary.extension.st b/repository/Neo-JSON-Pharo-Core/OrderedDictionary.extension.st new file mode 100644 index 0000000..21e6fc6 --- /dev/null +++ b/repository/Neo-JSON-Pharo-Core/OrderedDictionary.extension.st @@ -0,0 +1,6 @@ +Extension { #name : #OrderedDictionary } + +{ #category : #'*neo-json-pharo-core' } +OrderedDictionary >> neoJsonOn: neoJSONWriter [ + neoJSONWriter writeMap: self +] diff --git a/repository/Neo-JSON-Pharo-Core/SmallDictionary.extension.st b/repository/Neo-JSON-Pharo-Core/SmallDictionary.extension.st new file mode 100644 index 0000000..6deee60 --- /dev/null +++ b/repository/Neo-JSON-Pharo-Core/SmallDictionary.extension.st @@ -0,0 +1,6 @@ +Extension { #name : #SmallDictionary } + +{ #category : #'*neo-json-pharo-core' } +SmallDictionary >> neoJsonOn: neoJSONWriter [ + neoJSONWriter writeMap: self +] diff --git a/repository/Neo-JSON-Pharo-Core/package.st b/repository/Neo-JSON-Pharo-Core/package.st new file mode 100644 index 0000000..2061d58 --- /dev/null +++ b/repository/Neo-JSON-Pharo-Core/package.st @@ -0,0 +1 @@ +Package { #name : #'Neo-JSON-Pharo-Core' } diff --git a/repository/Neo-JSON-Pharo-Examples.package/.filetree b/repository/Neo-JSON-Pharo-Examples.package/.filetree deleted file mode 100644 index 57a6797..0000000 --- a/repository/Neo-JSON-Pharo-Examples.package/.filetree +++ /dev/null @@ -1,5 +0,0 @@ -{ - "separateMethodMetaAndSource" : false, - "noMethodMetaData" : true, - "useCypressPropertiesFile" : true -} \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/Attachment.class/README.md b/repository/Neo-JSON-Pharo-Examples.package/Attachment.class/README.md deleted file mode 100644 index e69de29..0000000 diff --git a/repository/Neo-JSON-Pharo-Examples.package/Attachment.class/instance/fileName..st b/repository/Neo-JSON-Pharo-Examples.package/Attachment.class/instance/fileName..st deleted file mode 100644 index 3966e08..0000000 --- a/repository/Neo-JSON-Pharo-Examples.package/Attachment.class/instance/fileName..st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -fileName: anObject - fileName := anObject \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/Attachment.class/instance/url..st b/repository/Neo-JSON-Pharo-Examples.package/Attachment.class/instance/url..st deleted file mode 100644 index ca05f95..0000000 --- a/repository/Neo-JSON-Pharo-Examples.package/Attachment.class/instance/url..st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -url: anObject - url := anObject \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/Attachment.class/methodProperties.json b/repository/Neo-JSON-Pharo-Examples.package/Attachment.class/methodProperties.json deleted file mode 100644 index 3232d4b..0000000 --- a/repository/Neo-JSON-Pharo-Examples.package/Attachment.class/methodProperties.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "instance" : { - "url:" : "marianopeck 2/2/2018 17:52", - "fileName:" : "marianopeck 2/2/2018 17:53" - }, - "class" : { } -} \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/Attachment.class/properties.json b/repository/Neo-JSON-Pharo-Examples.package/Attachment.class/properties.json deleted file mode 100644 index 5e890ec..0000000 --- a/repository/Neo-JSON-Pharo-Examples.package/Attachment.class/properties.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "commentStamp" : "", - "super" : "Object", - "category" : "Neo-JSON-Pharo-Examples", - "classinstvars" : [ ], - "pools" : [ ], - "classvars" : [ ], - "instvars" : [ - "url", - "fileName" - ], - "name" : "Attachment", - "type" : "normal" -} \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/BittrexResponse.class/README.md b/repository/Neo-JSON-Pharo-Examples.package/BittrexResponse.class/README.md deleted file mode 100644 index e69de29..0000000 diff --git a/repository/Neo-JSON-Pharo-Examples.package/BittrexResponse.class/methodProperties.json b/repository/Neo-JSON-Pharo-Examples.package/BittrexResponse.class/methodProperties.json deleted file mode 100644 index d158391..0000000 --- a/repository/Neo-JSON-Pharo-Examples.package/BittrexResponse.class/methodProperties.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "instance" : { }, - "class" : { } -} \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/BittrexResponse.class/properties.json b/repository/Neo-JSON-Pharo-Examples.package/BittrexResponse.class/properties.json deleted file mode 100644 index 778263b..0000000 --- a/repository/Neo-JSON-Pharo-Examples.package/BittrexResponse.class/properties.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "commentStamp" : "", - "super" : "Object", - "category" : "Neo-JSON-Pharo-Examples", - "classinstvars" : [ ], - "pools" : [ ], - "classvars" : [ ], - "instvars" : [ - "success", - "message", - "result" - ], - "name" : "BittrexResponse", - "type" : "normal" -} \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/Market.class/README.md b/repository/Neo-JSON-Pharo-Examples.package/Market.class/README.md deleted file mode 100644 index e69de29..0000000 diff --git a/repository/Neo-JSON-Pharo-Examples.package/Market.class/methodProperties.json b/repository/Neo-JSON-Pharo-Examples.package/Market.class/methodProperties.json deleted file mode 100644 index d158391..0000000 --- a/repository/Neo-JSON-Pharo-Examples.package/Market.class/methodProperties.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "instance" : { }, - "class" : { } -} \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/Market.class/properties.json b/repository/Neo-JSON-Pharo-Examples.package/Market.class/properties.json deleted file mode 100644 index 452bbf0..0000000 --- a/repository/Neo-JSON-Pharo-Examples.package/Market.class/properties.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "commentStamp" : "", - "super" : "Object", - "category" : "Neo-JSON-Pharo-Examples", - "classinstvars" : [ ], - "pools" : [ ], - "classvars" : [ ], - "instvars" : [ - "MarketCurrency", - "BaseCurrency", - "MarketCurrencyLong", - "BaseCurrencyLong", - "MinTradeSize", - "MarketName", - "IsActive", - "Created", - "Notice", - "IsSponsored", - "LogoUrl" - ], - "name" : "Market", - "type" : "normal" -} \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/README.md b/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/README.md deleted file mode 100644 index e69de29..0000000 diff --git a/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testAccessingTheNewYorkPublicLibrary.st b/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testAccessingTheNewYorkPublicLibrary.st deleted file mode 100644 index 5ba6501..0000000 --- a/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testAccessingTheNewYorkPublicLibrary.st +++ /dev/null @@ -1,13 +0,0 @@ -tests -testAccessingTheNewYorkPublicLibrary - - | client reader data networkStream | - (client := ZnClient new) - streaming: true; - url: 'https://github.com/NYPL-publicdomain/data-and-utilities/blob/master/items/pd_items_1.ndjson?raw=true'; - get. - networkStream := ZnCharacterReadStream on: client contents. - reader := NeoJSONReader on: networkStream. - data := Array streamContents: [ :out | [ reader atEnd ] whileFalse: [ out nextPut: reader next ] ]. - client close. - data \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testAttachmentsExample.st b/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testAttachmentsExample.st deleted file mode 100644 index 8ded541..0000000 --- a/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testAttachmentsExample.st +++ /dev/null @@ -1,31 +0,0 @@ -tests -testAttachmentsExample - | collectionOne json | - "Let's create a collection of two instances:" - collectionOne := {(Attachment new - url: 'http://example.com/random-name.txt' asZnUrl; - fileName: 'chapter-one.txt' yourself). - (Attachment new - url: 'http://example.com/random-name.png' asZnUrl; - fileName: 'image.png'; - yourself)}. - - "And let's map it to a JSON structure:" - json := String - streamContents: [ :aStream | - (NeoJSONWriter on: aStream) - for: #CollectionOfAttachments customDo: [ :mapping | mapping listOfElementSchema: Attachment ]; - mapAllInstVarsFor: Attachment; - for: ZnUrl customDo: [ :mapping | mapping encoder: [ :aZnUrl | aZnUrl asString ] ]; - nextPut: collectionOne as: #CollectionOfAttachments ]. - - - "And read the JSON structure:" - (NeoJSONReader on: json readStream) - for: #CollectionOfAttachments customDo: [ :mapping | mapping listOfElementSchema: Attachment ]; - for: Attachment - do: [ :mapping | - mapping mapInstVar: 'fileName'. - (mapping mapInstVar: 'url') valueSchema: ZnUrl ]; - for: ZnUrl customDo: [ :mapping | mapping decoder: [ :string | string asZnUrl ] ]; - nextAs: #CollectionOfAttachments \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testBittrexLitecoinAsDictionary.st b/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testBittrexLitecoinAsDictionary.st deleted file mode 100644 index 82b469f..0000000 --- a/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testBittrexLitecoinAsDictionary.st +++ /dev/null @@ -1,10 +0,0 @@ -tests -testBittrexLitecoinAsDictionary - ZnClient new - url: 'https://bittrex.com/api/v1.1/public/getmarketSummary?market=BTC-LTC'; - accept: ZnMimeType applicationJson; - contentReader: [ :entity | |reader| - reader := (NeoJSONReader on: entity readStream). - reader next ]; - get. - \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testBittrexLitecoinAsDomainObjects.st b/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testBittrexLitecoinAsDomainObjects.st deleted file mode 100644 index f41da9c..0000000 --- a/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testBittrexLitecoinAsDomainObjects.st +++ /dev/null @@ -1,16 +0,0 @@ -tests -testBittrexLitecoinAsDomainObjects - ZnClient new - url: 'https://bittrex.com/api/v1.1/public/getmarkets'; - enforceHttpSuccess: true; - accept: ZnMimeType applicationJson; - contentReader: [ :entity | |reader| - reader := (NeoJSONReader on: entity readStream). - reader for: BittrexResponse do: [:m| - m mapInstVar: #success. - m mapInstVar: #message. - (m mapInstVar: #result) valueSchema: #ArrayOfMarkets]. - reader for: #ArrayOfMarkets customDo: [ :mapping | mapping listOfElementSchema: Market ]. - reader mapInstVarsFor: Market. - reader nextAs: BittrexResponse ]; - get \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testDoomtownDBCards.st b/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testDoomtownDBCards.st deleted file mode 100644 index 41531e4..0000000 --- a/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testDoomtownDBCards.st +++ /dev/null @@ -1,4 +0,0 @@ -tests -testDoomtownDBCards - - NeoJSONReader fromString: 'http://dtdb.co/api/cards/' asUrl retrieveContents \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testFeed.st b/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testFeed.st deleted file mode 100644 index 476852d..0000000 --- a/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testFeed.st +++ /dev/null @@ -1,12 +0,0 @@ -tests -testFeed - | json | - json := ZnClient new - systemPolicy; - url: 'https://daringfireball.net/feeds/json'; - accept: ZnMimeType applicationJson; - contentReader: [ :entity | NeoJSONObject fromString: entity contents ]; - get. - json items collect: #title. - json items collect: [ :each | each title -> each url ]. - json \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testGetWorldCapitals.st b/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testGetWorldCapitals.st deleted file mode 100644 index 1fe53f1..0000000 --- a/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testGetWorldCapitals.st +++ /dev/null @@ -1,4 +0,0 @@ -tests -testGetWorldCapitals - ((NeoJSONReader fromString: (ZnEasy get: 'http://api.geonames.org/countryInfoJSON' username: 'demo' password: '') contents) at: #geonames) - collect: [ :d | d at: #capital ] \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testGoogleMapsAPI.st b/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testGoogleMapsAPI.st deleted file mode 100644 index 85bb04c..0000000 --- a/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testGoogleMapsAPI.st +++ /dev/null @@ -1,7 +0,0 @@ -tests -testGoogleMapsAPI - - ZnClient new - url: 'http://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&sensor=false'; - contentReader: [ :entity | NeoJSONReader fromString: entity contents ]; - get \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testParsingUserAgentStrings.st b/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testParsingUserAgentStrings.st deleted file mode 100644 index 440e03f..0000000 --- a/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testParsingUserAgentStrings.st +++ /dev/null @@ -1,9 +0,0 @@ -tests -testParsingUserAgentStrings - ZnClient new - http; - host: 'useragentstring.com'; - queryAt: 'uas' put: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/601.4.4 (KHTML, like Gecko) Version/9.0.3 Safari/601.4.4'; - queryAt: 'getJSON' put: 'all'; - contentReader: [ :entity | NeoJSONReader fromString: entity contents ]; - get \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testStackOverflowInfo.st b/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testStackOverflowInfo.st deleted file mode 100644 index 645a79f..0000000 --- a/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testStackOverflowInfo.st +++ /dev/null @@ -1,6 +0,0 @@ -tests -testStackOverflowInfo - - ZnClient new - contentReader: [ :entity | NeoJSONReader fromString: entity contents ]; - get: 'http://api.stackexchange.com/2.1/info?site=stackoverflow' \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/methodProperties.json b/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/methodProperties.json deleted file mode 100644 index 4e8c4dd..0000000 --- a/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/methodProperties.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "instance" : { - "testGoogleMapsAPI" : "marianopeck 2/5/2018 08:35", - "testStackOverflowInfo" : "marianopeck 2/5/2018 08:46", - "testBittrexLitecoinAsDomainObjects" : "marianopeck 2/2/2018 17:42", - "testAccessingTheNewYorkPublicLibrary" : "marianopeck 2/5/2018 08:34", - "testGetWorldCapitals" : "marianopeck 2/2/2018 18:06", - "testParsingUserAgentStrings" : "marianopeck 2/5/2018 08:28", - "testDoomtownDBCards" : "marianopeck 2/5/2018 08:39", - "testAttachmentsExample" : "marianopeck 2/2/2018 17:54", - "testFeed" : "marianopeck 2/2/2018 18:01", - "testBittrexLitecoinAsDictionary" : "marianopeck 2/2/2018 17:41" - }, - "class" : { } -} \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/properties.json b/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/properties.json deleted file mode 100644 index 89a569c..0000000 --- a/repository/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/properties.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "commentStamp" : "", - "super" : "TestCase", - "category" : "Neo-JSON-Pharo-Examples", - "classinstvars" : [ ], - "pools" : [ ], - "classvars" : [ ], - "instvars" : [ ], - "name" : "NeoJSONPharoExamples", - "type" : "normal" -} \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/monticello.meta/categories.st b/repository/Neo-JSON-Pharo-Examples.package/monticello.meta/categories.st deleted file mode 100644 index c9dd2cc..0000000 --- a/repository/Neo-JSON-Pharo-Examples.package/monticello.meta/categories.st +++ /dev/null @@ -1 +0,0 @@ -SystemOrganization addCategory: #'Neo-JSON-Pharo-Examples'! diff --git a/repository/Neo-JSON-Pharo-Examples.package/monticello.meta/initializers.st b/repository/Neo-JSON-Pharo-Examples.package/monticello.meta/initializers.st deleted file mode 100644 index e69de29..0000000 diff --git a/repository/Neo-JSON-Pharo-Examples.package/monticello.meta/package b/repository/Neo-JSON-Pharo-Examples.package/monticello.meta/package deleted file mode 100644 index 77cae7e..0000000 --- a/repository/Neo-JSON-Pharo-Examples.package/monticello.meta/package +++ /dev/null @@ -1 +0,0 @@ -(name 'Neo-JSON-Pharo-Examples') \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/monticello.meta/version b/repository/Neo-JSON-Pharo-Examples.package/monticello.meta/version deleted file mode 100644 index 0e8e8dd..0000000 --- a/repository/Neo-JSON-Pharo-Examples.package/monticello.meta/version +++ /dev/null @@ -1 +0,0 @@ -(name 'Neo-JSON-Pharo-Examples-marianopeck.1' message 'Put together some demo/examples of NeoJSON' id '82708788-d720-0d00-8337-ea5305c229b0' date '5 February 2018' time '8:59:37.873793 am' author 'marianopeck' ancestors () stepChildren ()) \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples.package/properties.json b/repository/Neo-JSON-Pharo-Examples.package/properties.json deleted file mode 100644 index 6f31cf5..0000000 --- a/repository/Neo-JSON-Pharo-Examples.package/properties.json +++ /dev/null @@ -1 +0,0 @@ -{ } \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Examples/Attachment.class.st b/repository/Neo-JSON-Pharo-Examples/Attachment.class.st new file mode 100644 index 0000000..65b7a2e --- /dev/null +++ b/repository/Neo-JSON-Pharo-Examples/Attachment.class.st @@ -0,0 +1,19 @@ +Class { + #name : #Attachment, + #superclass : #Object, + #instVars : [ + 'url', + 'fileName' + ], + #category : 'Neo-JSON-Pharo-Examples' +} + +{ #category : #accessing } +Attachment >> fileName: anObject [ + fileName := anObject +] + +{ #category : #accessing } +Attachment >> url: anObject [ + url := anObject +] diff --git a/repository/Neo-JSON-Pharo-Examples/BittrexResponse.class.st b/repository/Neo-JSON-Pharo-Examples/BittrexResponse.class.st new file mode 100644 index 0000000..c240636 --- /dev/null +++ b/repository/Neo-JSON-Pharo-Examples/BittrexResponse.class.st @@ -0,0 +1,10 @@ +Class { + #name : #BittrexResponse, + #superclass : #Object, + #instVars : [ + 'success', + 'message', + 'result' + ], + #category : 'Neo-JSON-Pharo-Examples' +} diff --git a/repository/Neo-JSON-Pharo-Examples/Market.class.st b/repository/Neo-JSON-Pharo-Examples/Market.class.st new file mode 100644 index 0000000..b98ac21 --- /dev/null +++ b/repository/Neo-JSON-Pharo-Examples/Market.class.st @@ -0,0 +1,18 @@ +Class { + #name : #Market, + #superclass : #Object, + #instVars : [ + 'MarketCurrency', + 'BaseCurrency', + 'MarketCurrencyLong', + 'BaseCurrencyLong', + 'MinTradeSize', + 'MarketName', + 'IsActive', + 'Created', + 'Notice', + 'IsSponsored', + 'LogoUrl' + ], + #category : 'Neo-JSON-Pharo-Examples' +} diff --git a/repository/Neo-JSON-Pharo-Examples/NeoJSONPharoExamples.class.st b/repository/Neo-JSON-Pharo-Examples/NeoJSONPharoExamples.class.st new file mode 100644 index 0000000..6335019 --- /dev/null +++ b/repository/Neo-JSON-Pharo-Examples/NeoJSONPharoExamples.class.st @@ -0,0 +1,137 @@ +Class { + #name : #NeoJSONPharoExamples, + #superclass : #TestCase, + #category : 'Neo-JSON-Pharo-Examples' +} + +{ #category : #tests } +NeoJSONPharoExamples >> testAccessingTheNewYorkPublicLibrary [ + + | client reader data networkStream | + (client := ZnClient new) + streaming: true; + url: 'https://github.com/NYPL-publicdomain/data-and-utilities/blob/master/items/pd_items_1.ndjson?raw=true'; + get. + networkStream := ZnCharacterReadStream on: client contents. + reader := NeoJSONReader on: networkStream. + data := Array streamContents: [ :out | [ reader atEnd ] whileFalse: [ out nextPut: reader next ] ]. + client close. + data +] + +{ #category : #tests } +NeoJSONPharoExamples >> testAttachmentsExample [ + | collectionOne json | + "Let's create a collection of two instances:" + collectionOne := {(Attachment new + url: 'http://example.com/random-name.txt' asZnUrl; + fileName: 'chapter-one.txt' yourself). + (Attachment new + url: 'http://example.com/random-name.png' asZnUrl; + fileName: 'image.png'; + yourself)}. + + "And let's map it to a JSON structure:" + json := String + streamContents: [ :aStream | + (NeoJSONWriter on: aStream) + for: #CollectionOfAttachments customDo: [ :mapping | mapping listOfElementSchema: Attachment ]; + mapAllInstVarsFor: Attachment; + for: ZnUrl customDo: [ :mapping | mapping encoder: [ :aZnUrl | aZnUrl asString ] ]; + nextPut: collectionOne as: #CollectionOfAttachments ]. + + + "And read the JSON structure:" + (NeoJSONReader on: json readStream) + for: #CollectionOfAttachments customDo: [ :mapping | mapping listOfElementSchema: Attachment ]; + for: Attachment + do: [ :mapping | + mapping mapInstVar: 'fileName'. + (mapping mapInstVar: 'url') valueSchema: ZnUrl ]; + for: ZnUrl customDo: [ :mapping | mapping decoder: [ :string | string asZnUrl ] ]; + nextAs: #CollectionOfAttachments +] + +{ #category : #tests } +NeoJSONPharoExamples >> testBittrexLitecoinAsDictionary [ + ZnClient new + url: 'https://bittrex.com/api/v1.1/public/getmarketSummary?market=BTC-LTC'; + accept: ZnMimeType applicationJson; + contentReader: [ :entity | |reader| + reader := (NeoJSONReader on: entity readStream). + reader next ]; + get. + +] + +{ #category : #tests } +NeoJSONPharoExamples >> testBittrexLitecoinAsDomainObjects [ + ZnClient new + url: 'https://bittrex.com/api/v1.1/public/getmarkets'; + enforceHttpSuccess: true; + accept: ZnMimeType applicationJson; + contentReader: [ :entity | |reader| + reader := (NeoJSONReader on: entity readStream). + reader for: BittrexResponse do: [:m| + m mapInstVar: #success. + m mapInstVar: #message. + (m mapInstVar: #result) valueSchema: #ArrayOfMarkets]. + reader for: #ArrayOfMarkets customDo: [ :mapping | mapping listOfElementSchema: Market ]. + reader mapInstVarsFor: Market. + reader nextAs: BittrexResponse ]; + get +] + +{ #category : #tests } +NeoJSONPharoExamples >> testDoomtownDBCards [ + + NeoJSONReader fromString: 'http://dtdb.co/api/cards/' asUrl retrieveContents +] + +{ #category : #tests } +NeoJSONPharoExamples >> testFeed [ + | json | + json := ZnClient new + systemPolicy; + url: 'https://daringfireball.net/feeds/json'; + accept: ZnMimeType applicationJson; + contentReader: [ :entity | NeoJSONObject fromString: entity contents ]; + get. + json items collect: #title. + json items collect: [ :each | each title -> each url ]. + json +] + +{ #category : #tests } +NeoJSONPharoExamples >> testGetWorldCapitals [ + ((NeoJSONReader fromString: (ZnEasy get: 'http://api.geonames.org/countryInfoJSON' username: 'demo' password: '') contents) at: #geonames) + collect: [ :d | d at: #capital ] +] + +{ #category : #tests } +NeoJSONPharoExamples >> testGoogleMapsAPI [ + + ZnClient new + url: 'http://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&sensor=false'; + contentReader: [ :entity | NeoJSONReader fromString: entity contents ]; + get +] + +{ #category : #tests } +NeoJSONPharoExamples >> testParsingUserAgentStrings [ + ZnClient new + http; + host: 'useragentstring.com'; + queryAt: 'uas' put: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/601.4.4 (KHTML, like Gecko) Version/9.0.3 Safari/601.4.4'; + queryAt: 'getJSON' put: 'all'; + contentReader: [ :entity | NeoJSONReader fromString: entity contents ]; + get +] + +{ #category : #tests } +NeoJSONPharoExamples >> testStackOverflowInfo [ + + ZnClient new + contentReader: [ :entity | NeoJSONReader fromString: entity contents ]; + get: 'http://api.stackexchange.com/2.1/info?site=stackoverflow' +] diff --git a/repository/Neo-JSON-Pharo-Examples/package.st b/repository/Neo-JSON-Pharo-Examples/package.st new file mode 100644 index 0000000..c375c4c --- /dev/null +++ b/repository/Neo-JSON-Pharo-Examples/package.st @@ -0,0 +1 @@ +Package { #name : #'Neo-JSON-Pharo-Examples' } diff --git a/repository/Neo-JSON-Pharo-Tests.package/.filetree b/repository/Neo-JSON-Pharo-Tests.package/.filetree deleted file mode 100644 index 57a6797..0000000 --- a/repository/Neo-JSON-Pharo-Tests.package/.filetree +++ /dev/null @@ -1,5 +0,0 @@ -{ - "separateMethodMetaAndSource" : false, - "noMethodMetaData" : true, - "useCypressPropertiesFile" : true -} \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Tests.package/monticello.meta/categories.st b/repository/Neo-JSON-Pharo-Tests.package/monticello.meta/categories.st deleted file mode 100644 index 988a032..0000000 --- a/repository/Neo-JSON-Pharo-Tests.package/monticello.meta/categories.st +++ /dev/null @@ -1 +0,0 @@ -SystemOrganization addCategory: #'Neo-JSON-Pharo-Tests'! diff --git a/repository/Neo-JSON-Pharo-Tests.package/monticello.meta/initializers.st b/repository/Neo-JSON-Pharo-Tests.package/monticello.meta/initializers.st deleted file mode 100644 index e69de29..0000000 diff --git a/repository/Neo-JSON-Pharo-Tests.package/monticello.meta/package b/repository/Neo-JSON-Pharo-Tests.package/monticello.meta/package deleted file mode 100644 index ee5d128..0000000 --- a/repository/Neo-JSON-Pharo-Tests.package/monticello.meta/package +++ /dev/null @@ -1 +0,0 @@ -(name 'Neo-JSON-Pharo-Tests') \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Tests.package/monticello.meta/version b/repository/Neo-JSON-Pharo-Tests.package/monticello.meta/version deleted file mode 100644 index 6fbd4c7..0000000 --- a/repository/Neo-JSON-Pharo-Tests.package/monticello.meta/version +++ /dev/null @@ -1 +0,0 @@ -(name 'Neo-JSON-Pharo-Tests-marianopeck.3' message '* Avoid the #includesSubString: and provide another approach so that includesSubstring: can work with Pharo and VAST. Also fixed the tests calling it. ' id '9a54fa79-eb20-0d00-8082-a67007903797' date '6 February 2018' time '8:47:13.090945 am' author 'marianopeck' ancestors ((name 'Neo-JSON-Pharo-Tests-marianopeck.2' message 'Added includesSubString: (to be removed soon I hope)' id '8b1fc1bd-7920-0d00-bd68-70c50307cbab' date '31 January 2018' time '5:05:43.920782 pm' author 'marianopeck' ancestors ((name 'Neo-JSON-Pharo-Tests-marianopeck.1' message 'Nothing to customize for Pharo for the moment' id '01ff35b6-6120-0d00-a477-a9d80e1160ba' date '30 January 2018' time '12:25:38.147284 pm' author 'marianopeck' ancestors () stepChildren ())) stepChildren ())) stepChildren ()) \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Tests.package/properties.json b/repository/Neo-JSON-Pharo-Tests.package/properties.json deleted file mode 100644 index 6f31cf5..0000000 --- a/repository/Neo-JSON-Pharo-Tests.package/properties.json +++ /dev/null @@ -1 +0,0 @@ -{ } \ No newline at end of file diff --git a/repository/Neo-JSON-Pharo-Tests/package.st b/repository/Neo-JSON-Pharo-Tests/package.st new file mode 100644 index 0000000..7e0f6a8 --- /dev/null +++ b/repository/Neo-JSON-Pharo-Tests/package.st @@ -0,0 +1 @@ +Package { #name : #'Neo-JSON-Pharo-Tests' } diff --git a/repository/Neo-JSON-Tests.package/.filetree b/repository/Neo-JSON-Tests.package/.filetree deleted file mode 100644 index 57a6797..0000000 --- a/repository/Neo-JSON-Tests.package/.filetree +++ /dev/null @@ -1,5 +0,0 @@ -{ - "separateMethodMetaAndSource" : false, - "noMethodMetaData" : true, - "useCypressPropertiesFile" : true -} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONBenchmark.class/README.md b/repository/Neo-JSON-Tests.package/NeoJSONBenchmark.class/README.md deleted file mode 100644 index 3e3cc15..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONBenchmark.class/README.md +++ /dev/null @@ -1,19 +0,0 @@ -I am NeoJSONBenchmark. -I hold 1000 objects of the form Dictionary('color'->'green' 'enabled'->false 'id'->1 'name'->'Name-1' 'value'->0.002 ) in an Array. -I hold the JSON serialization of that as a String of the form '[{"value":0.002,"enabled":false,"name":"Name-1","color":"green","id":1}, ... - -| benchmark | -benchmark := NeoJSONBenchmark new. -[benchmark read] bench. - -| benchmark | -benchmark := NeoJSONBenchmark new. -[benchmark write] bench. - -| benchmark | -benchmark := NeoJSONBenchmark new. -[benchmark read] timeToRun. - -| benchmark | -benchmark := NeoJSONBenchmark new. -[benchmark write] timeToRun. \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONBenchmark.class/instance/initialize.st b/repository/Neo-JSON-Tests.package/NeoJSONBenchmark.class/instance/initialize.st deleted file mode 100644 index cb07fc5..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONBenchmark.class/instance/initialize.st +++ /dev/null @@ -1,16 +0,0 @@ -initialize-release -initialize - super initialize. - objects := Array new: 1000. - 1 to: 1000 do: [ :each | - | map | - (map := Dictionary new) - at: 'id' put: each; - at: 'name' put: 'Name-', each asString; - at: 'enabled' put: (#( true false) at: (each \\ 2) + 1); - at: 'color' put: (#( 'red' 'green' 'blue' ) at: (each \\ 3) + 1); - at: 'value' put: each + each / 1000.0. - objects at: each put: map ]. - json := String streamContents: [ :stream | - (NeoJSONWriter on: stream) nextPut: objects ] - \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONBenchmark.class/instance/read.st b/repository/Neo-JSON-Tests.package/NeoJSONBenchmark.class/instance/read.st deleted file mode 100644 index 996a274..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONBenchmark.class/instance/read.st +++ /dev/null @@ -1,3 +0,0 @@ -public -read - ^ (NeoJSONReader on: json readStream) next diff --git a/repository/Neo-JSON-Tests.package/NeoJSONBenchmark.class/instance/write.st b/repository/Neo-JSON-Tests.package/NeoJSONBenchmark.class/instance/write.st deleted file mode 100644 index 021a86a..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONBenchmark.class/instance/write.st +++ /dev/null @@ -1,4 +0,0 @@ -public -write - ^ String streamContents: [ :stream | - (NeoJSONWriter on: stream) nextPut: objects ] diff --git a/repository/Neo-JSON-Tests.package/NeoJSONBenchmark.class/instance/writePrettyPrintedRead.st b/repository/Neo-JSON-Tests.package/NeoJSONBenchmark.class/instance/writePrettyPrintedRead.st deleted file mode 100644 index a8089cc..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONBenchmark.class/instance/writePrettyPrintedRead.st +++ /dev/null @@ -1,9 +0,0 @@ -public -writePrettyPrintedRead - | output | - output := String streamContents: [ :stream | - (NeoJSONWriter on: stream) - prettyPrint: true; - nextPut: objects ]. - ^ (NeoJSONReader on: output readStream) - next \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONBenchmark.class/methodProperties.json b/repository/Neo-JSON-Tests.package/NeoJSONBenchmark.class/methodProperties.json deleted file mode 100644 index e1f5735..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONBenchmark.class/methodProperties.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "instance" : { - "initialize" : "SvenVanCaekenberghe 6/4/2012 18:49", - "writePrettyPrintedRead" : "SvenVanCaekenberghe 6/6/2012 15:07", - "write" : "SvenVanCaekenberghe 6/4/2012 17:26", - "read" : "SvenVanCaekenberghe 6/4/2012 17:02" - }, - "class" : { } -} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONBenchmark.class/properties.json b/repository/Neo-JSON-Tests.package/NeoJSONBenchmark.class/properties.json deleted file mode 100644 index 9d9ada7..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONBenchmark.class/properties.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "commentStamp" : "SvenVanCaekenberghe 6/5/2012 09:48", - "super" : "Object", - "category" : "Neo-JSON-Tests", - "classinstvars" : [ ], - "pools" : [ ], - "classvars" : [ ], - "instvars" : [ - "objects", - "json" - ], - "name" : "NeoJSONBenchmark", - "type" : "normal" -} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/README.md b/repository/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/README.md deleted file mode 100644 index f3a17cf..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/README.md +++ /dev/null @@ -1,3 +0,0 @@ -I am NeoJSONBenchmarkTests. - -This test is obviously dependent on hardware, but the margin is quite high. \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/instance/testObject2.st b/repository/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/instance/testObject2.st deleted file mode 100644 index 84abd8d..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/instance/testObject2.st +++ /dev/null @@ -1,7 +0,0 @@ -testing -testObject2 - | json | - json := NeoJSONWriter toString: NeoJSONTestObject2 new. - self - assert: (NeoJSONReader fromString: json as: NeoJSONTestObject2) - equals: NeoJSONTestObject2 new \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/instance/testPrettyPrinted.st b/repository/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/instance/testPrettyPrinted.st deleted file mode 100644 index 25ad78e..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/instance/testPrettyPrinted.st +++ /dev/null @@ -1,7 +0,0 @@ -testing -testPrettyPrinted - | benchmark | - benchmark := NeoJSONBenchmark new. - self - assert: benchmark writePrettyPrintedRead - equals: benchmark read \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/instance/testRead.st b/repository/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/instance/testRead.st deleted file mode 100644 index de5ec49..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/instance/testRead.st +++ /dev/null @@ -1,5 +0,0 @@ -testing -testRead - | benchmark | - benchmark := NeoJSONBenchmark new. - benchmark read \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/instance/testWrite.st b/repository/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/instance/testWrite.st deleted file mode 100644 index 355740a..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/instance/testWrite.st +++ /dev/null @@ -1,5 +0,0 @@ -testing -testWrite - | benchmark | - benchmark := NeoJSONBenchmark new. - benchmark write \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/methodProperties.json b/repository/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/methodProperties.json deleted file mode 100644 index 994676a..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/methodProperties.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "instance" : { - "testPrettyPrinted" : "SvenVanCaekenberghe 1/15/2014 19:29", - "testRead" : "SvenVanCaekenberghe 1/15/2014 19:30", - "testWrite" : "SvenVanCaekenberghe 1/15/2014 19:30", - "testObject2" : "SvenVanCaekenberghe 6/10/2012 20:20" - }, - "class" : { } -} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/properties.json b/repository/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/properties.json deleted file mode 100644 index 5316750..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/properties.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "commentStamp" : "SvenVanCaekenberghe 6/5/2012 10:05", - "super" : "TestCase", - "category" : "Neo-JSON-Tests", - "classinstvars" : [ ], - "pools" : [ ], - "classvars" : [ ], - "instvars" : [ ], - "name" : "NeoJSONBenchmarkTests", - "type" : "normal" -} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/README.md b/repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/README.md deleted file mode 100644 index beb1b09..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/README.md +++ /dev/null @@ -1 +0,0 @@ -NeoJSONExamplesTests runs a couple of examples as tests \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testPoints.st b/repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testPoints.st deleted file mode 100644 index 9a85d33..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testPoints.st +++ /dev/null @@ -1,33 +0,0 @@ -tests -testPoints - | points json result | - - points := Array with: 1@2 with: 3@4 with: 5@6. - - json := String streamContents: [ :out | - (NeoJSONWriter on: out) - prettyPrint: true; - mapInstVarsFor: Point; - nextPut: points ]. - - result := (NeoJSONReader on: json readStream) - mapInstVarsFor: Point; - for: #ListOfPoints customDo: [ :mapping | - mapping listOfElementSchema: Point ]; - nextAs: #ListOfPoints. - - self assert: result equals: points. - - result := (NeoJSONReader on: json readStream) - mapInstVarsFor: Point; - nextListAs: Point. - - self assert: result equals: points. - - result := (NeoJSONReader on: json readStream) - mapInstVarsFor: Point; - for: #OrderedCollectionOfPoints customDo: [ :mapping | - mapping listOfType: OrderedCollection andElementSchema: Point ]; - nextAs: #OrderedCollectionOfPoints. - - self assert: result equals: points asOrderedCollection. \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testRectanglePoints.st b/repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testRectanglePoints.st deleted file mode 100644 index 76cc28e..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testRectanglePoints.st +++ /dev/null @@ -1,29 +0,0 @@ -tests -testRectanglePoints - | rectangle rectangleJson result | - - rectangle := Rectangle origin: 3 @ 4 extent: 5 @ 6. - - rectangleJson := String streamContents: [ :stream | - (NeoJSONWriter on: stream) - prettyPrint: true; - mapInstVarsFor: Point; - mapInstVarsFor: Rectangle; - nextPut: rectangle ]. - - result := (NeoJSONReader on: rectangleJson readStream) - mapInstVarsFor: Point; - for: Rectangle do: [ :mapping | - (mapping mapInstVar: #origin) valueSchema: Point. - (mapping mapInstVar: #corner) valueSchema: Point ]; - nextAs: Rectangle. - - self assert: result equals: rectangle. - - result := (NeoJSONReader on: rectangleJson readStream) - mapInstVarsFor: Point; - for: Rectangle do: [ :mapping | - mapping mapInstVars do: [ :each | each valueSchema: Point ] ]; - nextAs: Rectangle. - - self assert: result equals: rectangle \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testRectanglePointsWithNils.st b/repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testRectanglePointsWithNils.st deleted file mode 100644 index 7011122..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testRectanglePointsWithNils.st +++ /dev/null @@ -1,23 +0,0 @@ -tests -testRectanglePointsWithNils - self - assert: - (String streamContents: [ :stream | - (NeoJSONWriter on: stream) - for: Point do: [ :mapping | mapping mapAllInstVars ]; - for: Rectangle do: [ :mapping | - (mapping mapInstVar: #origin) valueSchema: Point. - (mapping mapInstVar: #corner) valueSchema: Point ]; - nextPut: Rectangle new ]) - equals: '{}'. - self - assert: - (String streamContents: [ :stream | - (NeoJSONWriter on: stream) - for: Point do: [ :mapping | mapping mapAllInstVars ]; - for: Rectangle do: [ :mapping | - (mapping mapInstVar: #origin) valueSchema: Point. - (mapping mapInstVar: #corner) valueSchema: Point ]; - writeNil: true; - nextPut: Rectangle new ]) - equals: '{"origin":null,"corner":null}'. \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/methodProperties.json b/repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/methodProperties.json deleted file mode 100644 index 5083f3b..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/methodProperties.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "instance" : { - "testPoints" : "marianopeck 1/30/2018 13:05", - "testRectanglePoints" : "SvenVanCaekenberghe 7/6/2017 09:56", - "testRectanglePointsWithNils" : "SvenVanCaekenberghe 11/13/2017 18:51" - }, - "class" : { } -} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/properties.json b/repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/properties.json deleted file mode 100644 index c6e329a..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/properties.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "commentStamp" : "SvenVanCaekenberghe 7/6/2017 09:50", - "super" : "TestCase", - "category" : "Neo-JSON-Tests", - "classinstvars" : [ ], - "pools" : [ ], - "classvars" : [ ], - "instvars" : [ ], - "name" : "NeoJSONExamplesTests", - "type" : "normal" -} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/README.md b/repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/README.md deleted file mode 100644 index 0247a5d..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/README.md +++ /dev/null @@ -1 +0,0 @@ -I am NeoJSONMappingTests, testing more exotic kinds of mapping constructs. \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/instance/testDynamicTyping.st b/repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/instance/testDynamicTyping.st deleted file mode 100644 index b42066a..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/instance/testDynamicTyping.st +++ /dev/null @@ -1,25 +0,0 @@ -testing -testDynamicTyping - | data customMapping json result | - data := Array with: 'foo'->1 with: #('foo' 2). - "The idea is to map a key value combination as either a classic association or a simple pair, - using key & value properties as well as a type property to distinguish between the two" - customMapping := [ :mapper | - mapper - for: #AssocOrPair customDo: [ :mapping | - mapping - encoder: [ :x | - x isArray - ifTrue: [ Dictionary new at: 'type' put: 'pair'; at: 'key' put: x first; at: 'value' put: x second; yourself ] - ifFalse: [ Dictionary new at: 'type' put: 'assoc'; at: 'key' put: x key; at: 'value' put: x value; yourself ] ]; - decoder: [ :x | - (x at: 'type') = 'pair' - ifTrue: [ Array with: (x at: 'key') with: (x at: 'value') ] - ifFalse: [ (x at: 'key') -> (x at: 'value')] ] ]; - for: #ArrayOfAssocOrPair customDo: [ :mapping | - mapping listOfType: Array andElementSchema: #AssocOrPair ]; - yourself ]. - json := String streamContents: [ :out | - (customMapping value: (NeoJSONWriter on: out)) nextPut: data as: #ArrayOfAssocOrPair ]. - result := (customMapping value: (NeoJSONReader on: json readStream)) nextAs: #ArrayOfAssocOrPair. - self assert: result equals: data \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/instance/testSymbolOrStringInstVarMapping.st b/repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/instance/testSymbolOrStringInstVarMapping.st deleted file mode 100644 index cb8d8b9..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/instance/testSymbolOrStringInstVarMapping.st +++ /dev/null @@ -1,20 +0,0 @@ -testing -testSymbolOrStringInstVarMapping - | data out1 out2 result1 result2 | - data := Array with: 1@2 with: 3@4. - out1 := String streamContents: [ :out | - (NeoJSONWriter on: out) - for: Point do: [ :mapping | mapping mapInstVars: #(x y) ]; - nextPut: data ]. - result1 := (NeoJSONReader on: out1 readStream) - for: Point do: [ :mapping | mapping mapInstVars: #(x y) ]; - nextListAs: Point. - self assert: result1 equals: data. - out2 := String streamContents: [ :out | - (NeoJSONWriter on: out) - for: Point do: [ :mapping | mapping mapInstVars: #('x' 'y') ]; - nextPut: data ]. - result2 := (NeoJSONReader on: out1 readStream) - for: Point do: [ :mapping | mapping mapInstVars: #('x' 'y') ]; - nextListAs: Point. - self assert: result2 equals: data \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/instance/testVirtualTransferObject.st b/repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/instance/testVirtualTransferObject.st deleted file mode 100644 index 7a8713c..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/instance/testVirtualTransferObject.st +++ /dev/null @@ -1,27 +0,0 @@ -testing -testVirtualTransferObject - | data customMapping extraJson json result | - data := NeoJSONObject new data: (Array with: 1@1 with: 2@2). - extraJson := '{"foo":1,"data":[{"x":1,"y":1},{"x":2,"y":2,"z":-1}]}'. - "The idea here is that we are not interested in the top level object just in its data property, - which should be of a specific type, hence we create a virtual transfer object" - customMapping := [ :mapper | - mapper - for: Point do: [ :mapping | - mapping mapInstVars: #(x y) ]; - for: #ArrayOfPoints customDo: [ :mapping | - mapping listOfElementSchema: Point ]; - for: #TransferObject do: [ :mapping | - mapping subjectClass: NeoJSONObject. - (mapping mapAccessor: #data) valueSchema: #ArrayOfPoints ]; - yourself ]. - "By using NeoJSONObject accessors (#data & #data:) are translated to generic #at:[put:] messages. - A longer alternative is - (mapping mapProperty: #data getter: [ :obj | obj at: #data ] setter: [ :obj :x | obj at: #data put: x]) valueSchema: #ArrayOfPoints - where the blocks give you the flexibility to use a plain Dictionary for example" - result := (customMapping value: (NeoJSONReader on: extraJson readStream)) nextAs: #TransferObject. - self assert: result equals: data. - json := String streamContents: [ :out | - (customMapping value: (NeoJSONWriter on: out)) nextPut: data as: #TransferObject ]. - result := (customMapping value: (NeoJSONReader on: json readStream)) nextAs: #TransferObject. - self assert: result equals: data \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/methodProperties.json b/repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/methodProperties.json deleted file mode 100644 index ee8b697..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/methodProperties.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "instance" : { - "testVirtualTransferObject" : "marianopeck 1/30/2018 13:07", - "testSymbolOrStringInstVarMapping" : "SvenVanCaekenberghe 2/6/2018 17:38", - "testDynamicTyping" : "marianopeck 1/31/2018 09:05" - }, - "class" : { } -} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/properties.json b/repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/properties.json deleted file mode 100644 index d2bb2f5..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONMappingTests.class/properties.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "commentStamp" : "SvenVanCaekenberghe 9/22/2017 15:07", - "super" : "TestCase", - "category" : "Neo-JSON-Tests", - "classinstvars" : [ ], - "pools" : [ ], - "classvars" : [ ], - "instvars" : [ ], - "name" : "NeoJSONMappingTests", - "type" : "normal" -} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/README.md b/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/README.md deleted file mode 100644 index 344fd62..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/README.md +++ /dev/null @@ -1,2 +0,0 @@ -I am NeoJSONMockStream. -I wrap another stream to validate the limited API used. \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/class/on..st b/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/class/on..st deleted file mode 100644 index 53c51f6..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/class/on..st +++ /dev/null @@ -1,5 +0,0 @@ -instance creation -on: stream - ^ self new - stream: stream; - yourself \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/atEnd.st b/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/atEnd.st deleted file mode 100644 index 3f1258d..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/atEnd.st +++ /dev/null @@ -1,3 +0,0 @@ -testing -atEnd - ^ stream atEnd \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/close.st b/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/close.st deleted file mode 100644 index 22378d7..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/close.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -close - ^ stream close \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/next.st b/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/next.st deleted file mode 100644 index 8a4257a..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/next.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -next - ^ stream next \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/nextPut..st b/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/nextPut..st deleted file mode 100644 index 04080e7..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/nextPut..st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -nextPut: character - ^ stream nextPut: character \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/nextPutAll..st b/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/nextPutAll..st deleted file mode 100644 index d5179d8..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/nextPutAll..st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -nextPutAll: string - ^ stream nextPutAll: string \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/peek.st b/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/peek.st deleted file mode 100644 index 2c74034..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/peek.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -peek - ^ stream peek \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/peekFor..st b/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/peekFor..st deleted file mode 100644 index 7a67ff0..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/peekFor..st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -peekFor: char - ^ stream peekFor: char \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/space.st b/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/space.st deleted file mode 100644 index 4ceb125..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/space.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -space - ^ stream space \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/stream..st b/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/stream..st deleted file mode 100644 index e993619..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/stream..st +++ /dev/null @@ -1,3 +0,0 @@ -initialize-release -stream: anObject - stream := anObject \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/methodProperties.json b/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/methodProperties.json deleted file mode 100644 index fec0e7e..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/methodProperties.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "instance" : { - "nextPut:" : "SvenVanCaekenberghe 6/13/2012 16:23", - "nextPutAll:" : "SvenVanCaekenberghe 6/13/2012 16:23", - "close" : "SvenVanCaekenberghe 6/13/2012 16:23", - "next" : "SvenVanCaekenberghe 6/13/2012 16:22", - "peek" : "SvenVanCaekenberghe 6/13/2012 16:22", - "space" : "SvenVanCaekenberghe 6/13/2012 16:23", - "peekFor:" : "SvenVanCaekenberghe 12/3/2012 10:53", - "stream:" : "SvenVanCaekenberghe 6/13/2012 16:22", - "atEnd" : "SvenVanCaekenberghe 6/13/2012 16:23" - }, - "class" : { - "on:" : "SvenVanCaekenberghe 6/13/2012 16:25" - } -} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/properties.json b/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/properties.json deleted file mode 100644 index 0cc8a01..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONMockStream.class/properties.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "commentStamp" : "", - "super" : "Object", - "category" : "Neo-JSON-Tests", - "classinstvars" : [ ], - "pools" : [ ], - "classvars" : [ ], - "instvars" : [ - "stream" - ], - "name" : "NeoJSONMockStream", - "type" : "normal" -} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/README.md b/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/README.md deleted file mode 100644 index 51b44cb..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/README.md +++ /dev/null @@ -1 +0,0 @@ -I am NeoJSONObjectTests, I hold unit tests for NeoJSONObject. diff --git a/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testAtPath.st b/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testAtPath.st deleted file mode 100644 index 79ed9dd..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testAtPath.st +++ /dev/null @@ -1,17 +0,0 @@ -testing -testAtPath - | object | - object := NeoJSONObject newFrom: (Array with: #one -> ( NeoJSONObject newFrom: (Array with: #two -> ( NeoJSONObject newFrom: (Array with: #three -> 42) ) ) )). - self assert: (object atPath: #(one two three)) equals: 42. - self assert: (object atPath: #(one two three)) equals: object one two three. - self assert: (object atPath: #(missing)) equals: nil. - self assert: (object atPath: #(one missing)) equals: nil. - self assert: (object atPath: #(one two missing)) equals: nil. - self assert: (object atPath: #(one two missing)) equals: object one two missing. - - object := NeoJSONObject newFrom: (Array with: #foo -> 42). - self assert: (object atPath: #(foo)) equals: 42. - self assert: (object atPath: #(foo)) equals: object foo. - self assert: (object atPath: #(foo)) equals: (object at: #foo). - self assert: (object atPath: #()) equals: object. - diff --git a/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testAtPathPut.st b/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testAtPathPut.st deleted file mode 100644 index bcdbb21..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testAtPathPut.st +++ /dev/null @@ -1,20 +0,0 @@ -testing -testAtPathPut - | object | - object := NeoJSONObject new. - object atPath: #(one test) put: 42. - self assert: (object atPath: #(one test)) equals: 42. - self assert: object one test equals: 42. - object atPath: #(one two three) put: #foo. - self assert: (object atPath: #(one two three)) equals: #foo. - self assert: object one two three equals: #foo. - object atPath: #(one two threeBis) put: #bar. - self assert: (object atPath: #(one two threeBis)) equals: #bar. - self assert: object one two threeBis equals: #bar. - - self assert: object foo isNil. - self assert: (object atPath: #() put: 1) equals: object. - self assert: (object atPath: #(foo) put: 1) equals: 1. - self assert: (object atPath: #(foo)) equals: 1. - self assert: object foo equals: 1 - diff --git a/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testCRUD.st b/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testCRUD.st deleted file mode 100644 index 43d355e..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testCRUD.st +++ /dev/null @@ -1,18 +0,0 @@ -testing -testCRUD - | object | - object := NeoJSONObject new. - self assert: object isEmpty. - self assert: object foo equals: nil. - object foo: 123. - self assert: object foo equals: 123. - self assert: object printString equals: '{"foo":123}'. - object name: 'test'. - object value: Float pi. - self assert: object name equals: 'test'. - self assert: (object value closeTo: Float pi). - self assert: object keys asSet equals: #(foo name value) asSet. - object removeKey: #foo. - self assert: object foo equals: nil. - object removeAll. - self assert: object isEmpty \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testJSON.st b/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testJSON.st deleted file mode 100644 index 3cb012f..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testJSON.st +++ /dev/null @@ -1,10 +0,0 @@ -testing -testJSON - | data json object | - data := NeoJSONObject newFrom: (Array with: #foo->1 with: #bar->2 with: #str->'Str!' with: #bool->true with: #flt->1.5). - json := NeoJSONWriter toString: data . - object := NeoJSONObject fromString: json. - self assert: object class equals: NeoJSONObject. - self assert: object equals: data. - json := (NeoJSONWriter toString: object). - self assert: (NeoJSONObject fromString: json) equals: object \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/methodProperties.json b/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/methodProperties.json deleted file mode 100644 index 4329245..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/methodProperties.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "instance" : { - "testAtPathPut" : "SvenVanCaekenberghe 4/26/2017 16:17", - "testAtPath" : "marianopeck 1/31/2018 11:13", - "testCRUD" : "SvenVanCaekenberghe 9/8/2014 12:39", - "testJSON" : "marianopeck 1/31/2018 11:13" - }, - "class" : { } -} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/properties.json b/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/properties.json deleted file mode 100644 index 2ea00eb..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONObjectTests.class/properties.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "commentStamp" : "SvenVanCaekenberghe 9/8/2014 12:39", - "super" : "TestCase", - "category" : "Neo-JSON-Tests", - "classinstvars" : [ ], - "pools" : [ ], - "classvars" : [ ], - "instvars" : [ ], - "name" : "NeoJSONObjectTests", - "type" : "normal" -} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/README.md b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/README.md deleted file mode 100644 index 58dd4b5..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/README.md +++ /dev/null @@ -1 +0,0 @@ -I am NeoJSONReaderTests, a test suite for NeoJSONReader. \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testAllowNil.st b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testAllowNil.st deleted file mode 100644 index 5c19107..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testAllowNil.st +++ /dev/null @@ -1,21 +0,0 @@ -testing -testAllowNil - self - should: [ - (NeoJSONReader on: 'null' readStream) - mapInstVarsFor: Point; - nextAs: Point ] - raise: NeoJSONParseError. - self - assert: ((NeoJSONReader on: 'null' readStream) - mapInstVarsFor: Point; - for: Point do: [ :mapping | mapping allowNil ]; - nextAs: Point) - equals: nil. - self - assert: ((NeoJSONReader on: '[ { "x" : 1, "y" : 2 }, null, { "x" : 3, "y" : -1 } ]' readStream) - mapInstVarsFor: Point; - for: Point do: [ :mapping | mapping allowNil ]; - for: #ArrayOfPoints customDo: [ :mapping | mapping listOfElementSchema: Point ]; - nextAs: #ArrayOfPoints) - equals: (Array with: 1 @ 2 with: nil with: 3 @ -1). \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testArrayOfPoints.st b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testArrayOfPoints.st deleted file mode 100644 index 699f257..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testArrayOfPoints.st +++ /dev/null @@ -1,13 +0,0 @@ -testing -testArrayOfPoints - | reader | - reader := [ :string | - (NeoJSONReader on: string readStream) - for: Point do: [ :mapping | - mapping mapInstVars: #(x y) ]; - for: #ArrayOfPoints customDo: [ :mapping | - mapping listOfElementSchema: Point ]; - nextAs: #ArrayOfPoints ]. - self assert: (reader value: '[ { "x":1, "y":2 }, { "x":-1, "y":-2 } ]') equals: (Array with: 1@2 with: -1@ -2) . - self assert: (reader value: '[ ]') equals: #(). - self assert: (reader value: '[ { } ]') equals: (Array with: Point new) \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testArrayOfPointsUsingNextListAs.st b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testArrayOfPointsUsingNextListAs.st deleted file mode 100644 index 8415dea..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testArrayOfPointsUsingNextListAs.st +++ /dev/null @@ -1,10 +0,0 @@ -testing -testArrayOfPointsUsingNextListAs - | reader | - reader := [ :string | - (NeoJSONReader on: string readStream) - mapInstVarsFor: Point; - nextListAs: Point ]. - self assert: (reader value: '[ { "x":1, "y":2 }, { "y":-2, "x":-1 } ]') equals: (Array with: 1@2 with: -1@ -2) . - self assert: (reader value: '[ ]') equals: #(). - self assert: (reader value: '[ { } ]') equals: (Array with: Point new) \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testAssociation.st b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testAssociation.st deleted file mode 100644 index fb8e582..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testAssociation.st +++ /dev/null @@ -1,10 +0,0 @@ -testing -testAssociation - | reader | - reader := [ :string | - (NeoJSONReader on: string readStream) - for: Association do: [ :mapping | - mapping mapAccessors: #(key value) ]; - nextAs: Association ]. - self assert: (reader value: '{"key":"foo","value":42}') equals: 'foo' -> 42. - self assert: (reader value: '{}') equals: Association new \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testBooleans.st b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testBooleans.st deleted file mode 100644 index fa5aec6..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testBooleans.st +++ /dev/null @@ -1,6 +0,0 @@ -testing -testBooleans - self assert: (NeoJSONReader on: 'true' readStream) next equals: true. - self assert: (NeoJSONReader on: 'false' readStream) next equals: false. - self should: [ (NeoJSONReader on: 'tru' readStream) next ] raise: NeoJSONParseError. - self should: [ (NeoJSONReader on: 'falsE' readStream) next ] raise: NeoJSONParseError. \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testByteArray.st b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testByteArray.st deleted file mode 100644 index 8f925eb..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testByteArray.st +++ /dev/null @@ -1,10 +0,0 @@ -testing -testByteArray - | reader | - reader := [ :string | - (NeoJSONReader on: string readStream) - for: ByteArray customDo: [ :mapping | - mapping listOfType: ByteArray ]; - nextAs: ByteArray ]. - self assert: (reader value: '[ 1, 2, 3 ]') equals: #[1 2 3]. - self assert: (reader value: '[ ]') equals: ByteArray new \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testDate.st b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testDate.st deleted file mode 100644 index 04153bb..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testDate.st +++ /dev/null @@ -1,9 +0,0 @@ -testing -testDate - | reader | - reader := [ :input | - (NeoJSONReader on: input readStream) - for: Date customDo: [ :mapping | - mapping decoder: [ :string | Date fromString: string ] ]; - nextAs: Date ]. - self assert: (reader value: ' "2012-06-08" ') equals: (Date fromString: '2012-06-08') \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testDateAndTime.st b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testDateAndTime.st deleted file mode 100644 index 0bc96f7..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testDateAndTime.st +++ /dev/null @@ -1,11 +0,0 @@ -testing -testDateAndTime - | reader | - reader := [ :input | - (NeoJSONReader on: input readStream) - for: DateAndTime customDo: [ :mapping | - mapping decoder: [ :string | DateAndTime fromString: string ] ]; - nextAs: DateAndTime ]. - self - assert: (reader value: ' "2012-02-14T16:40:18+01:00" ') - equals: (DateAndTime year: 2012 month: 2 day: 14 hour: 16 minute: 40 second: 18 offset: 1 hour) \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testFloats.st b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testFloats.st deleted file mode 100644 index 771f131..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testFloats.st +++ /dev/null @@ -1,23 +0,0 @@ -testing -testFloats - | reader | - reader := [ :string | - (NeoJSONReader on: string readStream) next ]. - self assert: ((reader value: '123.0') closeTo: 123.0). - self assert: ((reader value: '-123.0') closeTo: -123.0). - self assert: ((reader value: '123.0e0') closeTo: 123.0). - self assert: ((reader value: '123e6') closeTo: 123e6). - self assert: ((reader value: '123e+6') closeTo: 123e6). - self assert: ((reader value: '123e-6') closeTo: 123e-6). - self assert: ((reader value: '123E6') closeTo: 123e6). - self assert: ((reader value: '123E+6') closeTo: 123e6). - self assert: ((reader value: '123E-6') closeTo: 123e-6). - self assert: ((reader value: '-123e6') closeTo: -123e6). - self assert: ((reader value: '-123e-6') closeTo: -123e-6). - self assert: ((reader value: '-123E6') closeTo: -123e6). - self assert: ((reader value: '-123E-6') closeTo: -123e-6). - self assert: ((reader value: '3.14159') closeTo: Float pi). - self assert: ((reader value: '0.123e6') closeTo: 0.123e6). - self assert: ((reader value: '0.123e-6') closeTo: 0.123e-6). - self assert: ((reader value: '-0.123E6') closeTo: -0.123e6). - self assert: ((reader value: '-0.123E-6') closeTo: -0.123e-6). diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testIntegers.st b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testIntegers.st deleted file mode 100644 index 5c6b001..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testIntegers.st +++ /dev/null @@ -1,15 +0,0 @@ -testing -testIntegers - | reader | - reader := [ :string | - (NeoJSONReader on: string readStream) next ]. - self assert: (reader value: '123') equals: 123. - self assert: (reader value: '00123') equals: 123. - self assert: (reader value: '-123') equals: -123. - self assert: (reader value: '-0123') equals: -123. - self assert: (reader value: '0') equals: 0. - self assert: (reader value: '-0') equals: 0. - self assert: (reader value: '00') equals: 0. - self assert: (reader value: ' 123 ') equals: 123. - self should: [ reader value: '+1' ] raise: NeoJSONParseError. - self should: [ reader value: ' - ' ] raise: NeoJSONParseError. diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testLists.st b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testLists.st deleted file mode 100644 index dcfc67e..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testLists.st +++ /dev/null @@ -1,13 +0,0 @@ -testing -testLists - | reader | - reader := [ :string | - (NeoJSONReader on: string readStream) next ]. - self assert: (reader value: '[1,2,3]') equals: #(1 2 3). - self assert: (reader value: '[]') equals: #(). - self assert: (reader value: ' [ 1 , 2 , 3 ] ') equals: #(1 2 3). - self assert: (reader value: ' [ ] ') equals: #(). - self should: [ reader value: '[1,]' ] raise: NeoJSONParseError. - self should: [ reader value: '[' ] raise: NeoJSONParseError. - self should: [ reader value: ']' ] raise: NeoJSONParseError. - self should: [ reader value: '[}' ] raise: NeoJSONParseError \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testMaps.st b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testMaps.st deleted file mode 100644 index 704eecb..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testMaps.st +++ /dev/null @@ -1,15 +0,0 @@ -testing -testMaps - | reader | - reader := [ :string | - (NeoJSONReader on: string readStream) next ]. - self assert: (reader value: '{"x":1,"y":2}') equals: (Dictionary newFromPairs: #( 'x' 1 'y' 2)). - self assert: (reader value: '{}') equals: Dictionary new. - self assert: (reader value: ' { "x" : 1 , "y" : 2 } ' ) equals: (Dictionary newFromPairs: #( 'x' 1 'y' 2)). - self assert: (reader value: ' { } ') equals: Dictionary new. - self should: [ reader value: '{"foo":}' ] raise: NeoJSONParseError. - self should: [ reader value: '{"foo":9,}' ] raise: NeoJSONParseError. - self should: [ reader value: '{9:true,}' ] raise: NeoJSONParseError. - self should: [ reader value: '{' ] raise: NeoJSONParseError. - self should: [ reader value: '}' ] raise: NeoJSONParseError. - self should: [ reader value: '{]' ] raise: NeoJSONParseError \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testNextStringAsHex.st b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testNextStringAsHex.st deleted file mode 100644 index 591d6a2..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testNextStringAsHex.st +++ /dev/null @@ -1,11 +0,0 @@ -testing -testNextStringAsHex - | string | - string := (NeoJSONReader on: '"466F6F2062617221"' readStream) - for: #StringAsHex - customDo: [ :mapping | - mapping - encoder: [ :x | x asByteArray hex asUppercase ]; - decoder: [ :x | (ByteArray readHexFrom: x) asString ] ]; - nextAs: #StringAsHex. - self assert: string equals: 'Foo bar!' \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testNonBMPCharacterDecoding.st b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testNonBMPCharacterDecoding.st deleted file mode 100644 index 5eb5e7b..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testNonBMPCharacterDecoding.st +++ /dev/null @@ -1,8 +0,0 @@ -testing -testNonBMPCharacterDecoding - "Characters not in the Basic Multilingual Plane are encoded as a UTF-16 surrogate pair" - - | string object | - string := 16r1D11E asCharacter asString. "MUSICAL SYMBOL G CLEF" - object := (NeoJSONReader fromString: '"\uD834\uDD1E"'). - self assert: object equals: string \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testNull.st b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testNull.st deleted file mode 100644 index 24ff1e0..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testNull.st +++ /dev/null @@ -1,5 +0,0 @@ -testing -testNull - self assert: (NeoJSONReader on: 'null' readStream) next equals: nil. - self assert: (NeoJSONReader on: ' null ' readStream) next equals: nil. - self should: [ (NeoJSONReader on: ' nil ' readStream) next ] raise: NeoJSONParseError. \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testOrderedCollection.st b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testOrderedCollection.st deleted file mode 100644 index e14229e..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testOrderedCollection.st +++ /dev/null @@ -1,13 +0,0 @@ -testing -testOrderedCollection - | json list | - json := '[ 1, 2, 3 ]'. - list := (NeoJSONReader on: json readStream) - listClass: OrderedCollection; - next. - self - assert: list - equals: (OrderedCollection with: 1 with: 2 with: 3). - self - assert: list class - equals: OrderedCollection \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testOrderedCollectionOfPoints.st b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testOrderedCollectionOfPoints.st deleted file mode 100644 index 10317dc..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testOrderedCollectionOfPoints.st +++ /dev/null @@ -1,13 +0,0 @@ -testing -testOrderedCollectionOfPoints - | reader | - reader := [ :string | - (NeoJSONReader on: string readStream) - for: Point do: [ :mapping | - mapping mapInstVars: #(x y) ]; - for: #OrderedCollectionOfPoints customDo: [ :mapping | - mapping listOfType: OrderedCollection andElementSchema: Point ]; - nextAs: #OrderedCollectionOfPoints ]. - self assert: (reader value: '[ { "x":1, "y":2 }, { "x":-1, "y":-2 } ]') equals: (Array with: 1@2 with: -1@ -2) asOrderedCollection. - self assert: (reader value: '[ ]') equals: OrderedCollection new. - self assert: (reader value: '[ { } ]') equals: (OrderedCollection with: Point new) \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testParseErrors.st b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testParseErrors.st deleted file mode 100644 index 678f055..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testParseErrors.st +++ /dev/null @@ -1,9 +0,0 @@ -testing -testParseErrors - self should: [ NeoJSONReader fromString: 'zero' ] raise: NeoJSONParseError. - self should: [ NeoJSONReader fromString: '#' ] raise: NeoJSONParseError. - self should: [ NeoJSONReader fromString: '@' ] raise: NeoJSONParseError. - - self should: [ (NeoJSONReader on: '[1,2,3]true' readStream) next; failIfNotAtEnd ] raise: NeoJSONParseError. - self should: [ (NeoJSONReader on: '{"foo":1}"extra"' readStream) next; failIfNotAtEnd ] raise: NeoJSONParseError. - self should: [ (NeoJSONReader on: '[]"extra"' readStream) next; failIfNotAtEnd ] raise: NeoJSONParseError. \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPoint.st b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPoint.st deleted file mode 100644 index 2d33d3f..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPoint.st +++ /dev/null @@ -1,6 +0,0 @@ -testing -testPoint - | reader | - reader := [ :string | - (NeoJSONReader on: string readStream) nextAs: Point ]. - self should: [ reader value: '{"x":1,"y":2}' ] raise: NeoJSONMappingNotFound \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPoint1.st b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPoint1.st deleted file mode 100644 index b60cfe7..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPoint1.st +++ /dev/null @@ -1,11 +0,0 @@ -testing -testPoint1 - | reader | - reader := [ :string | - (NeoJSONReader on: string readStream) - for: Point do: [ :mapping | - mapping mapProperty: 'x' getter: [ :point | point x ] setter: [ :point :value | point setX: value setY: point y ]. - mapping mapProperty: 'y' getter: [ :point | point y ] setter: [ :point :value | point setX: point x setY: value ]. ]; - nextAs: Point ]. - self assert: (reader value: '{"x":1,"y":2}') equals: 1@2. - self assert: (reader value: '{}') equals: Point new \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPoint2.st b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPoint2.st deleted file mode 100644 index a380a63..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPoint2.st +++ /dev/null @@ -1,9 +0,0 @@ -testing -testPoint2 - | reader | - reader := [ :string | - (NeoJSONReader on: string readStream) - mapAllInstVarsFor: Point; - nextAs: Point ]. - self assert: (reader value: '{"x":1,"y":2}') equals: 1@2. - self assert: (reader value: '{}') equals: Point new \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPoint3.st b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPoint3.st deleted file mode 100644 index 5586d33..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPoint3.st +++ /dev/null @@ -1,10 +0,0 @@ -testing -testPoint3 - | reader | - reader := [ :string | - (NeoJSONReader on: string readStream) - for: Point do: [ :mapping | - mapping mapInstVars: #(x y) ]; - nextAs: Point ]. - self assert: (reader value: '{"x":1,"y":2}') equals: 1@2. - self assert: (reader value: '{}') equals: Point new \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPointUsingAsString.st b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPointUsingAsString.st deleted file mode 100644 index 376bd1b..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPointUsingAsString.st +++ /dev/null @@ -1,23 +0,0 @@ -testing -testPointUsingAsString - | point | - point := (NeoJSONReader on: '{"x":"1","y":"2"}' readStream) - for: Point - do: [ :mapping | - (mapping - mapProperty: #x - getter: [ :object | object x ] - setter: [ :object :value | object setX: value setY: object y ]) - valueSchema: #AsString. - (mapping - mapProperty: #y - getter: [ :object | object y ] - setter: [ :object :value | object setX: object x setY: value ]) - valueSchema: #AsString ]; - for: #AsString - customDo: [ :mapping | - mapping - encoder: [ :x | x asString ]; - decoder: [ :x | x asNumber ] ]; - nextAs: Point. - self assert: point equals: 1 @ 2 \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPropertyNamesAsSymbols.st b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPropertyNamesAsSymbols.st deleted file mode 100644 index 35bcb01..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPropertyNamesAsSymbols.st +++ /dev/null @@ -1,11 +0,0 @@ -testing -testPropertyNamesAsSymbols - | json map | - json := '{ "x" : true, "y" : false, "key-1" : 1 }'. - map := (NeoJSONReader on: json readStream) - propertyNamesAsSymbols: true; - next. - self - assert: map - equals: (Dictionary new at: #x put: true; at: #y put: false; at: #'key-1' put: 1; yourself). - self assert: (map keys allSatisfy: [ :each | each isSymbol ]) \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testSmallDictionary.st b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testSmallDictionary.st deleted file mode 100644 index 2b67057..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testSmallDictionary.st +++ /dev/null @@ -1,14 +0,0 @@ -testing -testSmallDictionary - | json map smallDictionaryClass | - json := '{ "x" : true, "y" : false, "key-1" : 1 }'. - smallDictionaryClass := Smalltalk at: #SmallDictionary ifAbsent: [ Dictionary ]. - map := (NeoJSONReader on: json readStream) - mapClass: smallDictionaryClass; - next. - self - assert: map - equals: (smallDictionaryClass new at: 'x' put: true; at: 'y' put: false; at: 'key-1' put: 1; yourself). - self - assert: map class - equals: smallDictionaryClass \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testStrings.st b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testStrings.st deleted file mode 100644 index ce009e2..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testStrings.st +++ /dev/null @@ -1,27 +0,0 @@ -testing -testStrings - | reader | - reader := [ :string | - (NeoJSONReader on: string readStream) next ]. - self assert: (reader value: '"foo"') equals: 'foo'. - self assert: (reader value: '""') equals: ''. - self assert: (reader value: '"Foo BAR"') equals: 'Foo BAR'. - self assert: (reader value: '" foo "') equals: ' foo '. - self assert: (reader value: '"\u00E9l\u00E8ve en Fran\u00E7ais"') equals: 'élève en Français'. - self - assert: (reader value: '"\"\\\/\t\r\n\f\b"') - equals: (String withAll: ( OrderedCollection new - add: $"; - add: $\; - add: $/; - add: Character tab; - add: Character cr; - add: Character lf; - add: Character newPage; - add: Character backspace; - yourself )). - self should: [ reader value: '"open' ] raise: NeoJSONParseError. - self should: [ reader value: '"\uAA"' ] raise: NeoJSONParseError. - self should: [ reader value: '"\uZZ"' ] raise: NeoJSONParseError. - self should: [ reader value: '"\x"' ] raise: NeoJSONParseError. - self should: [ reader value: ' " ' ] raise: NeoJSONParseError. diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testSymbol.st b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testSymbol.st deleted file mode 100644 index ba30f33..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testSymbol.st +++ /dev/null @@ -1,10 +0,0 @@ -testing -testSymbol - | reader | - reader := [ :input | - (NeoJSONReader on: input readStream) - for: Symbol customDo: [ :mapping | - mapping decoder: [ :string | string asSymbol ] ]; - nextAs: Symbol ]. - self assert: (reader value: ' "foo" ') equals: #foo. - self assert: (reader value: ' "FOO-1" ') equals: #'FOO-1' \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testTime.st b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testTime.st deleted file mode 100644 index abb759d..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testTime.st +++ /dev/null @@ -1,9 +0,0 @@ -testing -testTime - | reader | - reader := [ :input | - (NeoJSONReader on: input readStream) - for: Time customDo: [ :mapping | - mapping decoder: [ :string | Time fromString: string ] ]; - nextAs: Time ]. - self assert: (reader value: ' "14:30:08" ') equals: (Time hour: 14 minute: 30 second: 8) \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/methodProperties.json b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/methodProperties.json deleted file mode 100644 index 2c406c9..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/methodProperties.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "instance" : { - "testNull" : "SvenVanCaekenberghe 6/13/2012 14:29", - "testAssociation" : "SvenVanCaekenberghe 6/12/2012 13:18", - "testNonBMPCharacterDecoding" : "marianopeck 1/31/2018 11:58", - "testStrings" : "marianopeck 1/30/2018 13:01", - "testPoint" : "SvenVanCaekenberghe 6/12/2012 15:58", - "testTime" : "SvenVanCaekenberghe 6/12/2012 12:02", - "testNextStringAsHex" : "SvenVanCaekenberghe 3/24/2014 11:58", - "testMaps" : "SvenVanCaekenberghe 6/12/2012 16:16", - "testLists" : "SvenVanCaekenberghe 6/12/2012 16:16", - "testPoint2" : "SvenVanCaekenberghe 6/7/2012 15:23", - "testSmallDictionary" : "marianopeck 2/1/2018 10:07", - "testByteArray" : "SvenVanCaekenberghe 6/12/2012 12:32", - "testIntegers" : "SvenVanCaekenberghe 6/12/2012 16:08", - "testPointUsingAsString" : "SvenVanCaekenberghe 3/24/2014 10:43", - "testArrayOfPointsUsingNextListAs" : "marianopeck 1/30/2018 15:29", - "testDate" : "marianopeck 2/6/2018 09:14", - "testPoint3" : "SvenVanCaekenberghe 6/8/2012 14:04", - "testDateAndTime" : "SvenVanCaekenberghe 6/12/2012 12:02", - "testParseErrors" : "SvenVanCaekenberghe 5/29/2017 11:00", - "testArrayOfPoints" : "marianopeck 1/30/2018 15:28", - "testOrderedCollection" : "SvenVanCaekenberghe 6/13/2012 10:18", - "testPropertyNamesAsSymbols" : "SvenVanCaekenberghe 6/13/2012 10:00", - "testSymbol" : "SvenVanCaekenberghe 6/12/2012 12:02", - "testFloats" : "SvenVanCaekenberghe 6/2/2012 21:49", - "testOrderedCollectionOfPoints" : "marianopeck 1/30/2018 13:04", - "testAllowNil" : "marianopeck 1/30/2018 13:03", - "testPoint1" : "SvenVanCaekenberghe 6/8/2012 14:04", - "testBooleans" : "SvenVanCaekenberghe 6/13/2012 14:44" - }, - "class" : { } -} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/properties.json b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/properties.json deleted file mode 100644 index bd4606c..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/properties.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "commentStamp" : "SvenVanCaekenberghe 6/2/2012 14:02", - "super" : "TestCase", - "category" : "Neo-JSON-Tests", - "classinstvars" : [ ], - "pools" : [ ], - "classvars" : [ ], - "instvars" : [ ], - "name" : "NeoJSONReaderTests", - "type" : "normal" -} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/README.md b/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/README.md deleted file mode 100644 index 2d2aa97..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/README.md +++ /dev/null @@ -1,18 +0,0 @@ -I am NeoJSONTestObject1. - -I repesent a domain model object. -I have the following properties: - -- id -- name -- timestamp -- points -- bytes - -My JSON representation is like this: - -- id -- name -- created-at -- points -- bytes diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/class/example1.st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/class/example1.st deleted file mode 100644 index ac8135f..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/class/example1.st +++ /dev/null @@ -1,9 +0,0 @@ -instance creation -example1 - ^ self new - id: 123; - name: 'Example1'; - timestamp: (DateAndTime year: 2012 month: 06 day: 08 hour: 14 minute: 30 second: 15 offset: 1 hour); - points: (Array with: 1@2 with: 3@4); - bytes: #[ 2 4 6 8 ]; - yourself \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/class/neoJsonMapping..st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/class/neoJsonMapping..st deleted file mode 100644 index b801670..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/class/neoJsonMapping..st +++ /dev/null @@ -1,15 +0,0 @@ -accessing -neoJsonMapping: mapper - mapper for: self do: [ :mapping | - mapping mapInstVars: #(id name). - (mapping mapInstVar: #timestamp to: 'created-at') valueSchema: DateAndTime. - (mapping mapInstVar: #points) valueSchema: #ArrayOfPoints. - (mapping mapInstVar: #bytes) valueSchema: ByteArray ]. - mapper for: DateAndTime customDo: [ :mapping | - mapping decoder: [ :string | DateAndTime fromString: string ]. - mapping encoder: [ :dateAndTime | dateAndTime printString ] ]. - mapper for: #ArrayOfPoints customDo: [ :mapping | - mapping listOfElementSchema: Point ]. - mapper mapAllInstVarsFor: Point. - mapper for: ByteArray customDo: [ :mapping | - mapping listOfType: ByteArray ] \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/^equals.st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/^equals.st deleted file mode 100644 index f36f21f..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/^equals.st +++ /dev/null @@ -1,14 +0,0 @@ -comparing -= anObject - self == anObject - ifTrue: [ ^ true ]. - self class = anObject class - ifFalse: [ ^ false ]. - ^ id = anObject id - and: [ - name = anObject name - and: [ - timestamp = anObject timestamp - and: [ - points = anObject points - and: [ bytes = anObject bytes ] ] ] ] \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/bytes..st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/bytes..st deleted file mode 100644 index fa38a87..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/bytes..st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -bytes: byteArray - bytes := byteArray \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/bytes.st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/bytes.st deleted file mode 100644 index 85d9bfa..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/bytes.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -bytes - ^ bytes \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/hash.st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/hash.st deleted file mode 100644 index c019d80..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/hash.st +++ /dev/null @@ -1,3 +0,0 @@ -comparing -hash - ^ id hash bitXor: (name hash bitXor: (timestamp hash bitXor: (points hash bitXor: bytes hash))) \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/id..st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/id..st deleted file mode 100644 index cda7d0a..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/id..st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -id: integer - id := integer \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/id.st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/id.st deleted file mode 100644 index 41241a3..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/id.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -id - ^ id \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/name..st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/name..st deleted file mode 100644 index 5eff854..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/name..st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -name: string - name := string \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/name.st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/name.st deleted file mode 100644 index 22077c2..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/name.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -name - ^ name \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/points..st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/points..st deleted file mode 100644 index f0bc417..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/points..st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -points: arrayOfPoints - points := arrayOfPoints \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/points.st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/points.st deleted file mode 100644 index 833ea44..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/points.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -points - ^ points \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/timestamp..st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/timestamp..st deleted file mode 100644 index 8f57910..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/timestamp..st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -timestamp: dateAndTime - timestamp := dateAndTime \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/timestamp.st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/timestamp.st deleted file mode 100644 index 98b1f81..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/timestamp.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -timestamp - ^ timestamp \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/methodProperties.json b/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/methodProperties.json deleted file mode 100644 index 32c91c1..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/methodProperties.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "instance" : { - "bytes" : "SvenVanCaekenberghe 6/9/2012 18:03", - "name" : "SvenVanCaekenberghe 6/9/2012 18:02", - "=" : "SvenVanCaekenberghe 6/9/2012 18:45", - "id" : "SvenVanCaekenberghe 6/9/2012 18:02", - "points:" : "SvenVanCaekenberghe 6/9/2012 18:04", - "name:" : "SvenVanCaekenberghe 6/9/2012 18:03", - "timestamp" : "SvenVanCaekenberghe 6/9/2012 18:03", - "timestamp:" : "SvenVanCaekenberghe 6/9/2012 18:03", - "id:" : "SvenVanCaekenberghe 6/9/2012 18:03", - "hash" : "SvenVanCaekenberghe 6/9/2012 18:46", - "points" : "SvenVanCaekenberghe 6/9/2012 18:03", - "bytes:" : "SvenVanCaekenberghe 6/9/2012 18:04" - }, - "class" : { - "example1" : "marianopeck 1/30/2018 13:07", - "neoJsonMapping:" : "SvenVanCaekenberghe 6/12/2012 12:34" - } -} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/properties.json b/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/properties.json deleted file mode 100644 index a3b54f8..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/properties.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "commentStamp" : "", - "super" : "Object", - "category" : "Neo-JSON-Tests", - "classinstvars" : [ ], - "pools" : [ ], - "classvars" : [ ], - "instvars" : [ - "id", - "name", - "timestamp", - "points", - "bytes" - ], - "name" : "NeoJSONTestObject1", - "type" : "normal" -} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/README.md b/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/README.md deleted file mode 100644 index c7a35da..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/README.md +++ /dev/null @@ -1,9 +0,0 @@ -I am NeoJSONTestObject2. - -Instance Variables - data: - height: - id: - width: - -Used for benchmarking and other tests. \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmark..st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmark..st deleted file mode 100644 index abb3c4b..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmark..st +++ /dev/null @@ -1,16 +0,0 @@ -testing -benchmark: count - "self benchmark: 1000" - - | collection json size | - collection := Array new: count withAll: self example1. - size := 2 + (count * (NeoJSONWriter toString: self example1) size) + count - 1. - Transcript - cr; - << ('Serializing {1} objects took ms ' format: (Array with: count) ); - show: [ json := String new: size streamContents: [ :stream | - (NeoJSONWriter on: stream) nextPut: collection ] ] timeToRun. - Transcript - cr; - << ('Deserializing {1} objects took ms ' format: (Array with: count) ); - show: [ NeoJSONReader fromString: json ] timeToRun. \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmark10k.st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmark10k.st deleted file mode 100644 index eca2480..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmark10k.st +++ /dev/null @@ -1,5 +0,0 @@ -testing -benchmark10k - "self benchmark10k" - - self benchmark: 10000 \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmark10kAsDictionary.st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmark10kAsDictionary.st deleted file mode 100644 index 9787721..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmark10kAsDictionary.st +++ /dev/null @@ -1,5 +0,0 @@ -testing -benchmark10kAsDictionary - "self benchmark10kAsDictionary" - - self benchmarkAsDictionary: 10000 \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmark200k.st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmark200k.st deleted file mode 100644 index d9b7964..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmark200k.st +++ /dev/null @@ -1,5 +0,0 @@ -testing -benchmark200k - "self benchmark200k" - - self benchmark: 200000 \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmarkAsDictionary..st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmarkAsDictionary..st deleted file mode 100644 index 38321d7..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmarkAsDictionary..st +++ /dev/null @@ -1,16 +0,0 @@ -testing -benchmarkAsDictionary: count - "self benchmarkAsDictionary: 1000" - - | collection json size | - collection := Array new: count withAll: self example1 asDictionary. - size := 2 + (count * (NeoJSONWriter toString: self example1 asDictionary) size) + count - 1. - Transcript - cr; - << ('Serializing {1} objects took ms ' format: (Array with: count) ); - show: [ json := String new: size streamContents: [ :stream | - (NeoJSONWriter on: stream) nextPut: collection ] ] timeToRun. - Transcript - cr; - << ('Deserializing {1} objects took ms ' format: (Array with: count) ); - show: [ NeoJSONReader fromString: json ] timeToRun. \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/example1.st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/example1.st deleted file mode 100644 index 18024b5..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/example1.st +++ /dev/null @@ -1,8 +0,0 @@ -instance creation -example1 - ^ self new - id: 13; - width: 250; - height: 110; - data: (String new: 512 withAll: $a); - yourself \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/neoJsonMapping..st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/neoJsonMapping..st deleted file mode 100644 index 346fabc..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/neoJsonMapping..st +++ /dev/null @@ -1,7 +0,0 @@ -accessing -neoJsonMapping: mapper - "For inheritance mapping to work, the schema/classname must be self, - but the instance variables have to be enumerated manually per class" - - mapper for: self do: [ :mapping | - mapping mapInstVars: #(id width height data) ] \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/^equals.st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/^equals.st deleted file mode 100644 index 95c56bf..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/^equals.st +++ /dev/null @@ -1,13 +0,0 @@ -comparing -= anObject - self == anObject - ifTrue: [ ^ true ]. - self class = anObject class - ifFalse: [ ^ false ]. - ^ id = anObject id - and: [ - height = anObject height - and: [ - width = anObject width - and: [ - data = anObject data ] ] ] \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/asDictionary.st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/asDictionary.st deleted file mode 100644 index d288817..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/asDictionary.st +++ /dev/null @@ -1,8 +0,0 @@ -converting -asDictionary - ^ Dictionary new - at: #id put: id; - at: #height put: height; - at: #width put: width; - at: #data put: data; - yourself \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/data..st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/data..st deleted file mode 100644 index 6133d52..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/data..st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -data: anObject - data := anObject \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/data.st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/data.st deleted file mode 100644 index 664ff01..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/data.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -data - ^ data \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/hash.st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/hash.st deleted file mode 100644 index 9ce246d..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/hash.st +++ /dev/null @@ -1,3 +0,0 @@ -comparing -hash - ^ id hash bitXor: (width hash bitXor: (height hash bitXor: data hash)) \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/height..st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/height..st deleted file mode 100644 index 0dc7126..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/height..st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -height: anObject - height := anObject \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/height.st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/height.st deleted file mode 100644 index 207725d..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/height.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -height - ^ height \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/id..st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/id..st deleted file mode 100644 index 5561e6d..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/id..st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -id: anObject - id := anObject \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/id.st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/id.st deleted file mode 100644 index 41241a3..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/id.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -id - ^ id \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/width..st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/width..st deleted file mode 100644 index 2748ec2..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/width..st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -width: anObject - width := anObject \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/width.st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/width.st deleted file mode 100644 index a34e755..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/width.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -width - ^ width \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/methodProperties.json b/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/methodProperties.json deleted file mode 100644 index c78be30..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/methodProperties.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "instance" : { - "data" : "SvenVanCaekenberghe 6/10/2012 20:04", - "data:" : "SvenVanCaekenberghe 6/10/2012 20:04", - "width" : "SvenVanCaekenberghe 6/10/2012 20:04", - "=" : "SvenVanCaekenberghe 6/10/2012 20:22", - "asDictionary" : "SvenVanCaekenberghe 6/10/2012 20:47", - "id" : "SvenVanCaekenberghe 6/10/2012 20:04", - "height:" : "SvenVanCaekenberghe 6/10/2012 20:04", - "id:" : "SvenVanCaekenberghe 6/10/2012 20:04", - "width:" : "SvenVanCaekenberghe 6/10/2012 20:04", - "hash" : "SvenVanCaekenberghe 6/10/2012 20:22", - "height" : "SvenVanCaekenberghe 6/10/2012 20:04" - }, - "class" : { - "benchmark10kAsDictionary" : "SvenVanCaekenberghe 6/10/2012 20:54", - "benchmarkAsDictionary:" : "marianopeck 1/30/2018 13:09", - "benchmark200k" : "SvenVanCaekenberghe 6/10/2012 20:54", - "example1" : "SvenVanCaekenberghe 6/10/2012 20:04", - "neoJsonMapping:" : "SvenVanCaekenberghe 3/22/2014 10:50", - "benchmark:" : "marianopeck 1/30/2018 13:09", - "benchmark10k" : "SvenVanCaekenberghe 6/10/2012 20:53" - } -} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/properties.json b/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/properties.json deleted file mode 100644 index ddde91a..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject2.class/properties.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "commentStamp" : "SvenVanCaekenberghe 3/22/2014 09:36", - "super" : "Object", - "category" : "Neo-JSON-Tests", - "classinstvars" : [ ], - "pools" : [ ], - "classvars" : [ ], - "instvars" : [ - "id", - "width", - "height", - "data" - ], - "name" : "NeoJSONTestObject2", - "type" : "normal" -} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/README.md b/repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/README.md deleted file mode 100644 index 05ebb8a..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/README.md +++ /dev/null @@ -1,7 +0,0 @@ -I am NeoJSONTestObject3, a subclass of NeoJSONTestObject2. - -Instance Variables - color: - transparent : - -I am used for inheritance testing. diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/class/example1.st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/class/example1.st deleted file mode 100644 index c9b2f0a..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/class/example1.st +++ /dev/null @@ -1,7 +0,0 @@ -instance creation -example1 - ^ super example1 - data: (String new: 8 withAll: $a); - color: 'red'; - transparent: true; - yourself \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/class/neoJsonMapping..st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/class/neoJsonMapping..st deleted file mode 100644 index e4d74a0..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/class/neoJsonMapping..st +++ /dev/null @@ -1,8 +0,0 @@ -accessing -neoJsonMapping: mapper - "For inheritance mapping to work, the schema/classname must be self, - but the instance variables have to be enumerated manually per class" - - super neoJsonMapping: mapper. - mapper for: self do: [ :mapping | - mapping mapInstVars: #(color transparent) ] \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/^equals.st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/^equals.st deleted file mode 100644 index 27e9c56..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/^equals.st +++ /dev/null @@ -1,5 +0,0 @@ -comparing -= anObject - ^ super = anObject - and: [ color = anObject color - and: [ transparent = anObject transparent ] ] \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/asDictionary.st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/asDictionary.st deleted file mode 100644 index 4be6261..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/asDictionary.st +++ /dev/null @@ -1,6 +0,0 @@ -converting -asDictionary - ^ super asDictionary - at: #color put: color; - at: #transparent put: transparent; - yourself \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/color..st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/color..st deleted file mode 100644 index 5030631..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/color..st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -color: anObject - color := anObject \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/color.st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/color.st deleted file mode 100644 index b4464aa..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/color.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -color - ^ color \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/transparent..st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/transparent..st deleted file mode 100644 index ccdb341..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/transparent..st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -transparent: anObject - transparent := anObject \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/transparent.st b/repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/transparent.st deleted file mode 100644 index 4f76d07..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/transparent.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -transparent - ^ transparent \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/methodProperties.json b/repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/methodProperties.json deleted file mode 100644 index 8f4b867..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/methodProperties.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "instance" : { - "transparent" : "SvenVanCaekenberghe 3/22/2014 09:43", - "=" : "SvenVanCaekenberghe 3/22/2014 09:45", - "color:" : "SvenVanCaekenberghe 3/22/2014 09:43", - "asDictionary" : "SvenVanCaekenberghe 3/22/2014 09:46", - "color" : "SvenVanCaekenberghe 3/22/2014 09:43", - "transparent:" : "SvenVanCaekenberghe 3/22/2014 09:43" - }, - "class" : { - "example1" : "SvenVanCaekenberghe 3/22/2014 09:43", - "neoJsonMapping:" : "SvenVanCaekenberghe 3/22/2014 10:50" - } -} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/properties.json b/repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/properties.json deleted file mode 100644 index a092988..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject3.class/properties.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "commentStamp" : "SvenVanCaekenberghe 3/22/2014 09:40", - "super" : "NeoJSONTestObject2", - "category" : "Neo-JSON-Tests", - "classinstvars" : [ ], - "pools" : [ ], - "classvars" : [ ], - "instvars" : [ - "color", - "transparent" - ], - "name" : "NeoJSONTestObject3", - "type" : "normal" -} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/README.md b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/README.md deleted file mode 100644 index 57e75e2..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/README.md +++ /dev/null @@ -1,27 +0,0 @@ -I am NeoJSONValidation, a set of tests to validate NeoJSON against some external rules. - -Both positive & negative tests are includes. -Some of these are implementation choices. - -http://seriot.ch/parsing_json.php -https://github.com/nst/JSONTestSuite -https://github.com/nst/JSONTestSuite.git - test_parsing - test_transform - -https://github.com/miloyip/nativejson-benchmark -https://github.com/miloyip/nativejson-benchmark.git - data/jsonchecker - data/roundtrip - -This can only be run with the correct setup (checkout/config). - - NeoJSONValidation new runNativeJsonBenchmarkRoundTrip. - NeoJSONValidation new runNativeJsonBenchmarkJsonCheckerPasses. - NeoJSONValidation new runNativeJsonBenchmarkJsonCheckerFailures. - - NeoJSONValidation new runJsonTestSuiteTestParsingPasses. - NeoJSONValidation new runJsonTestSuiteTestParsingFailures. - NeoJSONValidation new runJsonTestSuiteTestParsingInfo. - -Logging goes to a file, neo-json-validation.log \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/closeLog.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/closeLog.st deleted file mode 100644 index 7ceefa9..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/closeLog.st +++ /dev/null @@ -1,8 +0,0 @@ -private -closeLog - logStream ifNotNil: [ - logStream close. - logStream := nil ]. - ^ self logFile exists - ifTrue: [ self logFile contents ] - ifFalse: [ 'log file is empty' ] \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/ensureLog.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/ensureLog.st deleted file mode 100644 index c8241d6..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/ensureLog.st +++ /dev/null @@ -1,6 +0,0 @@ -private -ensureLog - logStream ifNil: [ - logStream := self logFile ensureDelete; writeStream. - logStream setToEnd ] - \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/gitDirectory..st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/gitDirectory..st deleted file mode 100644 index 9325c2d..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/gitDirectory..st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -gitDirectory: fileReference - gitDirectory := fileReference \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/gitDirectory.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/gitDirectory.st deleted file mode 100644 index 34c0c12..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/gitDirectory.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -gitDirectory - ^ gitDirectory ifNil: [ gitDirectory := FileLocator home / #Develop / #git ] \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteDirectory.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteDirectory.st deleted file mode 100644 index e82a99d..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteDirectory.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -jsonTestSuiteDirectory - ^ self gitDirectory / #JSONTestSuite \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingDirectory.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingDirectory.st deleted file mode 100644 index 5a99df0..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingDirectory.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -jsonTestSuiteTestParsingDirectory - ^ self jsonTestSuiteDirectory / 'test_parsing' \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingFailFiles.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingFailFiles.st deleted file mode 100644 index 7f4ef80..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingFailFiles.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -jsonTestSuiteTestParsingFailFiles - ^ self jsonTestSuiteTestParsingDirectory childrenMatching: 'n_*.json' \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingInfoFiles.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingInfoFiles.st deleted file mode 100644 index 64c9fb9..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingInfoFiles.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -jsonTestSuiteTestParsingInfoFiles - ^ self jsonTestSuiteTestParsingDirectory childrenMatching: 'i_*.json' \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingPassFiles.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingPassFiles.st deleted file mode 100644 index 476bb03..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingPassFiles.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -jsonTestSuiteTestParsingPassFiles - ^ self jsonTestSuiteTestParsingDirectory childrenMatching: 'y_*.json' \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestTransformDirectory.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestTransformDirectory.st deleted file mode 100644 index b9a0706..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestTransformDirectory.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -jsonTestSuiteTestTransformDirectory - ^ self jsonTestSuiteDirectory / 'test_transform' \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/log..st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/log..st deleted file mode 100644 index 6b806e5..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/log..st +++ /dev/null @@ -1,4 +0,0 @@ -private -log: message - self ensureLog. - logStream nextPutAll: message; lf; flush diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/logFile.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/logFile.st deleted file mode 100644 index ba58e23..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/logFile.st +++ /dev/null @@ -1,3 +0,0 @@ -private -logFile - ^ 'neo-json-validation.log' asFileReference \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkDataDirectory.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkDataDirectory.st deleted file mode 100644 index 211be52..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkDataDirectory.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -nativeJsonBenchmarkDataDirectory - ^ self nativeJsonBenchmarkDirectory / #data \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkDirectory.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkDirectory.st deleted file mode 100644 index dd17440..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkDirectory.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -nativeJsonBenchmarkDirectory - ^ self gitDirectory / 'nativejson-benchmark' \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkJsonCheckerDirectory.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkJsonCheckerDirectory.st deleted file mode 100644 index 2bdf04c..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkJsonCheckerDirectory.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -nativeJsonBenchmarkJsonCheckerDirectory - ^ self nativeJsonBenchmarkDataDirectory / #jsonchecker \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkJsonCheckerFailFiles.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkJsonCheckerFailFiles.st deleted file mode 100644 index 3b7a188..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkJsonCheckerFailFiles.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -nativeJsonBenchmarkJsonCheckerFailFiles - ^ self nativeJsonBenchmarkJsonCheckerDirectory childrenMatching: 'fail*.json' \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkJsonCheckerPassFiles.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkJsonCheckerPassFiles.st deleted file mode 100644 index c1df699..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkJsonCheckerPassFiles.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -nativeJsonBenchmarkJsonCheckerPassFiles - ^ self nativeJsonBenchmarkJsonCheckerDirectory childrenMatching: 'pass*.json' \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkRoundTripDirectory.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkRoundTripDirectory.st deleted file mode 100644 index 405b93b..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkRoundTripDirectory.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -nativeJsonBenchmarkRoundTripDirectory - ^ self nativeJsonBenchmarkDataDirectory / #roundtrip \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkRoundTripFiles.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkRoundTripFiles.st deleted file mode 100644 index 5029c8e..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkRoundTripFiles.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -nativeJsonBenchmarkRoundTripFiles - ^ self nativeJsonBenchmarkRoundTripDirectory children \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runJsonTestSuiteTestParsingFailures.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runJsonTestSuiteTestParsingFailures.st deleted file mode 100644 index 184c8f7..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runJsonTestSuiteTestParsingFailures.st +++ /dev/null @@ -1,11 +0,0 @@ -running -runJsonTestSuiteTestParsingFailures - ^ self - validateFiles: self jsonTestSuiteTestParsingFailFiles - usingTest: [ :file | - | data success | - success := false. - [ data := file readStreamDo: [ :in | (NeoJSONReader on: in) next; failIfNotAtEnd ] ] - on: NeoJSONParseError - do: [ :exception | self log: exception printString. success := true ]. - success ] \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runJsonTestSuiteTestParsingInfo.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runJsonTestSuiteTestParsingInfo.st deleted file mode 100644 index f8455fb..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runJsonTestSuiteTestParsingInfo.st +++ /dev/null @@ -1,11 +0,0 @@ -running -runJsonTestSuiteTestParsingInfo - ^ self - validateFiles: self jsonTestSuiteTestParsingInfoFiles - usingTest: [ :file | - | data success | - success := true. - [ data := file readStreamDo: [ :in | (NeoJSONReader on: in) next ] ] - on: NeoJSONParseError - do: [ :exception | self log: exception printString. success := false ]. - success ] \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runJsonTestSuiteTestParsingPasses.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runJsonTestSuiteTestParsingPasses.st deleted file mode 100644 index b825c57..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runJsonTestSuiteTestParsingPasses.st +++ /dev/null @@ -1,11 +0,0 @@ -running -runJsonTestSuiteTestParsingPasses - ^ self - validateFiles: self jsonTestSuiteTestParsingPassFiles - usingTest: [ :file | - | data success | - success := true. - [ data := file readStreamDo: [ :in | (NeoJSONReader on: in) next ] ] - on: NeoJSONParseError - do: [ :exception | self log: exception printString. success := false ]. - success ] \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runNativeJsonBenchmarkJsonCheckerFailures.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runNativeJsonBenchmarkJsonCheckerFailures.st deleted file mode 100644 index cf2a3fb..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runNativeJsonBenchmarkJsonCheckerFailures.st +++ /dev/null @@ -1,11 +0,0 @@ -running -runNativeJsonBenchmarkJsonCheckerFailures - ^ self - validateFiles: self nativeJsonBenchmarkJsonCheckerFailFiles - usingTest: [ :file | - | data success | - success := false. - [ data := file readStreamDo: [ :in | (NeoJSONReader on: in) next; failIfNotAtEnd ] ] - on: NeoJSONParseError - do: [ :exception | self log: exception printString. success := true ]. - success ] \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runNativeJsonBenchmarkJsonCheckerPasses.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runNativeJsonBenchmarkJsonCheckerPasses.st deleted file mode 100644 index dd7d42c..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runNativeJsonBenchmarkJsonCheckerPasses.st +++ /dev/null @@ -1,11 +0,0 @@ -running -runNativeJsonBenchmarkJsonCheckerPasses - ^ self - validateFiles: self nativeJsonBenchmarkJsonCheckerPassFiles - usingTest: [ :file | - | data success | - success := true. - [ data := file readStreamDo: [ :in | (NeoJSONReader on: in) next ] ] - on: NeoJSONParseError - do: [ :exception | self log: exception printString. success := false ]. - success ] \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runNativeJsonBenchmarkRoundTrip.st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runNativeJsonBenchmarkRoundTrip.st deleted file mode 100644 index 945a380..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runNativeJsonBenchmarkRoundTrip.st +++ /dev/null @@ -1,9 +0,0 @@ -running -runNativeJsonBenchmarkRoundTrip - ^ self - validateFiles: self nativeJsonBenchmarkRoundTripFiles - usingTest: [ :file | - | data json | - data := file readStreamDo: [ :in | (NeoJSONReader on: in) next ]. - json := NeoJSONWriter toString: data. - json = file contents ] \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/validateFiles.usingTest..st b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/validateFiles.usingTest..st deleted file mode 100644 index 4411f84..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/validateFiles.usingTest..st +++ /dev/null @@ -1,18 +0,0 @@ -private -validateFiles: files usingTest: block - | total succeeded failed | - total := succeeded := failed := 0. - files do: [ :file | - | success | - self log: 'Running ' , file pathString. - self log: ([ file contents contractTo: 64 ] on: Error do: [ :exception | exception printString ]). - success := [ block value: file ] - on: Error - do: [ :exception | self log: ' Errored. ' , exception printString. false ]. - total := total + 1. - success - ifTrue: [ succeeded := succeeded + 1 ] - ifFalse: [ failed := failed + 1 ]. - self log: (success ifTrue: [ ' Succeeded' ] ifFalse: [ ' Failed' ]); log: '' ]. - self log: ('{1} total = {2} succeeded + {3} failed' format: (Array with: total with: succeeded with: failed) ). - ^ self closeLog \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/methodProperties.json b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/methodProperties.json deleted file mode 100644 index c7d1706..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/methodProperties.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "instance" : { - "nativeJsonBenchmarkDirectory" : "SvenVanCaekenberghe 5/28/2017 11:28", - "nativeJsonBenchmarkRoundTripFiles" : "SvenVanCaekenberghe 5/28/2017 11:34", - "jsonTestSuiteTestParsingDirectory" : "SvenVanCaekenberghe 5/28/2017 11:27", - "nativeJsonBenchmarkJsonCheckerDirectory" : "SvenVanCaekenberghe 5/28/2017 11:29", - "gitDirectory:" : "SvenVanCaekenberghe 5/28/2017 11:23", - "jsonTestSuiteTestParsingFailFiles" : "SvenVanCaekenberghe 5/28/2017 13:50", - "runJsonTestSuiteTestParsingPasses" : "SvenVanCaekenberghe 5/29/2017 09:25", - "nativeJsonBenchmarkDataDirectory" : "SvenVanCaekenberghe 5/28/2017 11:28", - "jsonTestSuiteTestParsingPassFiles" : "SvenVanCaekenberghe 5/28/2017 13:50", - "gitDirectory" : "SvenVanCaekenberghe 5/28/2017 11:25", - "ensureLog" : "SvenVanCaekenberghe 5/29/2017 09:27", - "runJsonTestSuiteTestParsingFailures" : "SvenVanCaekenberghe 5/29/2017 09:57", - "closeLog" : "SvenVanCaekenberghe 5/29/2017 09:28", - "runNativeJsonBenchmarkRoundTrip" : "SvenVanCaekenberghe 5/29/2017 09:25", - "logFile" : "SvenVanCaekenberghe 5/29/2017 09:26", - "jsonTestSuiteDirectory" : "SvenVanCaekenberghe 5/28/2017 11:26", - "nativeJsonBenchmarkRoundTripDirectory" : "SvenVanCaekenberghe 5/28/2017 11:29", - "log:" : "SvenVanCaekenberghe 5/29/2017 09:25", - "validateFiles:usingTest:" : "marianopeck 1/30/2018 13:21", - "jsonTestSuiteTestParsingInfoFiles" : "SvenVanCaekenberghe 5/28/2017 13:50", - "jsonTestSuiteTestTransformDirectory" : "SvenVanCaekenberghe 5/28/2017 11:27", - "runNativeJsonBenchmarkJsonCheckerPasses" : "SvenVanCaekenberghe 5/29/2017 09:25", - "nativeJsonBenchmarkJsonCheckerFailFiles" : "SvenVanCaekenberghe 5/28/2017 12:05", - "runJsonTestSuiteTestParsingInfo" : "SvenVanCaekenberghe 5/29/2017 09:25", - "runNativeJsonBenchmarkJsonCheckerFailures" : "SvenVanCaekenberghe 5/29/2017 09:40", - "nativeJsonBenchmarkJsonCheckerPassFiles" : "SvenVanCaekenberghe 5/28/2017 12:05" - }, - "class" : { } -} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/properties.json b/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/properties.json deleted file mode 100644 index e54b230..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONValidation.class/properties.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "commentStamp" : "SvenVanCaekenberghe 5/28/2017 16:40", - "super" : "Object", - "category" : "Neo-JSON-Tests", - "classinstvars" : [ ], - "pools" : [ ], - "classvars" : [ ], - "instvars" : [ - "gitDirectory", - "logStream" - ], - "name" : "NeoJSONValidation", - "type" : "normal" -} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/README.md b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/README.md deleted file mode 100644 index f24c05e..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/README.md +++ /dev/null @@ -1 +0,0 @@ -I am NeoJSONWriteReadAsciiOnlyTests. \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/instance/writeRead..st b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/instance/writeRead..st deleted file mode 100644 index 3b0a09c..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/instance/writeRead..st +++ /dev/null @@ -1,6 +0,0 @@ -private -writeRead: object - | json | - json := String streamContents: [ :stream | - (NeoJSONWriter on: stream) asciiOnly: true; nextPut: object ]. - ^ (NeoJSONReader on: json readStream) next \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/methodProperties.json b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/methodProperties.json deleted file mode 100644 index e1f79d9..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/methodProperties.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "instance" : { - "writeRead:" : "SvenVanCaekenberghe 11/24/2016 10:03" - }, - "class" : { } -} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/properties.json b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/properties.json deleted file mode 100644 index 53a8fe4..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/properties.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "commentStamp" : "SvenVanCaekenberghe 11/24/2016 10:07", - "super" : "NeoJSONWriteReadTests", - "category" : "Neo-JSON-Tests", - "classinstvars" : [ ], - "pools" : [ ], - "classvars" : [ ], - "instvars" : [ ], - "name" : "NeoJSONWriteReadAsciiOnlyTests", - "type" : "normal" -} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadMockStreamTests.class/README.md b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadMockStreamTests.class/README.md deleted file mode 100644 index 4af70f7..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadMockStreamTests.class/README.md +++ /dev/null @@ -1 +0,0 @@ -I am NeoJSONWriteReadMockStreamTests. \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadMockStreamTests.class/instance/writeRead..st b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadMockStreamTests.class/instance/writeRead..st deleted file mode 100644 index 321ddba..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadMockStreamTests.class/instance/writeRead..st +++ /dev/null @@ -1,8 +0,0 @@ -private -writeRead: object - | json | - json := String streamContents: [ :stream | - (NeoJSONWriter on: (NeoJSONMockStream on: stream)) - prettyPrint: true; - nextPut: object ]. - ^ (NeoJSONReader on: (NeoJSONMockStream on: json readStream)) next \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadMockStreamTests.class/methodProperties.json b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadMockStreamTests.class/methodProperties.json deleted file mode 100644 index 2eef100..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadMockStreamTests.class/methodProperties.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "instance" : { - "writeRead:" : "SvenVanCaekenberghe 6/13/2012 16:28" - }, - "class" : { } -} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadMockStreamTests.class/properties.json b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadMockStreamTests.class/properties.json deleted file mode 100644 index 8ac1a7b..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadMockStreamTests.class/properties.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "commentStamp" : "SvenVanCaekenberghe 11/24/2016 10:07", - "super" : "NeoJSONWriteReadTests", - "category" : "Neo-JSON-Tests", - "classinstvars" : [ ], - "pools" : [ ], - "classvars" : [ ], - "instvars" : [ ], - "name" : "NeoJSONWriteReadMockStreamTests", - "type" : "normal" -} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/README.md b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/README.md deleted file mode 100644 index c23e56c..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/README.md +++ /dev/null @@ -1 +0,0 @@ -I am NeoJSONWriteReadPrettyPrintedTests. \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/testDictionaryOfObject2.st b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/testDictionaryOfObject2.st deleted file mode 100644 index 228293d..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/testDictionaryOfObject2.st +++ /dev/null @@ -1,14 +0,0 @@ -testing -testDictionaryOfObject2 - | data json reader | - data := Dictionary new. - data - at: 'one' put: NeoJSONTestObject2 example1; - at: 'two' put: NeoJSONTestObject2 example1. - json := NeoJSONWriter toStringPretty: data. - reader := NeoJSONReader on: json readStream. - reader for: #DictionaryOfObject2 customDo: [ :mapping | - mapping mapWithValueSchema: NeoJSONTestObject2 ]. - self - assert: (reader nextAs: #DictionaryOfObject2) - equals: data \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/testObject1.st b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/testObject1.st deleted file mode 100644 index 714bf15..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/testObject1.st +++ /dev/null @@ -1,7 +0,0 @@ -testing -testObject1 - | json | - json := NeoJSONWriter toStringPretty: NeoJSONTestObject1 example1. - self - assert: (NeoJSONReader fromString: json as: NeoJSONTestObject1) - equals: NeoJSONTestObject1 example1 \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/testObject2.st b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/testObject2.st deleted file mode 100644 index 2e7f041..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/testObject2.st +++ /dev/null @@ -1,7 +0,0 @@ -testing -testObject2 - | json | - json := NeoJSONWriter toStringPretty: NeoJSONTestObject2 example1. - self - assert: (NeoJSONReader fromString: json as: NeoJSONTestObject2) - equals: NeoJSONTestObject2 example1 \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/testObject3.st b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/testObject3.st deleted file mode 100644 index 0fb93f9..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/testObject3.st +++ /dev/null @@ -1,7 +0,0 @@ -testing -testObject3 - | json | - json := NeoJSONWriter toStringPretty: NeoJSONTestObject3 example1. - self - assert: (NeoJSONReader fromString: json as: NeoJSONTestObject3) - equals: NeoJSONTestObject3 example1 \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/writeRead..st b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/writeRead..st deleted file mode 100644 index d653acb..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/writeRead..st +++ /dev/null @@ -1,8 +0,0 @@ -private -writeRead: object - | json | - json := String streamContents: [ :stream | - (NeoJSONWriter on: stream) - prettyPrint: true; - nextPut: object ]. - ^ (NeoJSONReader on: json readStream) next \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/methodProperties.json b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/methodProperties.json deleted file mode 100644 index 5b73cbd..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/methodProperties.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "instance" : { - "testObject2" : "SvenVanCaekenberghe 8/30/2013 11:05", - "testDictionaryOfObject2" : "marianopeck 2/1/2018 09:39", - "writeRead:" : "SvenVanCaekenberghe 6/4/2012 15:45", - "testObject3" : "SvenVanCaekenberghe 3/22/2014 10:59", - "testObject1" : "SvenVanCaekenberghe 6/9/2012 18:49" - }, - "class" : { } -} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/properties.json b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/properties.json deleted file mode 100644 index 39913a2..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/properties.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "commentStamp" : "SvenVanCaekenberghe 6/5/2012 09:50", - "super" : "NeoJSONWriteReadTests", - "category" : "Neo-JSON-Tests", - "classinstvars" : [ ], - "pools" : [ ], - "classvars" : [ ], - "instvars" : [ ], - "name" : "NeoJSONWriteReadPrettyPrintedTests", - "type" : "normal" -} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/README.md b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/README.md deleted file mode 100644 index 9de032f..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/README.md +++ /dev/null @@ -1 +0,0 @@ -I am NeoJSONWriteReadTests. \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testDictionaryOfObject2.st b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testDictionaryOfObject2.st deleted file mode 100644 index 822240f..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testDictionaryOfObject2.st +++ /dev/null @@ -1,14 +0,0 @@ -testing -testDictionaryOfObject2 - | data json reader | - data := Dictionary new. - data - at: 'one' put: NeoJSONTestObject2 example1; - at: 'two' put: NeoJSONTestObject2 example1. - json := NeoJSONWriter toString: data. - reader := NeoJSONReader on: json readStream. - reader for: #DictionaryOfObject2 customDo: [ :mapping | - mapping mapWithValueSchema: NeoJSONTestObject2 ]. - self - assert: (reader nextAs: #DictionaryOfObject2) - equals: data \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testFloats.st b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testFloats.st deleted file mode 100644 index 1143b92..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testFloats.st +++ /dev/null @@ -1,7 +0,0 @@ -testing -testFloats - | objects | - objects := OrderedCollection new add: Float pi; add: 1.0; add: -1.0; add: 0.0; add: 1.5e6; add: -1.5e6; add: 1.5e-6; add: -1.5e-6; yourself. - (self writeRead: objects) - with: objects - do: [ :first :second | self assert: (first closeTo: second) ] \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testIntegers.st b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testIntegers.st deleted file mode 100644 index 48d1824..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testIntegers.st +++ /dev/null @@ -1,7 +0,0 @@ -testing -testIntegers - | objects | - objects := Array with: 1 with: -1 with: 0 with: 123467890 with: -1234567890. - self - assert: (self writeRead: objects) - equals: objects \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testLists.st b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testLists.st deleted file mode 100644 index 8018686..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testLists.st +++ /dev/null @@ -1,7 +0,0 @@ -testing -testLists - | objects | - objects := Array with: #(1 2 3) with: #() with: #( 'foo' 'bar'). - self - assert: (self writeRead: objects) - equals: objects \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testMaps.st b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testMaps.st deleted file mode 100644 index 41b6c5d..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testMaps.st +++ /dev/null @@ -1,10 +0,0 @@ -testing -testMaps - | objects | - objects := Array - with: Dictionary new - with: (Dictionary with: 'x' -> 1) - with: (Dictionary newFromPairs: #( 'foo' true 'bar' false 'zero' 0 'null' nil 'string' 'Hello World!' )). - self - assert: (self writeRead: objects) - equals: objects \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testObject1.st b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testObject1.st deleted file mode 100644 index f71ba0e..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testObject1.st +++ /dev/null @@ -1,7 +0,0 @@ -testing -testObject1 - | json | - json := NeoJSONWriter toString: NeoJSONTestObject1 example1. - self - assert: (NeoJSONReader fromString: json as: NeoJSONTestObject1) - equals: NeoJSONTestObject1 example1 \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testObject2.st b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testObject2.st deleted file mode 100644 index aa42f7b..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testObject2.st +++ /dev/null @@ -1,7 +0,0 @@ -testing -testObject2 - | json | - json := NeoJSONWriter toString: NeoJSONTestObject2 example1. - self - assert: (NeoJSONReader fromString: json as: NeoJSONTestObject2) - equals: NeoJSONTestObject2 example1 \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testObject3.st b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testObject3.st deleted file mode 100644 index 8c93100..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testObject3.st +++ /dev/null @@ -1,7 +0,0 @@ -testing -testObject3 - | json | - json := NeoJSONWriter toString: NeoJSONTestObject3 example1. - self - assert: (NeoJSONReader fromString: json as: NeoJSONTestObject3) - equals: NeoJSONTestObject3 example1 \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testSpecials.st b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testSpecials.st deleted file mode 100644 index 251ed3d..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testSpecials.st +++ /dev/null @@ -1,7 +0,0 @@ -testing -testSpecials - | objects | - objects := Array with: true with: false with: nil. - self - assert: (self writeRead: objects) - equals: objects \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testStrings.st b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testStrings.st deleted file mode 100644 index 6ebeaff..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testStrings.st +++ /dev/null @@ -1,12 +0,0 @@ -testing -testStrings - | objects | - objects := OrderedCollection new - add: 'foo'; add: 'Foo BAR'; add: ''; add: ' \\'''; - add: 'élève en Français'; - add: (Character codePoint: 12354) asString; "HIRAGANA LETTER A" - yourself; - asArray. - self - assert: (self writeRead: objects) - equals: objects \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/writeRead..st b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/writeRead..st deleted file mode 100644 index d797887..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/writeRead..st +++ /dev/null @@ -1,6 +0,0 @@ -private -writeRead: object - | json | - json := String streamContents: [ :stream | - (NeoJSONWriter on: stream) nextPut: object ]. - ^ (NeoJSONReader on: json readStream) next \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/methodProperties.json b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/methodProperties.json deleted file mode 100644 index 1fa0562..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/methodProperties.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "instance" : { - "writeRead:" : "SvenVanCaekenberghe 6/4/2012 15:36", - "testObject2" : "SvenVanCaekenberghe 8/30/2013 10:12", - "testDictionaryOfObject2" : "marianopeck 2/1/2018 09:39", - "testFloats" : "marianopeck 1/30/2018 13:16", - "testSpecials" : "marianopeck 1/30/2018 13:20", - "testIntegers" : "marianopeck 1/30/2018 13:17", - "testObject1" : "SvenVanCaekenberghe 6/9/2012 18:48", - "testStrings" : "marianopeck 1/31/2018 12:00", - "testMaps" : "marianopeck 1/30/2018 13:19", - "testObject3" : "SvenVanCaekenberghe 3/22/2014 10:14", - "testLists" : "marianopeck 1/30/2018 13:18" - }, - "class" : { } -} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/properties.json b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/properties.json deleted file mode 100644 index 2703c60..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/properties.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "commentStamp" : "SvenVanCaekenberghe 6/4/2012 15:34", - "super" : "TestCase", - "category" : "Neo-JSON-Tests", - "classinstvars" : [ ], - "pools" : [ ], - "classvars" : [ ], - "instvars" : [ ], - "name" : "NeoJSONWriteReadTests", - "type" : "normal" -} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/README.md b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/README.md deleted file mode 100644 index a9f43f3..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/README.md +++ /dev/null @@ -1 +0,0 @@ -I am NeoJSONWriterTests, a test suite for NeoJSONWriter. \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testAsciiOnlyStrings.st b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testAsciiOnlyStrings.st deleted file mode 100644 index c3ca857..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testAsciiOnlyStrings.st +++ /dev/null @@ -1,25 +0,0 @@ -testing -testAsciiOnlyStrings - | writer | - writer := [ :object | - String streamContents: [ :stream | - (NeoJSONWriter on: stream) - asciiOnly: true; - nextPut: object ] ]. - self assert: (writer value: 'élève français') equals: '"\u00E9l\u00E8ve fran\u00E7ais"'. - self assert: (writer value: 'foo') equals: '"foo"'. - self assert: (writer value: 'Foo BAR') equals: '"Foo BAR"'. - self assert: (writer value: '') equals: '""'. - self - assert: (writer value: (String withAll: ( OrderedCollection new - add: $"; - add: $\; - add: $/; - add: Character tab; - add: Character cr; - add: Character lf; - add: Character newPage; - add: Character backspace; - yourself ))) - equals: '"\"\\/\t\r\n\f\b"' - diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testAssociation.st b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testAssociation.st deleted file mode 100644 index ecdeab6..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testAssociation.st +++ /dev/null @@ -1,11 +0,0 @@ -testing -testAssociation - | writer | - writer := [ :object | - String streamContents: [ :stream | - (NeoJSONWriter on: stream) - for: Association do: [ :mapping | - mapping mapAccessors: #(key value) ]; - nextPut: object ] ]. - self assert: (writer value: 'foo' -> 42) equals: '{"key":"foo","value":42}'. - self assert: (writer value: Association new) equals: '{}' \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testBooleans.st b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testBooleans.st deleted file mode 100644 index bfa4647..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testBooleans.st +++ /dev/null @@ -1,8 +0,0 @@ -testing -testBooleans - | writer | - writer := [ :object | - String streamContents: [ :stream | - (NeoJSONWriter on: stream) nextPut: object ] ]. - self assert: (writer value: true) equals: 'true'. - self assert: (writer value: false) equals: 'false'. \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testByteArray.st b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testByteArray.st deleted file mode 100644 index b9e2f7e..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testByteArray.st +++ /dev/null @@ -1,8 +0,0 @@ -testing -testByteArray - | writer | - writer := [ :object | - String streamContents: [ :stream | - (NeoJSONWriter on: stream) nextPut: object ] ]. - self assert: (writer value: #[1 2 3]) equals: '[1,2,3]'. - self assert: (writer value: #[]) equals: '[]' diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testDate.st b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testDate.st deleted file mode 100644 index c2b810c..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testDate.st +++ /dev/null @@ -1,10 +0,0 @@ -testing -testDate - | writer | - writer := [ :object | - String streamContents: [ :stream | - (NeoJSONWriter on: stream) - for: Date customDo: [ :mapping | - mapping encoder: [ :date | date yyyymmdd ] ]; - nextPut: object ] ]. - self assert: (writer value: (Date fromString: '2012-06-08')) equals: '"2012-06-08"' \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testDateAndTime.st b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testDateAndTime.st deleted file mode 100644 index 9ba04ea..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testDateAndTime.st +++ /dev/null @@ -1,12 +0,0 @@ -testing -testDateAndTime - | writer | - writer := [ :object | - String streamContents: [ :stream | - (NeoJSONWriter on: stream) - for: DateAndTime customDo: [ :mapping | - mapping encoder: [ :dateAndTime | dateAndTime printString ] ]; - nextPut: object ] ]. - self - assert: (writer value: (DateAndTime year: 2012 month: 2 day: 14 hour: 16 minute: 40 second: 18 offset: 1 hour)) - equals: '"2012-02-14T16:40:18+01:00"' \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testFloats.st b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testFloats.st deleted file mode 100644 index 74d0576..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testFloats.st +++ /dev/null @@ -1,9 +0,0 @@ -testing -testFloats - | writer | - writer := [ :object | - String streamContents: [ :stream | - (NeoJSONWriter on: stream) nextPut: object ] ]. - self assert: (writer value: 123.0) equals: '123.0'. - self assert: (writer value: -123.0) equals: '-123.0'. - self assert: (writer value: 0.0) equals: '0.0'. \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testIntegers.st b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testIntegers.st deleted file mode 100644 index e939d11..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testIntegers.st +++ /dev/null @@ -1,9 +0,0 @@ -testing -testIntegers - | writer | - writer := [ :object | - String streamContents: [ :stream | - (NeoJSONWriter on: stream) nextPut: object ] ]. - self assert: (writer value: 123) equals: '123'. - self assert: (writer value: -123) equals: '-123'. - self assert: (writer value: 0) equals: '0'. \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testLists.st b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testLists.st deleted file mode 100644 index 44f6b40..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testLists.st +++ /dev/null @@ -1,8 +0,0 @@ -testing -testLists - | writer | - writer := [ :object | - String streamContents: [ :stream | - (NeoJSONWriter on: stream) nextPut: object ] ]. - self assert: (writer value: #(1 2 3)) equals: '[1,2,3]'. - self assert: (writer value: #()) equals: '[]'. diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testListsExtra.st b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testListsExtra.st deleted file mode 100644 index 6543c1b..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testListsExtra.st +++ /dev/null @@ -1,10 +0,0 @@ -testing -testListsExtra - | writer | - writer := [ :object | - String streamContents: [ :stream | - (NeoJSONWriter on: stream) nextPut: object ] ]. - #( OrderedCollection LinkedList ByteArray IntegerArray SortedCollection ) do: [ :each | - Smalltalk at: each ifPresent: [ :collectionClass | - self assert: (writer value: (collectionClass withAll: #(1 2 3))) equals: '[1,2,3]'. - self assert: (writer value: collectionClass new) equals: '[]' ] ] diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testMaps.st b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testMaps.st deleted file mode 100644 index 5207baf..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testMaps.st +++ /dev/null @@ -1,9 +0,0 @@ -testing -testMaps - | writer | - writer := [ :object | - String streamContents: [ :stream | - (NeoJSONWriter on: stream) nextPut: object ] ]. - self assert: ((writer value: (Dictionary newFromPairs: #( 'x' 1 'y' 2))) includesSubstring: '"x":1'). - self assert: ((writer value: (Dictionary newFromPairs: #( 'x' 1 'y' 2))) includesSubstring: '"y":2'). - self assert: (writer value: Dictionary new) equals: '{}'. diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testMapsExtra.st b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testMapsExtra.st deleted file mode 100644 index 1a931b3..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testMapsExtra.st +++ /dev/null @@ -1,14 +0,0 @@ -testing -testMapsExtra - | writer | - writer := [ :object | - String streamContents: [ :stream | - (NeoJSONWriter on: stream) nextPut: object ] ]. - self assert: (writer value: (IdentityDictionary newFromPairs: #( 'x' 1))) equals: '{"x":1}'. - self assert: (writer value: IdentityDictionary new) equals: '{}'. - #( SmallDictionary OrderedDictionary OrderedIdentityDictionary ) do: [ :each | - | dictionaryClass | - dictionaryClass := Smalltalk at: each ifAbsent: [ nil ]. - dictionaryClass ifNotNil: [ - self assert: (writer value: (dictionaryClass new at: 'x' put: 1; at: 'y' put: 2; yourself)) equals: '{"x":1,"y":2}'. - self assert: (writer value: dictionaryClass new) equals: '{}'] ] diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testNextPutStringAsHex.st b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testNextPutStringAsHex.st deleted file mode 100644 index 848a321..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testNextPutStringAsHex.st +++ /dev/null @@ -1,13 +0,0 @@ -testing -testNextPutStringAsHex - | output | - output := String - streamContents: [ :out | - (NeoJSONWriter on: out) - for: #StringAsHex - customDo: [ :mapping | - mapping - encoder: [ :x | x asByteArray hex asUppercase ]; - decoder: [ :x | (ByteArray readHexFrom: x) asString ] ]; - nextPut: 'Foo bar!' as: #StringAsHex ]. - self assert: output equals: '"466F6F2062617221"' \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testNonBMPCharacterEncoding.st b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testNonBMPCharacterEncoding.st deleted file mode 100644 index 5a5990d..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testNonBMPCharacterEncoding.st +++ /dev/null @@ -1,9 +0,0 @@ -testing -testNonBMPCharacterEncoding - "Characters not in the Basic Multilingual Plane are encoded as a UTF-16 surrogate pair" - - | string json | - string := 16r1D11E asCharacter asString. "MUSICAL SYMBOL G CLEF" - json := String streamContents: [ :out | - (NeoJSONWriter on: out) asciiOnly: true; nextPut: string ]. - self assert: json equals: '"\uD834\uDD1E"' \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testNull.st b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testNull.st deleted file mode 100644 index e245a75..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testNull.st +++ /dev/null @@ -1,7 +0,0 @@ -testing -testNull - | writer | - writer := [ :object | - String streamContents: [ :stream | - (NeoJSONWriter on: stream) nextPut: object ] ]. - self assert: (writer value: nil) equals: 'null' \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPoint.st b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPoint.st deleted file mode 100644 index 7e034cb..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPoint.st +++ /dev/null @@ -1,7 +0,0 @@ -testing -testPoint - | writer | - writer := [ :object | - String streamContents: [ :stream | - (NeoJSONWriter on: stream) nextPut: object ] ]. - self should: [ writer value: 1@2 ] raise: NeoJSONMappingNotFound \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPoint1.st b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPoint1.st deleted file mode 100644 index 999b742..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPoint1.st +++ /dev/null @@ -1,12 +0,0 @@ -testing -testPoint1 - | writer | - writer := [ :object | - String streamContents: [ :stream | - (NeoJSONWriter on: stream) - for: Point do: [ :mapping | - mapping mapProperty: 'x' getter: [ :point | point x ] setter: [ :point :value | point x: value ]. - mapping mapProperty: 'y' getter: [ :point | point y ] setter: [ :point :value | point y: value ]. ]; - nextPut: object ] ]. - self assert: (writer value: 1@2) equals: '{"x":1,"y":2}'. - self assert: (writer value: Point new) equals: '{}' \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPoint2.st b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPoint2.st deleted file mode 100644 index a95f303..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPoint2.st +++ /dev/null @@ -1,10 +0,0 @@ -testing -testPoint2 - | writer | - writer := [ :object | - String streamContents: [ :stream | - (NeoJSONWriter on: stream) - mapAllInstVarsFor: Point; - nextPut: object ] ]. - self assert: (writer value: 1@2) equals: '{"x":1,"y":2}'. - self assert: (writer value: Point new) equals: '{}' \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPoint3.st b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPoint3.st deleted file mode 100644 index 092cc14..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPoint3.st +++ /dev/null @@ -1,11 +0,0 @@ -testing -testPoint3 - | writer | - writer := [ :object | - String streamContents: [ :stream | - (NeoJSONWriter on: stream) - for: Point do: [ :mapping | - mapping mapInstVars: #(x y) ]; - nextPut: object ] ]. - self assert: (writer value: 1@2) equals: '{"x":1,"y":2}'. - self assert: (writer value: Point new) equals: '{}' \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPointUsingAsString.st b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPointUsingAsString.st deleted file mode 100644 index dc45640..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPointUsingAsString.st +++ /dev/null @@ -1,25 +0,0 @@ -testing -testPointUsingAsString - | output | - output := String - streamContents: [ :out | - (NeoJSONWriter on: out) - for: Point - do: [ :mapping | - (mapping - mapProperty: #x - getter: [ :object | object x ] - setter: [ :object :value | object setX: value setY: object y ]) - valueSchema: #AsString. - (mapping - mapProperty: #y - getter: [ :object | object y ] - setter: [ :object :value | object setX: object x setY: value ]) - valueSchema: #AsString ]; - for: #AsString - customDo: [ :mapping | - mapping - encoder: [ :x | x asString ]; - decoder: [ :x | x asNumber ] ]; - nextPut: 1 @ 2 ]. - self assert: output equals: '{"x":"1","y":"2"}' \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPointWriteNil.st b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPointWriteNil.st deleted file mode 100644 index de64211..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPointWriteNil.st +++ /dev/null @@ -1,11 +0,0 @@ -testing -testPointWriteNil - | writer | - writer := [ :object | - String streamContents: [ :stream | - (NeoJSONWriter on: stream) - writeNil: true; - mapAllInstVarsFor: Point; - nextPut: object ] ]. - self assert: (writer value: 1@2) equals: '{"x":1,"y":2}'. - self assert: (writer value: Point new) equals: '{"x":null,"y":null}' \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPreservePropertyOrder.st b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPreservePropertyOrder.st deleted file mode 100644 index 42d5bb9..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPreservePropertyOrder.st +++ /dev/null @@ -1,26 +0,0 @@ -testing -testPreservePropertyOrder - | writer testObject | - (testObject := NeoJSONTestObject2 new) - id: 123; - width: 100; - height: 50; - data: 'test'. - writer := [ :object | - String streamContents: [ :stream | - (NeoJSONWriter on: stream) - for: NeoJSONTestObject2 do: [ :mapping | mapping mapInstVars: #(id width height data) ]; - nextPut: object ] ]. - self assert: (writer value: testObject) equals: '{"id":123,"width":100,"height":50,"data":"test"}'. - writer := [ :object | - String streamContents: [ :stream | - (NeoJSONWriter on: stream) - for: NeoJSONTestObject2 do: [ :mapping | mapping mapInstVars: #(width height data id) ]; - nextPut: object ] ]. - self assert: (writer value: testObject) equals: '{"width":100,"height":50,"data":"test","id":123}'. - writer := [ :object | - String streamContents: [ :stream | - (NeoJSONWriter on: stream) - for: NeoJSONTestObject2 do: [ :mapping | mapping mapInstVars: #(data id height width) ]; - nextPut: object ] ]. - self assert: (writer value: testObject) equals: '{"data":"test","id":123,"height":50,"width":100}'. diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testStrings.st b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testStrings.st deleted file mode 100644 index 051223e..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testStrings.st +++ /dev/null @@ -1,23 +0,0 @@ -testing -testStrings - | writer | - writer := [ :object | - String streamContents: [ :stream | - (NeoJSONWriter on: stream) nextPut: object ] ]. - self assert: (writer value: 'foo') equals: '"foo"'. - self assert: (writer value: 'Foo BAR') equals: '"Foo BAR"'. - self assert: (writer value: '') equals: '""'. - self - assert: (writer value: (String withAll: ( OrderedCollection new - add: $"; - add: $\; - add: $/; - add: Character tab; - add: Character cr; - add: Character lf; - add: Character newPage; - add: Character backspace; - yourself ))) - equals: '"\"\\/\t\r\n\f\b"' - - diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testSymbol.st b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testSymbol.st deleted file mode 100644 index b8c038c..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testSymbol.st +++ /dev/null @@ -1,8 +0,0 @@ -testing -testSymbol - | writer | - writer := [ :object | - String streamContents: [ :stream | - (NeoJSONWriter on: stream) nextPut: object ] ]. - self assert: (writer value: #foo) equals: '"foo"'. - self assert: (writer value: #'FOO-1') equals: '"FOO-1"' diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testTime.st b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testTime.st deleted file mode 100644 index 18da0ce..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testTime.st +++ /dev/null @@ -1,10 +0,0 @@ -testing -testTime - | writer | - writer := [ :object | - String streamContents: [ :stream | - (NeoJSONWriter on: stream) - for: Time customDo: [ :mapping | - mapping encoder: [ :time | time printString ] ]; - nextPut: object ] ]. - self assert: ((writer value: (Time fromSeconds: 52208)) includesSubstring: '2:30:08') \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/methodProperties.json b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/methodProperties.json deleted file mode 100644 index b6cbc05..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/methodProperties.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "instance" : { - "testNull" : "SvenVanCaekenberghe 6/2/2012 22:23", - "testAssociation" : "SvenVanCaekenberghe 6/12/2012 13:19", - "testStrings" : "marianopeck 1/30/2018 13:00", - "testPoint" : "SvenVanCaekenberghe 6/12/2012 15:58", - "testTime" : "marianopeck 2/6/2018 08:37", - "testListsExtra" : "SvenVanCaekenberghe 9/4/2015 14:02", - "testPoint2" : "SvenVanCaekenberghe 6/6/2012 17:29", - "testMaps" : "marianopeck 2/6/2018 08:37", - "testLists" : "SvenVanCaekenberghe 6/3/2012 19:39", - "testByteArray" : "SvenVanCaekenberghe 6/8/2012 21:54", - "testIntegers" : "SvenVanCaekenberghe 6/2/2012 22:24", - "testPointUsingAsString" : "SvenVanCaekenberghe 3/24/2014 10:41", - "testMapsExtra" : "SvenVanCaekenberghe 8/26/2015 14:05", - "testDate" : "marianopeck 2/6/2018 09:14", - "testPoint3" : "SvenVanCaekenberghe 6/8/2012 14:04", - "testDateAndTime" : "SvenVanCaekenberghe 6/12/2012 12:02", - "testAsciiOnlyStrings" : "marianopeck 1/30/2018 12:59", - "testPointWriteNil" : "SvenVanCaekenberghe 5/28/2014 20:49", - "testPreservePropertyOrder" : "SvenVanCaekenberghe 7/1/2016 23:50", - "testSymbol" : "SvenVanCaekenberghe 6/8/2012 21:56", - "testFloats" : "SvenVanCaekenberghe 6/2/2012 22:24", - "testPoint1" : "SvenVanCaekenberghe 6/8/2012 14:04", - "testNonBMPCharacterEncoding" : "marianopeck 1/31/2018 12:00", - "testNextPutStringAsHex" : "SvenVanCaekenberghe 3/24/2014 11:57", - "testBooleans" : "SvenVanCaekenberghe 6/3/2012 19:56" - }, - "class" : { } -} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/properties.json b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/properties.json deleted file mode 100644 index 8ab6465..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/properties.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "commentStamp" : "SvenVanCaekenberghe 6/2/2012 22:20", - "super" : "TestCase", - "category" : "Neo-JSON-Tests", - "classinstvars" : [ ], - "pools" : [ ], - "classvars" : [ ], - "instvars" : [ ], - "name" : "NeoJSONWriterTests", - "type" : "normal" -} \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/monticello.meta/categories.st b/repository/Neo-JSON-Tests.package/monticello.meta/categories.st deleted file mode 100644 index dbd3e6b..0000000 --- a/repository/Neo-JSON-Tests.package/monticello.meta/categories.st +++ /dev/null @@ -1 +0,0 @@ -SystemOrganization addCategory: #'Neo-JSON-Tests'! diff --git a/repository/Neo-JSON-Tests.package/monticello.meta/initializers.st b/repository/Neo-JSON-Tests.package/monticello.meta/initializers.st deleted file mode 100644 index e69de29..0000000 diff --git a/repository/Neo-JSON-Tests.package/monticello.meta/package b/repository/Neo-JSON-Tests.package/monticello.meta/package deleted file mode 100644 index 4b538f4..0000000 --- a/repository/Neo-JSON-Tests.package/monticello.meta/package +++ /dev/null @@ -1 +0,0 @@ -(name 'Neo-JSON-Tests') \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/monticello.meta/version b/repository/Neo-JSON-Tests.package/monticello.meta/version deleted file mode 100644 index bd1aef6..0000000 --- a/repository/Neo-JSON-Tests.package/monticello.meta/version +++ /dev/null @@ -1 +0,0 @@ -(name 'Neo-JSON-Tests-SvenVanCaekenberghe.57' message 'Always store #propertyName in NeoJSONPropertyMapping as Symbol. Use this invariant in NeoJSONObjectMapping, specifically in #propertyNamed:ifAbsent: #mapProperty:getter:setter: and #mapInstVar:to: to minimize the number of conversions needed. Add NeoJSONMappingTests>>#testSymbolOrStringInstVarMapping to make sure both String and Symbols are allowed as instance variable mapping specification. ' id '79e38d9e-ef20-0d00-9ccc-cbcc050dd8ac' date '6 February 2018' time '5:43:46.61041 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-marianopeck.56' message '* Remove Date newDay:monthIndex:year: and change tests to use #fromString: ' id '65e5b4e8-eb20-0d00-8086-e9a707903797' date '6 February 2018' time '9:18:10.811451 am' author 'marianopeck' ancestors ((name 'Neo-JSON-Tests-marianopeck.55' message '* Avoid the #includesSubString: and provide another approach so that includesSubstring: can work with Pharo and VAST. Also fixed the tests calling it. ' id '35f1027c-eb20-0d00-8083-065407903797' date '6 February 2018' time '8:47:47.209719 am' author 'marianopeck' ancestors ((name 'Neo-JSON-Tests-marianopeck.54' message 'Small fix on testTime' id 'e9eb9823-a120-0d00-975f-dbf9011ccac0' date '2 February 2018' time '4:05:56.286689 pm' author 'marianopeck' ancestors ((name 'Neo-JSON-Tests-marianopeck.53' message 'Small fix' id '45f5f033-a020-0d00-8fbe-0abe081b95f3' date '2 February 2018' time '2:58:55.524553 pm' author 'marianopeck' ancestors ((name 'Neo-JSON-Tests-marianopeck.52' message 'Another small fix in String vs Symbol in tests ' id 'd56601b5-8720-0d00-bd6a-90ea0307cbab' date '1 February 2018' time '9:45:26.680488 am' author 'marianopeck' ancestors ((name 'Neo-JSON-Tests-marianopeck.51' message '* Use newDay: monthIndex: year: * Fix testMaps to not depend on the order of the keys. ' id '86f604c6-7920-0d00-bd69-b93d0307cbab' date '31 January 2018' time '5:08:02.584466 pm' author 'marianopeck' ancestors ((name 'Neo-JSON-Tests-marianopeck.50' message '* replace a few `String with: aCharacter` with `aCharacter asString`. ' id '9305ea94-7520-0d00-bd5f-108c0307cbab' date '31 January 2018' time '12:07:58.866052 pm' author 'marianopeck' ancestors ((name 'Neo-JSON-Tests-marianopeck.49' message '* Use `NeoJSONObject newFrom:` rather than `as: NeoJSONObject` (for portability) ' id '5c89d821-7520-0d00-bd5c-b5ba0307cbab' date '31 January 2018' time '11:35:48.341463 am' author 'marianopeck' ancestors ((name 'Neo-JSON-Tests-marianopeck.48' message 'testDynamicTyping should deal either with strings or symbols and compare that' id 'bf651420-7320-0d00-be54-9644006b589b' date '31 January 2018' time '9:12:08.774329 am' author 'marianopeck' ancestors ((name 'Neo-JSON-Tests-marianopeck.47' message 'One more Array {} issue' id 'dc417b5e-6820-0d00-be51-7b8c006b589b' date '30 January 2018' time '8:22:11.062475 pm' author 'marianopeck' ancestors ((name 'Neo-JSON-Tests-marianopeck.46' message 'Some more Array {} replacements' id '6d8b8a4a-6420-0d00-be50-de64006b589b' date '30 January 2018' time '3:30:16.650938 pm' author 'marianopeck' ancestors ((name 'Neo-JSON-Tests-marianopeck.45' message 'Do not use {} for building arrays as that is not cross platform. Instead either use Array with:with:... or OrederedCollection new add:..;add:..;yourself when the collection is bigger than 6 elements. ' id 'e0276090-6220-0d00-be4f-4918006b589b' date '30 January 2018' time '1:26:38.343347 pm' author 'marianopeck' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.44' message 'Fix the NeoJSONWriter>>#writeNil: true option by adding a short circuit to NeoJSONWriter>>nextPut:as: (as reported by Juraj Kubelka) Add #testRectanglePointsWithNil' id '35acdd9b-431a-0d00-850f-878405ce5378' date '13 November 2017' time '6:59:37.365898 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.43' message 'Add #testVirtualTransferObject as another mapping example' id 'f40af758-7816-0d00-89cd-641e08d6220e' date '26 September 2017' time '2:14:01.71055 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.42' message 'merge' id '4803eec7-7716-0d00-beba-4df304c5ff7e' date '26 September 2017' time '1:33:28.422456 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.41' message 'Implement some missing code in NeoJSONCustomMapping (the writing part of #listOfElementSchema: #listOfType:andElementSchema: #mapWithValueSchema:) Add NeoJSONStreamingWriter>>#writeElementAs: Add NeoJSONMappingTests>>#testDynamicTyping as an example' id 'a9a900e0-2816-0d00-a04d-a6fb0e598362' date '22 September 2017' time '3:25:09.881494 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.39' message 'Improve error handling and compliance. Added NeoJSONValidation that uses some external positive/negative specifications Added NeoJSONReader>>#failIfNotAtEnd to optionally force correct end of input parsing and catch extraneous input Improve NeoJSONReader>>#parseCharacter error reporting in case of incomplete escapes Improve NeoJSONReader>>#parseListDo: & #parseMapDo: error reporting NeoJSONReader>>#parseNumberExponent (1) add error for missing exponents (2) add errors for too large & too small exponents versus Float limits' id 'bb2a9e2c-080d-0d00-a714-e48a0189d909' date '29 May 2017' time '11:37:36.701381 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.38' message 'Add NeoJSONObject>>#atPath: and #atPath:put: Add NeoJSONObjectTests>>#testAtPath and #testAtPathPut' id '73623f7f-740a-0d00-b51b-f4000088e41c' date '26 April 2017' time '4:36:04.583272 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.37' message 'Fix a bug where initial whitespace when reading a string was consumed (thx Max Leske) Add a regression case to NeoJSONReaderTests>>#testStrings' id 'f000b8c5-c106-0d00-9801-41dd0c8d4a06' date '10 March 2017' time '2:06:52.864035 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.36' message 'merge some tests that got lost' id '1ccee649-76ed-4112-b4c0-d8cf21cafc6e' date '2 February 2017' time '1:49:23.579466 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.35' message 'Bugfix to NeoJSONWriter>>#escapeUnicode: [thank you, Tomohiro Oda] code points between 16rFFF and 16rFFFF where encoded wrongly when #asciiOnly was true Add high code point string to NeoJSONWriteReadTests>>#testStrings and add new NeoJSONWriteReadAsciiOnlyTests subclass' id '27263197-84b3-45c2-97d4-e99e63d51d89' date '24 November 2016' time '10:30:35.120461 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.34' message 'Use an OrderedDictionary instead of a regular Dictionary to store the properties inside a NeoJSONObjectMapping - this allows the user to control the order of properties while writing, if needed Add NeoJSONWriterTests>>#testPreservePropertyOrder' id '883b6ef1-e5fc-4d85-b86c-b21c1b5a3d6c' date '2 July 2016' time '12:03:30.417248 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.33' message 'Added NeoJSONReader>>#nextListAs: as suggested by Norbert Hartl Added NeoJSONReaderTests>>#testArrayOfPointsUsingNextListAs' id '8f4620bc-d5f5-4b3a-aaf0-ee4b8b7a9ccf' date '16 March 2016' time '11:25:04.185192 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.32' message 'Added support for characters not in the Basic Multilingual Plane encoding as a UTF-16 surrogate pair See https://tools.ietf.org/html/rfc7159#section-7' id '484452d1-3d3b-414c-9c3a-fdfdd220ac65' date '24 February 2016' time '2:51:29.012947 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.31' message 'New #allowNil option to Object mapping so that null values are accepted and returned as nil when reading a schema using #nextAs: (off by default) Added NeoJSONObjectMapping>>#allowNil Added NeoJSONReaderTests>>#testAllowNil' id '650b4ecf-c9d9-40a5-a988-e4e3801faa42' date '30 December 2015' time '12:32:13.455009 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.30' message 'fix NeoJSONObjectTest>>#testJSON to no longer mix NeoJSONObject with Dictionary (due to changed equality tests)' id '8d78dfb8-9216-483f-9183-c4467fb351d2' date '25 November 2015' time '9:21:18.608509 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.26' message 'Added NeoJSONObject, a convencience subclass of Dictionary that mimics some JavaScript behavior' id 'a601b541-7f8b-4d10-9c57-2423b6c0a5fb' date '8 September 2014' time '2:26:47.985076 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.25' message 'Added NeoJSONWriterTests>>#testPointWriteNil Added NeoJSONWriter #writeNil property, defaulting to false; when true, nil instance variables will be written as null by NeoJSONPropertyMapping, else they will be skipped' id 'f1479d45-8d24-4bf6-b29a-aaf9f984c084' date '28 May 2014' time '8:54:10.767617 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.24' message 'Added new feature NeoJSONWriter>>#nextPutAs: symmetrical to NeoJSONReader>>#next:as: Added 4 unit test to exercise the new options' id '4c7461c1-82ea-4126-8b5c-ef307168120a' date '24 March 2014' time '12:19:53.503067 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.23' message 'Added basic support for mapping using inheritance when using #neoJonMapping : (see #testObject3) Renamed #new[Custom|Object]MappingFor: to [custom|object]MappingFor: to better reflect the new behavior Thanks Philippe Back for making these suggestions!' id '27fad240-c6b9-4d00-a4e6-6e49fd612dfb' date '22 March 2014' time '11:04:11.513921 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.22' message 'remove timing assertions from NeoJSONBenchmarkTests sinc they occasionally fail on the CI servers' id '3a07a705-816f-4981-9269-8d20620a00e2' date '15 January 2014' time '7:31:53.75366 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.21' message 'Increase the NeoJSONBenchmarkTests>>#testPrettyPrinter timeout even more' id '90807026-211d-4644-b211-1ea5bfd92bd6' date '27 December 2013' time '9:44:01.082714 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.20' message 'Give NeoJSONBenchmarksTests some more time to finish (on slow CI build slaves)' id 'f5f8f820-40d4-44ea-b5b6-8634e4cb7c5e' date '27 December 2013' time '7:01:23.816121 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.19' message 'New feature: NeoJSONWriter>>#asciiOnly: to escape all non ASCII characters in strings' id 'e1a69fdb-7e41-46f7-9f52-312eae3fab61' date '3 September 2013' time '12:21:56.262333 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.18' message 'Added tests for NeoJSONCustomMapping>>#mapWithValueSchema:' id '3f001444-6572-47d5-b656-96363c695522' date '30 August 2013' time '11:09:49.845805 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.17' message 'Make SmallDictionary optional in NeoJSONReaderTests>>#testSmallDictionary' id '5fa85190-9a4c-4b91-9747-f5e6a547e5ad' date '4 July 2013' time '6:43:12.874 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.16' message 'add NeoJSONMockStream>>#peekFor:' id 'baadfdb3-b8b4-4ce5-b072-0ebf67edd45f' date '3 December 2012' time '11:14:13.632 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.15' message 'added code to test the character stream API being used' id '696b4956-43ef-4fb8-a295-aa0bcc16685c' date '13 June 2012' time '4:29:41.988 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.14' message 'bugfix in NeoJSONReader>>#match:do: ' id '7e664c0d-c5c3-4e64-a784-c274a85a8230' date '13 June 2012' time '2:58:28.242 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.13' message 'extended NeoJSONReader with settable listClass and mapClass as well as a propertyNamesAsSymbols option extended class and method comments' id '4c90aab7-73c6-47fe-b52f-46954c06bf19' date '13 June 2012' time '11:57:09.49 am' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.12' message 'added tests for bogus input' id '50e7e260-7299-4ff8-880b-cbfd7bc8b30a' date '12 June 2012' time '4:20:02.239 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.11' message 'major simplification: removed NeoJSON[Composite|List|Map]Mapping, all to be handled by blocks in NeoJSONCustomMapping renamed forCustom:do: to for:customDo: accessor based mapping to NeoJSONObjectMapping ' id 'fcdc4252-6e15-4832-984f-84fbe1486163' date '12 June 2012' time '1:36:40.377 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.10' message 'added another benchmark' id '0f01e8f8-a367-4cb9-b730-1d8c0b411743' date '10 June 2012' time '9:28:30.577 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.9' message 'added NeoJSONTestObject1 with class side #neoJsonMapping: method' id 'ac3db680-73e6-4358-882c-e237697a7db4' date '9 June 2012' time '6:56:55.581 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.8' message 'added custom mapping tests' id '015e7c92-0411-4c7f-80b3-2d18a445250e' date '8 June 2012' time '10:10:24.734 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.7' message 'adding valueSchema to propertyMapping' id '9723e179-f1b9-4641-85ea-45ba89487b07' date '8 June 2012' time '8:36:25 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.6' message '1st version where list mapping works on some simple examples' id '6dbd0ade-2632-42a1-bd3c-45ef3fc0b596' date '8 June 2012' time '4:41:04 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.5' message '1st version with working object mapping for writer' id '59e0739f-bd31-4057-a366-2b5d27cf304c' date '6 June 2012' time '8:47:29 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.4' message 'added NeoJSONBenchmarkTests' id 'f36901e7-bb6d-4d6c-b4e8-5e70db8cce97' date '5 June 2012' time '5:30:17 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.3' message 'added more tests and a simple benchmark' id '5396d3f6-f1f0-46bc-961a-72a5919a9b79' date '4 June 2012' time '6:53:25 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.2' message 'first simple version of NeoJSONWriter' id '4b84c7e9-74d5-4b8b-bf9e-4be5fda1eb10' date '3 June 2012' time '7:58:06 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.1' message 'first simple version of NeoJSONReader' id '6927fec5-5a02-4ad2-8d4a-7be492da47da' date '2 June 2012' time '10:00:14 pm' author 'SvenVanCaekenberghe' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())(name 'Neo-JSON-Tests-SvenVanCaekenberghe.29' message 'Added NeoJSONWriterTests>>#testListsExtra' id '7feb9d20-fae6-4970-9774-500b92f28f50' date '4 September 2015' time '2:03:43.177017 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.28' message 'Handle missing classes in NeoJSONWriterTests>>#testMapsExtra' id '6a459850-0c12-43d1-9a6b-9442e6d8fd8e' date '26 August 2015' time '2:06:11.298172 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.27' message 'Added NeoJSONWriterTests>>#testMapsExtra to test classes that are treated similar to Dictionary' id 'ff7a96fa-5174-4c2f-9950-eebcba1206c0' date '26 August 2015' time '1:22:00.626803 pm' author 'SvenVanCaekenberghe' ancestors ((id 'a601b541-7f8b-4d10-9c57-2423b6c0a5fb')) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())(name 'Neo-JSON-Tests-SvenVanCaekenberghe.40' message 'Added NeoJSONExamplesTests with #testPoints and #testRectanglePoints Changed NeoJSONObjectMapping #mapAccessors: #mapAllInstVars #mapInstVars and #mapInstVars: to return a collection of the generated mappings Thanks Juraj Kubelka ! ' id '9783deb7-0310-0d00-8c60-f3410702b82a' date '6 July 2017' time '10:34:12.998461 am' author 'SvenVanCaekenberghe' ancestors ((id 'bb2a9e2c-080d-0d00-a714-e48a0189d909')) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ()) \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/properties.json b/repository/Neo-JSON-Tests.package/properties.json deleted file mode 100644 index 6f31cf5..0000000 --- a/repository/Neo-JSON-Tests.package/properties.json +++ /dev/null @@ -1 +0,0 @@ -{ } \ No newline at end of file diff --git a/repository/Neo-JSON-Tests/NeoJSONBenchmark.class.st b/repository/Neo-JSON-Tests/NeoJSONBenchmark.class.st new file mode 100644 index 0000000..d3f2604 --- /dev/null +++ b/repository/Neo-JSON-Tests/NeoJSONBenchmark.class.st @@ -0,0 +1,72 @@ +" +I am NeoJSONBenchmark. +I hold 1000 objects of the form Dictionary('color'->'green' 'enabled'->false 'id'->1 'name'->'Name-1' 'value'->0.002 ) in an Array. +I hold the JSON serialization of that as a String of the form '[{""value"":0.002,""enabled"":false,""name"":""Name-1"",""color"":""green"",""id"":1}, ... + +| benchmark | +benchmark := NeoJSONBenchmark new. +[benchmark read] bench. + +| benchmark | +benchmark := NeoJSONBenchmark new. +[benchmark write] bench. + +| benchmark | +benchmark := NeoJSONBenchmark new. +[benchmark read] timeToRun. + +| benchmark | +benchmark := NeoJSONBenchmark new. +[benchmark write] timeToRun. +" +Class { + #name : #NeoJSONBenchmark, + #superclass : #Object, + #instVars : [ + 'objects', + 'json' + ], + #category : 'Neo-JSON-Tests' +} + +{ #category : #'initialize-release' } +NeoJSONBenchmark >> initialize [ + super initialize. + objects := Array new: 1000. + 1 to: 1000 do: [ :each | + | map | + (map := Dictionary new) + at: 'id' put: each; + at: 'name' put: 'Name-', each asString; + at: 'enabled' put: (#( true false) at: (each \\ 2) + 1); + at: 'color' put: (#( 'red' 'green' 'blue' ) at: (each \\ 3) + 1); + at: 'value' put: each + each / 1000.0. + objects at: each put: map ]. + json := String streamContents: [ :stream | + (NeoJSONWriter on: stream) nextPut: objects ] + +] + +{ #category : #public } +NeoJSONBenchmark >> read [ + ^ (NeoJSONReader on: json readStream) next + +] + +{ #category : #public } +NeoJSONBenchmark >> write [ + ^ String streamContents: [ :stream | + (NeoJSONWriter on: stream) nextPut: objects ] + +] + +{ #category : #public } +NeoJSONBenchmark >> writePrettyPrintedRead [ + | output | + output := String streamContents: [ :stream | + (NeoJSONWriter on: stream) + prettyPrint: true; + nextPut: objects ]. + ^ (NeoJSONReader on: output readStream) + next +] diff --git a/repository/Neo-JSON-Tests/NeoJSONBenchmarkTests.class.st b/repository/Neo-JSON-Tests/NeoJSONBenchmarkTests.class.st new file mode 100644 index 0000000..059ee56 --- /dev/null +++ b/repository/Neo-JSON-Tests/NeoJSONBenchmarkTests.class.st @@ -0,0 +1,42 @@ +" +I am NeoJSONBenchmarkTests. + +This test is obviously dependent on hardware, but the margin is quite high. +" +Class { + #name : #NeoJSONBenchmarkTests, + #superclass : #TestCase, + #category : 'Neo-JSON-Tests' +} + +{ #category : #testing } +NeoJSONBenchmarkTests >> testObject2 [ + | json | + json := NeoJSONWriter toString: NeoJSONTestObject2 new. + self + assert: (NeoJSONReader fromString: json as: NeoJSONTestObject2) + equals: NeoJSONTestObject2 new +] + +{ #category : #testing } +NeoJSONBenchmarkTests >> testPrettyPrinted [ + | benchmark | + benchmark := NeoJSONBenchmark new. + self + assert: benchmark writePrettyPrintedRead + equals: benchmark read +] + +{ #category : #testing } +NeoJSONBenchmarkTests >> testRead [ + | benchmark | + benchmark := NeoJSONBenchmark new. + benchmark read +] + +{ #category : #testing } +NeoJSONBenchmarkTests >> testWrite [ + | benchmark | + benchmark := NeoJSONBenchmark new. + benchmark write +] diff --git a/repository/Neo-JSON-Tests/NeoJSONExamplesTests.class.st b/repository/Neo-JSON-Tests/NeoJSONExamplesTests.class.st new file mode 100644 index 0000000..080539e --- /dev/null +++ b/repository/Neo-JSON-Tests/NeoJSONExamplesTests.class.st @@ -0,0 +1,99 @@ +" +NeoJSONExamplesTests runs a couple of examples as tests +" +Class { + #name : #NeoJSONExamplesTests, + #superclass : #TestCase, + #category : 'Neo-JSON-Tests' +} + +{ #category : #tests } +NeoJSONExamplesTests >> testPoints [ + | points json result | + + points := Array with: 1@2 with: 3@4 with: 5@6. + + json := String streamContents: [ :out | + (NeoJSONWriter on: out) + prettyPrint: true; + mapInstVarsFor: Point; + nextPut: points ]. + + result := (NeoJSONReader on: json readStream) + mapInstVarsFor: Point; + for: #ListOfPoints customDo: [ :mapping | + mapping listOfElementSchema: Point ]; + nextAs: #ListOfPoints. + + self assert: result equals: points. + + result := (NeoJSONReader on: json readStream) + mapInstVarsFor: Point; + nextListAs: Point. + + self assert: result equals: points. + + result := (NeoJSONReader on: json readStream) + mapInstVarsFor: Point; + for: #OrderedCollectionOfPoints customDo: [ :mapping | + mapping listOfType: OrderedCollection andElementSchema: Point ]; + nextAs: #OrderedCollectionOfPoints. + + self assert: result equals: points asOrderedCollection. +] + +{ #category : #tests } +NeoJSONExamplesTests >> testRectanglePoints [ + | rectangle rectangleJson result | + + rectangle := Rectangle origin: 3 @ 4 extent: 5 @ 6. + + rectangleJson := String streamContents: [ :stream | + (NeoJSONWriter on: stream) + prettyPrint: true; + mapInstVarsFor: Point; + mapInstVarsFor: Rectangle; + nextPut: rectangle ]. + + result := (NeoJSONReader on: rectangleJson readStream) + mapInstVarsFor: Point; + for: Rectangle do: [ :mapping | + (mapping mapInstVar: #origin) valueSchema: Point. + (mapping mapInstVar: #corner) valueSchema: Point ]; + nextAs: Rectangle. + + self assert: result equals: rectangle. + + result := (NeoJSONReader on: rectangleJson readStream) + mapInstVarsFor: Point; + for: Rectangle do: [ :mapping | + mapping mapInstVars do: [ :each | each valueSchema: Point ] ]; + nextAs: Rectangle. + + self assert: result equals: rectangle +] + +{ #category : #tests } +NeoJSONExamplesTests >> testRectanglePointsWithNils [ + self + assert: + (String streamContents: [ :stream | + (NeoJSONWriter on: stream) + for: Point do: [ :mapping | mapping mapAllInstVars ]; + for: Rectangle do: [ :mapping | + (mapping mapInstVar: #origin) valueSchema: Point. + (mapping mapInstVar: #corner) valueSchema: Point ]; + nextPut: Rectangle new ]) + equals: '{}'. + self + assert: + (String streamContents: [ :stream | + (NeoJSONWriter on: stream) + for: Point do: [ :mapping | mapping mapAllInstVars ]; + for: Rectangle do: [ :mapping | + (mapping mapInstVar: #origin) valueSchema: Point. + (mapping mapInstVar: #corner) valueSchema: Point ]; + writeNil: true; + nextPut: Rectangle new ]) + equals: '{"origin":null,"corner":null}'. +] diff --git a/repository/Neo-JSON-Tests/NeoJSONMappingTests.class.st b/repository/Neo-JSON-Tests/NeoJSONMappingTests.class.st new file mode 100644 index 0000000..fa55266 --- /dev/null +++ b/repository/Neo-JSON-Tests/NeoJSONMappingTests.class.st @@ -0,0 +1,86 @@ +" +I am NeoJSONMappingTests, testing more exotic kinds of mapping constructs. +" +Class { + #name : #NeoJSONMappingTests, + #superclass : #TestCase, + #category : 'Neo-JSON-Tests' +} + +{ #category : #testing } +NeoJSONMappingTests >> testDynamicTyping [ + | data customMapping json result | + data := Array with: 'foo'->1 with: #('foo' 2). + "The idea is to map a key value combination as either a classic association or a simple pair, + using key & value properties as well as a type property to distinguish between the two" + customMapping := [ :mapper | + mapper + for: #AssocOrPair customDo: [ :mapping | + mapping + encoder: [ :x | + x isArray + ifTrue: [ Dictionary new at: 'type' put: 'pair'; at: 'key' put: x first; at: 'value' put: x second; yourself ] + ifFalse: [ Dictionary new at: 'type' put: 'assoc'; at: 'key' put: x key; at: 'value' put: x value; yourself ] ]; + decoder: [ :x | + (x at: 'type') = 'pair' + ifTrue: [ Array with: (x at: 'key') with: (x at: 'value') ] + ifFalse: [ (x at: 'key') -> (x at: 'value')] ] ]; + for: #ArrayOfAssocOrPair customDo: [ :mapping | + mapping listOfType: Array andElementSchema: #AssocOrPair ]; + yourself ]. + json := String streamContents: [ :out | + (customMapping value: (NeoJSONWriter on: out)) nextPut: data as: #ArrayOfAssocOrPair ]. + result := (customMapping value: (NeoJSONReader on: json readStream)) nextAs: #ArrayOfAssocOrPair. + self assert: result equals: data +] + +{ #category : #testing } +NeoJSONMappingTests >> testSymbolOrStringInstVarMapping [ + | data out1 out2 result1 result2 | + data := Array with: 1@2 with: 3@4. + out1 := String streamContents: [ :out | + (NeoJSONWriter on: out) + for: Point do: [ :mapping | mapping mapInstVars: #(x y) ]; + nextPut: data ]. + result1 := (NeoJSONReader on: out1 readStream) + for: Point do: [ :mapping | mapping mapInstVars: #(x y) ]; + nextListAs: Point. + self assert: result1 equals: data. + out2 := String streamContents: [ :out | + (NeoJSONWriter on: out) + for: Point do: [ :mapping | mapping mapInstVars: #('x' 'y') ]; + nextPut: data ]. + result2 := (NeoJSONReader on: out1 readStream) + for: Point do: [ :mapping | mapping mapInstVars: #('x' 'y') ]; + nextListAs: Point. + self assert: result2 equals: data +] + +{ #category : #testing } +NeoJSONMappingTests >> testVirtualTransferObject [ + | data customMapping extraJson json result | + data := NeoJSONObject new data: (Array with: 1@1 with: 2@2). + extraJson := '{"foo":1,"data":[{"x":1,"y":1},{"x":2,"y":2,"z":-1}]}'. + "The idea here is that we are not interested in the top level object just in its data property, + which should be of a specific type, hence we create a virtual transfer object" + customMapping := [ :mapper | + mapper + for: Point do: [ :mapping | + mapping mapInstVars: #(x y) ]; + for: #ArrayOfPoints customDo: [ :mapping | + mapping listOfElementSchema: Point ]; + for: #TransferObject do: [ :mapping | + mapping subjectClass: NeoJSONObject. + (mapping mapAccessor: #data) valueSchema: #ArrayOfPoints ]; + yourself ]. + "By using NeoJSONObject accessors (#data & #data:) are translated to generic #at:[put:] messages. + A longer alternative is + (mapping mapProperty: #data getter: [ :obj | obj at: #data ] setter: [ :obj :x | obj at: #data put: x]) valueSchema: #ArrayOfPoints + where the blocks give you the flexibility to use a plain Dictionary for example" + result := (customMapping value: (NeoJSONReader on: extraJson readStream)) nextAs: #TransferObject. + self assert: result equals: data. + json := String streamContents: [ :out | + (customMapping value: (NeoJSONWriter on: out)) nextPut: data as: #TransferObject ]. + result := (customMapping value: (NeoJSONReader on: json readStream)) nextAs: #TransferObject. + self assert: result equals: data +] diff --git a/repository/Neo-JSON-Tests/NeoJSONMockStream.class.st b/repository/Neo-JSON-Tests/NeoJSONMockStream.class.st new file mode 100644 index 0000000..5310f72 --- /dev/null +++ b/repository/Neo-JSON-Tests/NeoJSONMockStream.class.st @@ -0,0 +1,64 @@ +" +I am NeoJSONMockStream. +I wrap another stream to validate the limited API used. +" +Class { + #name : #NeoJSONMockStream, + #superclass : #Object, + #instVars : [ + 'stream' + ], + #category : 'Neo-JSON-Tests' +} + +{ #category : #'instance creation' } +NeoJSONMockStream class >> on: stream [ + ^ self new + stream: stream; + yourself +] + +{ #category : #testing } +NeoJSONMockStream >> atEnd [ + ^ stream atEnd +] + +{ #category : #accessing } +NeoJSONMockStream >> close [ + ^ stream close +] + +{ #category : #accessing } +NeoJSONMockStream >> next [ + ^ stream next +] + +{ #category : #accessing } +NeoJSONMockStream >> nextPut: character [ + ^ stream nextPut: character +] + +{ #category : #accessing } +NeoJSONMockStream >> nextPutAll: string [ + ^ stream nextPutAll: string +] + +{ #category : #accessing } +NeoJSONMockStream >> peek [ + ^ stream peek +] + +{ #category : #accessing } +NeoJSONMockStream >> peekFor: char [ + ^ stream peekFor: char +] + +{ #category : #accessing } +NeoJSONMockStream >> space [ + ^ stream space +] + +{ #category : #'initialize-release' } +NeoJSONMockStream >> stream: anObject [ + stream := anObject +] diff --git a/repository/Neo-JSON-Tests/NeoJSONObjectTests.class.st b/repository/Neo-JSON-Tests/NeoJSONObjectTests.class.st new file mode 100644 index 0000000..e6270c0 --- /dev/null +++ b/repository/Neo-JSON-Tests/NeoJSONObjectTests.class.st @@ -0,0 +1,84 @@ +" +I am NeoJSONObjectTests, I hold unit tests for NeoJSONObject. + +" +Class { + #name : #NeoJSONObjectTests, + #superclass : #TestCase, + #category : 'Neo-JSON-Tests' +} + +{ #category : #testing } +NeoJSONObjectTests >> testAtPath [ + | object | + object := NeoJSONObject newFrom: (Array with: #one -> ( NeoJSONObject newFrom: (Array with: #two -> ( NeoJSONObject newFrom: (Array with: #three -> 42) ) ) )). + self assert: (object atPath: #(one two three)) equals: 42. + self assert: (object atPath: #(one two three)) equals: object one two three. + self assert: (object atPath: #(missing)) equals: nil. + self assert: (object atPath: #(one missing)) equals: nil. + self assert: (object atPath: #(one two missing)) equals: nil. + self assert: (object atPath: #(one two missing)) equals: object one two missing. + + object := NeoJSONObject newFrom: (Array with: #foo -> 42). + self assert: (object atPath: #(foo)) equals: 42. + self assert: (object atPath: #(foo)) equals: object foo. + self assert: (object atPath: #(foo)) equals: (object at: #foo). + self assert: (object atPath: #()) equals: object. + + +] + +{ #category : #testing } +NeoJSONObjectTests >> testAtPathPut [ + | object | + object := NeoJSONObject new. + object atPath: #(one test) put: 42. + self assert: (object atPath: #(one test)) equals: 42. + self assert: object one test equals: 42. + object atPath: #(one two three) put: #foo. + self assert: (object atPath: #(one two three)) equals: #foo. + self assert: object one two three equals: #foo. + object atPath: #(one two threeBis) put: #bar. + self assert: (object atPath: #(one two threeBis)) equals: #bar. + self assert: object one two threeBis equals: #bar. + + self assert: object foo isNil. + self assert: (object atPath: #() put: 1) equals: object. + self assert: (object atPath: #(foo) put: 1) equals: 1. + self assert: (object atPath: #(foo)) equals: 1. + self assert: object foo equals: 1 + + +] + +{ #category : #testing } +NeoJSONObjectTests >> testCRUD [ + | object | + object := NeoJSONObject new. + self assert: object isEmpty. + self assert: object foo equals: nil. + object foo: 123. + self assert: object foo equals: 123. + self assert: object printString equals: '{"foo":123}'. + object name: 'test'. + object value: Float pi. + self assert: object name equals: 'test'. + self assert: (object value closeTo: Float pi). + self assert: object keys asSet equals: #(foo name value) asSet. + object removeKey: #foo. + self assert: object foo equals: nil. + object removeAll. + self assert: object isEmpty +] + +{ #category : #testing } +NeoJSONObjectTests >> testJSON [ + | data json object | + data := NeoJSONObject newFrom: (Array with: #foo->1 with: #bar->2 with: #str->'Str!' with: #bool->true with: #flt->1.5). + json := NeoJSONWriter toString: data . + object := NeoJSONObject fromString: json. + self assert: object class equals: NeoJSONObject. + self assert: object equals: data. + json := (NeoJSONWriter toString: object). + self assert: (NeoJSONObject fromString: json) equals: object +] diff --git a/repository/Neo-JSON-Tests/NeoJSONReaderTests.class.st b/repository/Neo-JSON-Tests/NeoJSONReaderTests.class.st new file mode 100644 index 0000000..dbc4d45 --- /dev/null +++ b/repository/Neo-JSON-Tests/NeoJSONReaderTests.class.st @@ -0,0 +1,412 @@ +" +I am NeoJSONReaderTests, a test suite for NeoJSONReader. +" +Class { + #name : #NeoJSONReaderTests, + #superclass : #TestCase, + #category : 'Neo-JSON-Tests' +} + +{ #category : #testing } +NeoJSONReaderTests >> testAllowNil [ + self + should: [ + (NeoJSONReader on: 'null' readStream) + mapInstVarsFor: Point; + nextAs: Point ] + raise: NeoJSONParseError. + self + assert: ((NeoJSONReader on: 'null' readStream) + mapInstVarsFor: Point; + for: Point do: [ :mapping | mapping allowNil ]; + nextAs: Point) + equals: nil. + self + assert: ((NeoJSONReader on: '[ { "x" : 1, "y" : 2 }, null, { "x" : 3, "y" : -1 } ]' readStream) + mapInstVarsFor: Point; + for: Point do: [ :mapping | mapping allowNil ]; + for: #ArrayOfPoints customDo: [ :mapping | mapping listOfElementSchema: Point ]; + nextAs: #ArrayOfPoints) + equals: (Array with: 1 @ 2 with: nil with: 3 @ -1). +] + +{ #category : #testing } +NeoJSONReaderTests >> testArrayOfPoints [ + | reader | + reader := [ :string | + (NeoJSONReader on: string readStream) + for: Point do: [ :mapping | + mapping mapInstVars: #(x y) ]; + for: #ArrayOfPoints customDo: [ :mapping | + mapping listOfElementSchema: Point ]; + nextAs: #ArrayOfPoints ]. + self assert: (reader value: '[ { "x":1, "y":2 }, { "x":-1, "y":-2 } ]') equals: (Array with: 1@2 with: -1@ -2) . + self assert: (reader value: '[ ]') equals: #(). + self assert: (reader value: '[ { } ]') equals: (Array with: Point new) +] + +{ #category : #testing } +NeoJSONReaderTests >> testArrayOfPointsUsingNextListAs [ + | reader | + reader := [ :string | + (NeoJSONReader on: string readStream) + mapInstVarsFor: Point; + nextListAs: Point ]. + self assert: (reader value: '[ { "x":1, "y":2 }, { "y":-2, "x":-1 } ]') equals: (Array with: 1@2 with: -1@ -2) . + self assert: (reader value: '[ ]') equals: #(). + self assert: (reader value: '[ { } ]') equals: (Array with: Point new) +] + +{ #category : #testing } +NeoJSONReaderTests >> testAssociation [ + | reader | + reader := [ :string | + (NeoJSONReader on: string readStream) + for: Association do: [ :mapping | + mapping mapAccessors: #(key value) ]; + nextAs: Association ]. + self assert: (reader value: '{"key":"foo","value":42}') equals: 'foo' -> 42. + self assert: (reader value: '{}') equals: Association new +] + +{ #category : #testing } +NeoJSONReaderTests >> testBooleans [ + self assert: (NeoJSONReader on: 'true' readStream) next equals: true. + self assert: (NeoJSONReader on: 'false' readStream) next equals: false. + self should: [ (NeoJSONReader on: 'tru' readStream) next ] raise: NeoJSONParseError. + self should: [ (NeoJSONReader on: 'falsE' readStream) next ] raise: NeoJSONParseError. +] + +{ #category : #testing } +NeoJSONReaderTests >> testByteArray [ + | reader | + reader := [ :string | + (NeoJSONReader on: string readStream) + for: ByteArray customDo: [ :mapping | + mapping listOfType: ByteArray ]; + nextAs: ByteArray ]. + self assert: (reader value: '[ 1, 2, 3 ]') equals: #[1 2 3]. + self assert: (reader value: '[ ]') equals: ByteArray new +] + +{ #category : #testing } +NeoJSONReaderTests >> testDate [ + | reader | + reader := [ :input | + (NeoJSONReader on: input readStream) + for: Date customDo: [ :mapping | + mapping decoder: [ :string | Date fromString: string ] ]; + nextAs: Date ]. + self assert: (reader value: ' "2012-06-08" ') equals: (Date fromString: '2012-06-08') +] + +{ #category : #testing } +NeoJSONReaderTests >> testDateAndTime [ + | reader | + reader := [ :input | + (NeoJSONReader on: input readStream) + for: DateAndTime customDo: [ :mapping | + mapping decoder: [ :string | DateAndTime fromString: string ] ]; + nextAs: DateAndTime ]. + self + assert: (reader value: ' "2012-02-14T16:40:18+01:00" ') + equals: (DateAndTime year: 2012 month: 2 day: 14 hour: 16 minute: 40 second: 18 offset: 1 hour) +] + +{ #category : #testing } +NeoJSONReaderTests >> testFloats [ + | reader | + reader := [ :string | + (NeoJSONReader on: string readStream) next ]. + self assert: ((reader value: '123.0') closeTo: 123.0). + self assert: ((reader value: '-123.0') closeTo: -123.0). + self assert: ((reader value: '123.0e0') closeTo: 123.0). + self assert: ((reader value: '123e6') closeTo: 123e6). + self assert: ((reader value: '123e+6') closeTo: 123e6). + self assert: ((reader value: '123e-6') closeTo: 123e-6). + self assert: ((reader value: '123E6') closeTo: 123e6). + self assert: ((reader value: '123E+6') closeTo: 123e6). + self assert: ((reader value: '123E-6') closeTo: 123e-6). + self assert: ((reader value: '-123e6') closeTo: -123e6). + self assert: ((reader value: '-123e-6') closeTo: -123e-6). + self assert: ((reader value: '-123E6') closeTo: -123e6). + self assert: ((reader value: '-123E-6') closeTo: -123e-6). + self assert: ((reader value: '3.14159') closeTo: Float pi). + self assert: ((reader value: '0.123e6') closeTo: 0.123e6). + self assert: ((reader value: '0.123e-6') closeTo: 0.123e-6). + self assert: ((reader value: '-0.123E6') closeTo: -0.123e6). + self assert: ((reader value: '-0.123E-6') closeTo: -0.123e-6). + +] + +{ #category : #testing } +NeoJSONReaderTests >> testIntegers [ + | reader | + reader := [ :string | + (NeoJSONReader on: string readStream) next ]. + self assert: (reader value: '123') equals: 123. + self assert: (reader value: '00123') equals: 123. + self assert: (reader value: '-123') equals: -123. + self assert: (reader value: '-0123') equals: -123. + self assert: (reader value: '0') equals: 0. + self assert: (reader value: '-0') equals: 0. + self assert: (reader value: '00') equals: 0. + self assert: (reader value: ' 123 ') equals: 123. + self should: [ reader value: '+1' ] raise: NeoJSONParseError. + self should: [ reader value: ' - ' ] raise: NeoJSONParseError. + +] + +{ #category : #testing } +NeoJSONReaderTests >> testLists [ + | reader | + reader := [ :string | + (NeoJSONReader on: string readStream) next ]. + self assert: (reader value: '[1,2,3]') equals: #(1 2 3). + self assert: (reader value: '[]') equals: #(). + self assert: (reader value: ' [ 1 , 2 , 3 ] ') equals: #(1 2 3). + self assert: (reader value: ' [ ] ') equals: #(). + self should: [ reader value: '[1,]' ] raise: NeoJSONParseError. + self should: [ reader value: '[' ] raise: NeoJSONParseError. + self should: [ reader value: ']' ] raise: NeoJSONParseError. + self should: [ reader value: '[}' ] raise: NeoJSONParseError +] + +{ #category : #testing } +NeoJSONReaderTests >> testMaps [ + | reader | + reader := [ :string | + (NeoJSONReader on: string readStream) next ]. + self assert: (reader value: '{"x":1,"y":2}') equals: (Dictionary newFromPairs: #( 'x' 1 'y' 2)). + self assert: (reader value: '{}') equals: Dictionary new. + self assert: (reader value: ' { "x" : 1 , "y" : 2 } ' ) equals: (Dictionary newFromPairs: #( 'x' 1 'y' 2)). + self assert: (reader value: ' { } ') equals: Dictionary new. + self should: [ reader value: '{"foo":}' ] raise: NeoJSONParseError. + self should: [ reader value: '{"foo":9,}' ] raise: NeoJSONParseError. + self should: [ reader value: '{9:true,}' ] raise: NeoJSONParseError. + self should: [ reader value: '{' ] raise: NeoJSONParseError. + self should: [ reader value: '}' ] raise: NeoJSONParseError. + self should: [ reader value: '{]' ] raise: NeoJSONParseError +] + +{ #category : #testing } +NeoJSONReaderTests >> testNextStringAsHex [ + | string | + string := (NeoJSONReader on: '"466F6F2062617221"' readStream) + for: #StringAsHex + customDo: [ :mapping | + mapping + encoder: [ :x | x asByteArray hex asUppercase ]; + decoder: [ :x | (ByteArray readHexFrom: x) asString ] ]; + nextAs: #StringAsHex. + self assert: string equals: 'Foo bar!' +] + +{ #category : #testing } +NeoJSONReaderTests >> testNonBMPCharacterDecoding [ + "Characters not in the Basic Multilingual Plane are encoded as a UTF-16 surrogate pair" + + | string object | + string := 16r1D11E asCharacter asString. "MUSICAL SYMBOL G CLEF" + object := (NeoJSONReader fromString: '"\uD834\uDD1E"'). + self assert: object equals: string +] + +{ #category : #testing } +NeoJSONReaderTests >> testNull [ + self assert: (NeoJSONReader on: 'null' readStream) next equals: nil. + self assert: (NeoJSONReader on: ' null ' readStream) next equals: nil. + self should: [ (NeoJSONReader on: ' nil ' readStream) next ] raise: NeoJSONParseError. +] + +{ #category : #testing } +NeoJSONReaderTests >> testOrderedCollection [ + | json list | + json := '[ 1, 2, 3 ]'. + list := (NeoJSONReader on: json readStream) + listClass: OrderedCollection; + next. + self + assert: list + equals: (OrderedCollection with: 1 with: 2 with: 3). + self + assert: list class + equals: OrderedCollection +] + +{ #category : #testing } +NeoJSONReaderTests >> testOrderedCollectionOfPoints [ + | reader | + reader := [ :string | + (NeoJSONReader on: string readStream) + for: Point do: [ :mapping | + mapping mapInstVars: #(x y) ]; + for: #OrderedCollectionOfPoints customDo: [ :mapping | + mapping listOfType: OrderedCollection andElementSchema: Point ]; + nextAs: #OrderedCollectionOfPoints ]. + self assert: (reader value: '[ { "x":1, "y":2 }, { "x":-1, "y":-2 } ]') equals: (Array with: 1@2 with: -1@ -2) asOrderedCollection. + self assert: (reader value: '[ ]') equals: OrderedCollection new. + self assert: (reader value: '[ { } ]') equals: (OrderedCollection with: Point new) +] + +{ #category : #testing } +NeoJSONReaderTests >> testParseErrors [ + self should: [ NeoJSONReader fromString: 'zero' ] raise: NeoJSONParseError. + self should: [ NeoJSONReader fromString: '#' ] raise: NeoJSONParseError. + self should: [ NeoJSONReader fromString: '@' ] raise: NeoJSONParseError. + + self should: [ (NeoJSONReader on: '[1,2,3]true' readStream) next; failIfNotAtEnd ] raise: NeoJSONParseError. + self should: [ (NeoJSONReader on: '{"foo":1}"extra"' readStream) next; failIfNotAtEnd ] raise: NeoJSONParseError. + self should: [ (NeoJSONReader on: '[]"extra"' readStream) next; failIfNotAtEnd ] raise: NeoJSONParseError. +] + +{ #category : #testing } +NeoJSONReaderTests >> testPoint [ + | reader | + reader := [ :string | + (NeoJSONReader on: string readStream) nextAs: Point ]. + self should: [ reader value: '{"x":1,"y":2}' ] raise: NeoJSONMappingNotFound +] + +{ #category : #testing } +NeoJSONReaderTests >> testPoint1 [ + | reader | + reader := [ :string | + (NeoJSONReader on: string readStream) + for: Point do: [ :mapping | + mapping mapProperty: 'x' getter: [ :point | point x ] setter: [ :point :value | point setX: value setY: point y ]. + mapping mapProperty: 'y' getter: [ :point | point y ] setter: [ :point :value | point setX: point x setY: value ]. ]; + nextAs: Point ]. + self assert: (reader value: '{"x":1,"y":2}') equals: 1@2. + self assert: (reader value: '{}') equals: Point new +] + +{ #category : #testing } +NeoJSONReaderTests >> testPoint2 [ + | reader | + reader := [ :string | + (NeoJSONReader on: string readStream) + mapAllInstVarsFor: Point; + nextAs: Point ]. + self assert: (reader value: '{"x":1,"y":2}') equals: 1@2. + self assert: (reader value: '{}') equals: Point new +] + +{ #category : #testing } +NeoJSONReaderTests >> testPoint3 [ + | reader | + reader := [ :string | + (NeoJSONReader on: string readStream) + for: Point do: [ :mapping | + mapping mapInstVars: #(x y) ]; + nextAs: Point ]. + self assert: (reader value: '{"x":1,"y":2}') equals: 1@2. + self assert: (reader value: '{}') equals: Point new +] + +{ #category : #testing } +NeoJSONReaderTests >> testPointUsingAsString [ + | point | + point := (NeoJSONReader on: '{"x":"1","y":"2"}' readStream) + for: Point + do: [ :mapping | + (mapping + mapProperty: #x + getter: [ :object | object x ] + setter: [ :object :value | object setX: value setY: object y ]) + valueSchema: #AsString. + (mapping + mapProperty: #y + getter: [ :object | object y ] + setter: [ :object :value | object setX: object x setY: value ]) + valueSchema: #AsString ]; + for: #AsString + customDo: [ :mapping | + mapping + encoder: [ :x | x asString ]; + decoder: [ :x | x asNumber ] ]; + nextAs: Point. + self assert: point equals: 1 @ 2 +] + +{ #category : #testing } +NeoJSONReaderTests >> testPropertyNamesAsSymbols [ + | json map | + json := '{ "x" : true, "y" : false, "key-1" : 1 }'. + map := (NeoJSONReader on: json readStream) + propertyNamesAsSymbols: true; + next. + self + assert: map + equals: (Dictionary new at: #x put: true; at: #y put: false; at: #'key-1' put: 1; yourself). + self assert: (map keys allSatisfy: [ :each | each isSymbol ]) +] + +{ #category : #testing } +NeoJSONReaderTests >> testSmallDictionary [ + | json map smallDictionaryClass | + json := '{ "x" : true, "y" : false, "key-1" : 1 }'. + smallDictionaryClass := Smalltalk at: #SmallDictionary ifAbsent: [ Dictionary ]. + map := (NeoJSONReader on: json readStream) + mapClass: smallDictionaryClass; + next. + self + assert: map + equals: (smallDictionaryClass new at: 'x' put: true; at: 'y' put: false; at: 'key-1' put: 1; yourself). + self + assert: map class + equals: smallDictionaryClass +] + +{ #category : #testing } +NeoJSONReaderTests >> testStrings [ + | reader | + reader := [ :string | + (NeoJSONReader on: string readStream) next ]. + self assert: (reader value: '"foo"') equals: 'foo'. + self assert: (reader value: '""') equals: ''. + self assert: (reader value: '"Foo BAR"') equals: 'Foo BAR'. + self assert: (reader value: '" foo "') equals: ' foo '. + self assert: (reader value: '"\u00E9l\u00E8ve en Fran\u00E7ais"') equals: 'élève en Français'. + self + assert: (reader value: '"\"\\\/\t\r\n\f\b"') + equals: (String withAll: ( OrderedCollection new + add: $"; + add: $\; + add: $/; + add: Character tab; + add: Character cr; + add: Character lf; + add: Character newPage; + add: Character backspace; + yourself )). + self should: [ reader value: '"open' ] raise: NeoJSONParseError. + self should: [ reader value: '"\uAA"' ] raise: NeoJSONParseError. + self should: [ reader value: '"\uZZ"' ] raise: NeoJSONParseError. + self should: [ reader value: '"\x"' ] raise: NeoJSONParseError. + self should: [ reader value: ' " ' ] raise: NeoJSONParseError. + +] + +{ #category : #testing } +NeoJSONReaderTests >> testSymbol [ + | reader | + reader := [ :input | + (NeoJSONReader on: input readStream) + for: Symbol customDo: [ :mapping | + mapping decoder: [ :string | string asSymbol ] ]; + nextAs: Symbol ]. + self assert: (reader value: ' "foo" ') equals: #foo. + self assert: (reader value: ' "FOO-1" ') equals: #'FOO-1' +] + +{ #category : #testing } +NeoJSONReaderTests >> testTime [ + | reader | + reader := [ :input | + (NeoJSONReader on: input readStream) + for: Time customDo: [ :mapping | + mapping decoder: [ :string | Time fromString: string ] ]; + nextAs: Time ]. + self assert: (reader value: ' "14:30:08" ') equals: (Time hour: 14 minute: 30 second: 8) +] diff --git a/repository/Neo-JSON-Tests/NeoJSONTestObject1.class.st b/repository/Neo-JSON-Tests/NeoJSONTestObject1.class.st new file mode 100644 index 0000000..33c5716 --- /dev/null +++ b/repository/Neo-JSON-Tests/NeoJSONTestObject1.class.st @@ -0,0 +1,132 @@ +" +I am NeoJSONTestObject1. + +I repesent a domain model object. +I have the following properties: + +- id +- name +- timestamp +- points +- bytes + +My JSON representation is like this: + +- id +- name +- created-at +- points +- bytes + +" +Class { + #name : #NeoJSONTestObject1, + #superclass : #Object, + #instVars : [ + 'id', + 'name', + 'timestamp', + 'points', + 'bytes' + ], + #category : 'Neo-JSON-Tests' +} + +{ #category : #'instance creation' } +NeoJSONTestObject1 class >> example1 [ + ^ self new + id: 123; + name: 'Example1'; + timestamp: (DateAndTime year: 2012 month: 06 day: 08 hour: 14 minute: 30 second: 15 offset: 1 hour); + points: (Array with: 1@2 with: 3@4); + bytes: #[ 2 4 6 8 ]; + yourself +] + +{ #category : #accessing } +NeoJSONTestObject1 class >> neoJsonMapping: mapper [ + mapper for: self do: [ :mapping | + mapping mapInstVars: #(id name). + (mapping mapInstVar: #timestamp to: 'created-at') valueSchema: DateAndTime. + (mapping mapInstVar: #points) valueSchema: #ArrayOfPoints. + (mapping mapInstVar: #bytes) valueSchema: ByteArray ]. + mapper for: DateAndTime customDo: [ :mapping | + mapping decoder: [ :string | DateAndTime fromString: string ]. + mapping encoder: [ :dateAndTime | dateAndTime printString ] ]. + mapper for: #ArrayOfPoints customDo: [ :mapping | + mapping listOfElementSchema: Point ]. + mapper mapAllInstVarsFor: Point. + mapper for: ByteArray customDo: [ :mapping | + mapping listOfType: ByteArray ] +] + +{ #category : #comparing } +NeoJSONTestObject1 >> = anObject [ + self == anObject + ifTrue: [ ^ true ]. + self class = anObject class + ifFalse: [ ^ false ]. + ^ id = anObject id + and: [ + name = anObject name + and: [ + timestamp = anObject timestamp + and: [ + points = anObject points + and: [ bytes = anObject bytes ] ] ] ] +] + +{ #category : #accessing } +NeoJSONTestObject1 >> bytes [ + ^ bytes +] + +{ #category : #accessing } +NeoJSONTestObject1 >> bytes: byteArray [ + bytes := byteArray +] + +{ #category : #comparing } +NeoJSONTestObject1 >> hash [ + ^ id hash bitXor: (name hash bitXor: (timestamp hash bitXor: (points hash bitXor: bytes hash))) +] + +{ #category : #accessing } +NeoJSONTestObject1 >> id [ + ^ id +] + +{ #category : #accessing } +NeoJSONTestObject1 >> id: integer [ + id := integer +] + +{ #category : #accessing } +NeoJSONTestObject1 >> name [ + ^ name +] + +{ #category : #accessing } +NeoJSONTestObject1 >> name: string [ + name := string +] + +{ #category : #accessing } +NeoJSONTestObject1 >> points [ + ^ points +] + +{ #category : #accessing } +NeoJSONTestObject1 >> points: arrayOfPoints [ + points := arrayOfPoints +] + +{ #category : #accessing } +NeoJSONTestObject1 >> timestamp [ + ^ timestamp +] + +{ #category : #accessing } +NeoJSONTestObject1 >> timestamp: dateAndTime [ + timestamp := dateAndTime +] diff --git a/repository/Neo-JSON-Tests/NeoJSONTestObject2.class.st b/repository/Neo-JSON-Tests/NeoJSONTestObject2.class.st new file mode 100644 index 0000000..56da027 --- /dev/null +++ b/repository/Neo-JSON-Tests/NeoJSONTestObject2.class.st @@ -0,0 +1,168 @@ +" +I am NeoJSONTestObject2. + +Instance Variables + data: + height: + id: + width: + +Used for benchmarking and other tests. +" +Class { + #name : #NeoJSONTestObject2, + #superclass : #Object, + #instVars : [ + 'id', + 'width', + 'height', + 'data' + ], + #category : 'Neo-JSON-Tests' +} + +{ #category : #testing } +NeoJSONTestObject2 class >> benchmark10k [ + "self benchmark10k" + + self benchmark: 10000 +] + +{ #category : #testing } +NeoJSONTestObject2 class >> benchmark10kAsDictionary [ + "self benchmark10kAsDictionary" + + self benchmarkAsDictionary: 10000 +] + +{ #category : #testing } +NeoJSONTestObject2 class >> benchmark200k [ + "self benchmark200k" + + self benchmark: 200000 +] + +{ #category : #testing } +NeoJSONTestObject2 class >> benchmark: count [ + "self benchmark: 1000" + + | collection json size | + collection := Array new: count withAll: self example1. + size := 2 + (count * (NeoJSONWriter toString: self example1) size) + count - 1. + Transcript + cr; + << ('Serializing {1} objects took ms ' format: (Array with: count) ); + show: [ json := String new: size streamContents: [ :stream | + (NeoJSONWriter on: stream) nextPut: collection ] ] timeToRun. + Transcript + cr; + << ('Deserializing {1} objects took ms ' format: (Array with: count) ); + show: [ NeoJSONReader fromString: json ] timeToRun. +] + +{ #category : #testing } +NeoJSONTestObject2 class >> benchmarkAsDictionary: count [ + "self benchmarkAsDictionary: 1000" + + | collection json size | + collection := Array new: count withAll: self example1 asDictionary. + size := 2 + (count * (NeoJSONWriter toString: self example1 asDictionary) size) + count - 1. + Transcript + cr; + << ('Serializing {1} objects took ms ' format: (Array with: count) ); + show: [ json := String new: size streamContents: [ :stream | + (NeoJSONWriter on: stream) nextPut: collection ] ] timeToRun. + Transcript + cr; + << ('Deserializing {1} objects took ms ' format: (Array with: count) ); + show: [ NeoJSONReader fromString: json ] timeToRun. +] + +{ #category : #'instance creation' } +NeoJSONTestObject2 class >> example1 [ + ^ self new + id: 13; + width: 250; + height: 110; + data: (String new: 512 withAll: $a); + yourself +] + +{ #category : #accessing } +NeoJSONTestObject2 class >> neoJsonMapping: mapper [ + "For inheritance mapping to work, the schema/classname must be self, + but the instance variables have to be enumerated manually per class" + + mapper for: self do: [ :mapping | + mapping mapInstVars: #(id width height data) ] +] + +{ #category : #comparing } +NeoJSONTestObject2 >> = anObject [ + self == anObject + ifTrue: [ ^ true ]. + self class = anObject class + ifFalse: [ ^ false ]. + ^ id = anObject id + and: [ + height = anObject height + and: [ + width = anObject width + and: [ + data = anObject data ] ] ] +] + +{ #category : #converting } +NeoJSONTestObject2 >> asDictionary [ + ^ Dictionary new + at: #id put: id; + at: #height put: height; + at: #width put: width; + at: #data put: data; + yourself +] + +{ #category : #accessing } +NeoJSONTestObject2 >> data [ + ^ data +] + +{ #category : #accessing } +NeoJSONTestObject2 >> data: anObject [ + data := anObject +] + +{ #category : #comparing } +NeoJSONTestObject2 >> hash [ + ^ id hash bitXor: (width hash bitXor: (height hash bitXor: data hash)) +] + +{ #category : #accessing } +NeoJSONTestObject2 >> height [ + ^ height +] + +{ #category : #accessing } +NeoJSONTestObject2 >> height: anObject [ + height := anObject +] + +{ #category : #accessing } +NeoJSONTestObject2 >> id [ + ^ id +] + +{ #category : #accessing } +NeoJSONTestObject2 >> id: anObject [ + id := anObject +] + +{ #category : #accessing } +NeoJSONTestObject2 >> width [ + ^ width +] + +{ #category : #accessing } +NeoJSONTestObject2 >> width: anObject [ + width := anObject +] diff --git a/repository/Neo-JSON-Tests/NeoJSONTestObject3.class.st b/repository/Neo-JSON-Tests/NeoJSONTestObject3.class.st new file mode 100644 index 0000000..505714f --- /dev/null +++ b/repository/Neo-JSON-Tests/NeoJSONTestObject3.class.st @@ -0,0 +1,73 @@ +" +I am NeoJSONTestObject3, a subclass of NeoJSONTestObject2. + +Instance Variables + color: + transparent : + +I am used for inheritance testing. + +" +Class { + #name : #NeoJSONTestObject3, + #superclass : #NeoJSONTestObject2, + #instVars : [ + 'color', + 'transparent' + ], + #category : 'Neo-JSON-Tests' +} + +{ #category : #'instance creation' } +NeoJSONTestObject3 class >> example1 [ + ^ super example1 + data: (String new: 8 withAll: $a); + color: 'red'; + transparent: true; + yourself +] + +{ #category : #accessing } +NeoJSONTestObject3 class >> neoJsonMapping: mapper [ + "For inheritance mapping to work, the schema/classname must be self, + but the instance variables have to be enumerated manually per class" + + super neoJsonMapping: mapper. + mapper for: self do: [ :mapping | + mapping mapInstVars: #(color transparent) ] +] + +{ #category : #comparing } +NeoJSONTestObject3 >> = anObject [ + ^ super = anObject + and: [ color = anObject color + and: [ transparent = anObject transparent ] ] +] + +{ #category : #converting } +NeoJSONTestObject3 >> asDictionary [ + ^ super asDictionary + at: #color put: color; + at: #transparent put: transparent; + yourself +] + +{ #category : #accessing } +NeoJSONTestObject3 >> color [ + ^ color +] + +{ #category : #accessing } +NeoJSONTestObject3 >> color: anObject [ + color := anObject +] + +{ #category : #accessing } +NeoJSONTestObject3 >> transparent [ + ^ transparent +] + +{ #category : #accessing } +NeoJSONTestObject3 >> transparent: anObject [ + transparent := anObject +] diff --git a/repository/Neo-JSON-Tests/NeoJSONValidation.class.st b/repository/Neo-JSON-Tests/NeoJSONValidation.class.st new file mode 100644 index 0000000..385cf97 --- /dev/null +++ b/repository/Neo-JSON-Tests/NeoJSONValidation.class.st @@ -0,0 +1,239 @@ +" +I am NeoJSONValidation, a set of tests to validate NeoJSON against some external rules. + +Both positive & negative tests are includes. +Some of these are implementation choices. + +http://seriot.ch/parsing_json.php +https://github.com/nst/JSONTestSuite +https://github.com/nst/JSONTestSuite.git + test_parsing + test_transform + +https://github.com/miloyip/nativejson-benchmark +https://github.com/miloyip/nativejson-benchmark.git + data/jsonchecker + data/roundtrip + +This can only be run with the correct setup (checkout/config). + + NeoJSONValidation new runNativeJsonBenchmarkRoundTrip. + NeoJSONValidation new runNativeJsonBenchmarkJsonCheckerPasses. + NeoJSONValidation new runNativeJsonBenchmarkJsonCheckerFailures. + + NeoJSONValidation new runJsonTestSuiteTestParsingPasses. + NeoJSONValidation new runJsonTestSuiteTestParsingFailures. + NeoJSONValidation new runJsonTestSuiteTestParsingInfo. + +Logging goes to a file, neo-json-validation.log +" +Class { + #name : #NeoJSONValidation, + #superclass : #Object, + #instVars : [ + 'gitDirectory', + 'logStream' + ], + #category : 'Neo-JSON-Tests' +} + +{ #category : #private } +NeoJSONValidation >> closeLog [ + logStream ifNotNil: [ + logStream close. + logStream := nil ]. + ^ self logFile exists + ifTrue: [ self logFile contents ] + ifFalse: [ 'log file is empty' ] +] + +{ #category : #private } +NeoJSONValidation >> ensureLog [ + logStream ifNil: [ + logStream := self logFile ensureDelete; writeStream. + logStream setToEnd ] + +] + +{ #category : #accessing } +NeoJSONValidation >> gitDirectory [ + ^ gitDirectory ifNil: [ gitDirectory := FileLocator home / #Develop / #git ] +] + +{ #category : #accessing } +NeoJSONValidation >> gitDirectory: fileReference [ + gitDirectory := fileReference +] + +{ #category : #accessing } +NeoJSONValidation >> jsonTestSuiteDirectory [ + ^ self gitDirectory / #JSONTestSuite +] + +{ #category : #accessing } +NeoJSONValidation >> jsonTestSuiteTestParsingDirectory [ + ^ self jsonTestSuiteDirectory / 'test_parsing' +] + +{ #category : #accessing } +NeoJSONValidation >> jsonTestSuiteTestParsingFailFiles [ + ^ self jsonTestSuiteTestParsingDirectory childrenMatching: 'n_*.json' +] + +{ #category : #accessing } +NeoJSONValidation >> jsonTestSuiteTestParsingInfoFiles [ + ^ self jsonTestSuiteTestParsingDirectory childrenMatching: 'i_*.json' +] + +{ #category : #accessing } +NeoJSONValidation >> jsonTestSuiteTestParsingPassFiles [ + ^ self jsonTestSuiteTestParsingDirectory childrenMatching: 'y_*.json' +] + +{ #category : #accessing } +NeoJSONValidation >> jsonTestSuiteTestTransformDirectory [ + ^ self jsonTestSuiteDirectory / 'test_transform' +] + +{ #category : #private } +NeoJSONValidation >> log: message [ + self ensureLog. + logStream nextPutAll: message; lf; flush + +] + +{ #category : #private } +NeoJSONValidation >> logFile [ + ^ 'neo-json-validation.log' asFileReference +] + +{ #category : #accessing } +NeoJSONValidation >> nativeJsonBenchmarkDataDirectory [ + ^ self nativeJsonBenchmarkDirectory / #data +] + +{ #category : #accessing } +NeoJSONValidation >> nativeJsonBenchmarkDirectory [ + ^ self gitDirectory / 'nativejson-benchmark' +] + +{ #category : #accessing } +NeoJSONValidation >> nativeJsonBenchmarkJsonCheckerDirectory [ + ^ self nativeJsonBenchmarkDataDirectory / #jsonchecker +] + +{ #category : #accessing } +NeoJSONValidation >> nativeJsonBenchmarkJsonCheckerFailFiles [ + ^ self nativeJsonBenchmarkJsonCheckerDirectory childrenMatching: 'fail*.json' +] + +{ #category : #accessing } +NeoJSONValidation >> nativeJsonBenchmarkJsonCheckerPassFiles [ + ^ self nativeJsonBenchmarkJsonCheckerDirectory childrenMatching: 'pass*.json' +] + +{ #category : #accessing } +NeoJSONValidation >> nativeJsonBenchmarkRoundTripDirectory [ + ^ self nativeJsonBenchmarkDataDirectory / #roundtrip +] + +{ #category : #accessing } +NeoJSONValidation >> nativeJsonBenchmarkRoundTripFiles [ + ^ self nativeJsonBenchmarkRoundTripDirectory children +] + +{ #category : #running } +NeoJSONValidation >> runJsonTestSuiteTestParsingFailures [ + ^ self + validateFiles: self jsonTestSuiteTestParsingFailFiles + usingTest: [ :file | + | data success | + success := false. + [ data := file readStreamDo: [ :in | (NeoJSONReader on: in) next; failIfNotAtEnd ] ] + on: NeoJSONParseError + do: [ :exception | self log: exception printString. success := true ]. + success ] +] + +{ #category : #running } +NeoJSONValidation >> runJsonTestSuiteTestParsingInfo [ + ^ self + validateFiles: self jsonTestSuiteTestParsingInfoFiles + usingTest: [ :file | + | data success | + success := true. + [ data := file readStreamDo: [ :in | (NeoJSONReader on: in) next ] ] + on: NeoJSONParseError + do: [ :exception | self log: exception printString. success := false ]. + success ] +] + +{ #category : #running } +NeoJSONValidation >> runJsonTestSuiteTestParsingPasses [ + ^ self + validateFiles: self jsonTestSuiteTestParsingPassFiles + usingTest: [ :file | + | data success | + success := true. + [ data := file readStreamDo: [ :in | (NeoJSONReader on: in) next ] ] + on: NeoJSONParseError + do: [ :exception | self log: exception printString. success := false ]. + success ] +] + +{ #category : #running } +NeoJSONValidation >> runNativeJsonBenchmarkJsonCheckerFailures [ + ^ self + validateFiles: self nativeJsonBenchmarkJsonCheckerFailFiles + usingTest: [ :file | + | data success | + success := false. + [ data := file readStreamDo: [ :in | (NeoJSONReader on: in) next; failIfNotAtEnd ] ] + on: NeoJSONParseError + do: [ :exception | self log: exception printString. success := true ]. + success ] +] + +{ #category : #running } +NeoJSONValidation >> runNativeJsonBenchmarkJsonCheckerPasses [ + ^ self + validateFiles: self nativeJsonBenchmarkJsonCheckerPassFiles + usingTest: [ :file | + | data success | + success := true. + [ data := file readStreamDo: [ :in | (NeoJSONReader on: in) next ] ] + on: NeoJSONParseError + do: [ :exception | self log: exception printString. success := false ]. + success ] +] + +{ #category : #running } +NeoJSONValidation >> runNativeJsonBenchmarkRoundTrip [ + ^ self + validateFiles: self nativeJsonBenchmarkRoundTripFiles + usingTest: [ :file | + | data json | + data := file readStreamDo: [ :in | (NeoJSONReader on: in) next ]. + json := NeoJSONWriter toString: data. + json = file contents ] +] + +{ #category : #private } +NeoJSONValidation >> validateFiles: files usingTest: block [ + | total succeeded failed | + total := succeeded := failed := 0. + files do: [ :file | + | success | + self log: 'Running ' , file pathString. + self log: ([ file contents contractTo: 64 ] on: Error do: [ :exception | exception printString ]). + success := [ block value: file ] + on: Error + do: [ :exception | self log: ' Errored. ' , exception printString. false ]. + total := total + 1. + success + ifTrue: [ succeeded := succeeded + 1 ] + ifFalse: [ failed := failed + 1 ]. + self log: (success ifTrue: [ ' Succeeded' ] ifFalse: [ ' Failed' ]); log: '' ]. + self log: ('{1} total = {2} succeeded + {3} failed' format: (Array with: total with: succeeded with: failed) ). + ^ self closeLog +] diff --git a/repository/Neo-JSON-Tests/NeoJSONWriteReadAsciiOnlyTests.class.st b/repository/Neo-JSON-Tests/NeoJSONWriteReadAsciiOnlyTests.class.st new file mode 100644 index 0000000..20a5172 --- /dev/null +++ b/repository/Neo-JSON-Tests/NeoJSONWriteReadAsciiOnlyTests.class.st @@ -0,0 +1,16 @@ +" +I am NeoJSONWriteReadAsciiOnlyTests. +" +Class { + #name : #NeoJSONWriteReadAsciiOnlyTests, + #superclass : #NeoJSONWriteReadTests, + #category : 'Neo-JSON-Tests' +} + +{ #category : #private } +NeoJSONWriteReadAsciiOnlyTests >> writeRead: object [ + | json | + json := String streamContents: [ :stream | + (NeoJSONWriter on: stream) asciiOnly: true; nextPut: object ]. + ^ (NeoJSONReader on: json readStream) next +] diff --git a/repository/Neo-JSON-Tests/NeoJSONWriteReadMockStreamTests.class.st b/repository/Neo-JSON-Tests/NeoJSONWriteReadMockStreamTests.class.st new file mode 100644 index 0000000..1c55194 --- /dev/null +++ b/repository/Neo-JSON-Tests/NeoJSONWriteReadMockStreamTests.class.st @@ -0,0 +1,18 @@ +" +I am NeoJSONWriteReadMockStreamTests. +" +Class { + #name : #NeoJSONWriteReadMockStreamTests, + #superclass : #NeoJSONWriteReadTests, + #category : 'Neo-JSON-Tests' +} + +{ #category : #private } +NeoJSONWriteReadMockStreamTests >> writeRead: object [ + | json | + json := String streamContents: [ :stream | + (NeoJSONWriter on: (NeoJSONMockStream on: stream)) + prettyPrint: true; + nextPut: object ]. + ^ (NeoJSONReader on: (NeoJSONMockStream on: json readStream)) next +] diff --git a/repository/Neo-JSON-Tests/NeoJSONWriteReadPrettyPrintedTests.class.st b/repository/Neo-JSON-Tests/NeoJSONWriteReadPrettyPrintedTests.class.st new file mode 100644 index 0000000..8aa0f7d --- /dev/null +++ b/repository/Neo-JSON-Tests/NeoJSONWriteReadPrettyPrintedTests.class.st @@ -0,0 +1,61 @@ +" +I am NeoJSONWriteReadPrettyPrintedTests. +" +Class { + #name : #NeoJSONWriteReadPrettyPrintedTests, + #superclass : #NeoJSONWriteReadTests, + #category : 'Neo-JSON-Tests' +} + +{ #category : #testing } +NeoJSONWriteReadPrettyPrintedTests >> testDictionaryOfObject2 [ + | data json reader | + data := Dictionary new. + data + at: 'one' put: NeoJSONTestObject2 example1; + at: 'two' put: NeoJSONTestObject2 example1. + json := NeoJSONWriter toStringPretty: data. + reader := NeoJSONReader on: json readStream. + reader for: #DictionaryOfObject2 customDo: [ :mapping | + mapping mapWithValueSchema: NeoJSONTestObject2 ]. + self + assert: (reader nextAs: #DictionaryOfObject2) + equals: data +] + +{ #category : #testing } +NeoJSONWriteReadPrettyPrintedTests >> testObject1 [ + | json | + json := NeoJSONWriter toStringPretty: NeoJSONTestObject1 example1. + self + assert: (NeoJSONReader fromString: json as: NeoJSONTestObject1) + equals: NeoJSONTestObject1 example1 +] + +{ #category : #testing } +NeoJSONWriteReadPrettyPrintedTests >> testObject2 [ + | json | + json := NeoJSONWriter toStringPretty: NeoJSONTestObject2 example1. + self + assert: (NeoJSONReader fromString: json as: NeoJSONTestObject2) + equals: NeoJSONTestObject2 example1 +] + +{ #category : #testing } +NeoJSONWriteReadPrettyPrintedTests >> testObject3 [ + | json | + json := NeoJSONWriter toStringPretty: NeoJSONTestObject3 example1. + self + assert: (NeoJSONReader fromString: json as: NeoJSONTestObject3) + equals: NeoJSONTestObject3 example1 +] + +{ #category : #private } +NeoJSONWriteReadPrettyPrintedTests >> writeRead: object [ + | json | + json := String streamContents: [ :stream | + (NeoJSONWriter on: stream) + prettyPrint: true; + nextPut: object ]. + ^ (NeoJSONReader on: json readStream) next +] diff --git a/repository/Neo-JSON-Tests/NeoJSONWriteReadTests.class.st b/repository/Neo-JSON-Tests/NeoJSONWriteReadTests.class.st new file mode 100644 index 0000000..16d515b --- /dev/null +++ b/repository/Neo-JSON-Tests/NeoJSONWriteReadTests.class.st @@ -0,0 +1,121 @@ +" +I am NeoJSONWriteReadTests. +" +Class { + #name : #NeoJSONWriteReadTests, + #superclass : #TestCase, + #category : 'Neo-JSON-Tests' +} + +{ #category : #testing } +NeoJSONWriteReadTests >> testDictionaryOfObject2 [ + | data json reader | + data := Dictionary new. + data + at: 'one' put: NeoJSONTestObject2 example1; + at: 'two' put: NeoJSONTestObject2 example1. + json := NeoJSONWriter toString: data. + reader := NeoJSONReader on: json readStream. + reader for: #DictionaryOfObject2 customDo: [ :mapping | + mapping mapWithValueSchema: NeoJSONTestObject2 ]. + self + assert: (reader nextAs: #DictionaryOfObject2) + equals: data +] + +{ #category : #testing } +NeoJSONWriteReadTests >> testFloats [ + | objects | + objects := OrderedCollection new add: Float pi; add: 1.0; add: -1.0; add: 0.0; add: 1.5e6; add: -1.5e6; add: 1.5e-6; add: -1.5e-6; yourself. + (self writeRead: objects) + with: objects + do: [ :first :second | self assert: (first closeTo: second) ] +] + +{ #category : #testing } +NeoJSONWriteReadTests >> testIntegers [ + | objects | + objects := Array with: 1 with: -1 with: 0 with: 123467890 with: -1234567890. + self + assert: (self writeRead: objects) + equals: objects +] + +{ #category : #testing } +NeoJSONWriteReadTests >> testLists [ + | objects | + objects := Array with: #(1 2 3) with: #() with: #( 'foo' 'bar'). + self + assert: (self writeRead: objects) + equals: objects +] + +{ #category : #testing } +NeoJSONWriteReadTests >> testMaps [ + | objects | + objects := Array + with: Dictionary new + with: (Dictionary with: 'x' -> 1) + with: (Dictionary newFromPairs: #( 'foo' true 'bar' false 'zero' 0 'null' nil 'string' 'Hello World!' )). + self + assert: (self writeRead: objects) + equals: objects +] + +{ #category : #testing } +NeoJSONWriteReadTests >> testObject1 [ + | json | + json := NeoJSONWriter toString: NeoJSONTestObject1 example1. + self + assert: (NeoJSONReader fromString: json as: NeoJSONTestObject1) + equals: NeoJSONTestObject1 example1 +] + +{ #category : #testing } +NeoJSONWriteReadTests >> testObject2 [ + | json | + json := NeoJSONWriter toString: NeoJSONTestObject2 example1. + self + assert: (NeoJSONReader fromString: json as: NeoJSONTestObject2) + equals: NeoJSONTestObject2 example1 +] + +{ #category : #testing } +NeoJSONWriteReadTests >> testObject3 [ + | json | + json := NeoJSONWriter toString: NeoJSONTestObject3 example1. + self + assert: (NeoJSONReader fromString: json as: NeoJSONTestObject3) + equals: NeoJSONTestObject3 example1 +] + +{ #category : #testing } +NeoJSONWriteReadTests >> testSpecials [ + | objects | + objects := Array with: true with: false with: nil. + self + assert: (self writeRead: objects) + equals: objects +] + +{ #category : #testing } +NeoJSONWriteReadTests >> testStrings [ + | objects | + objects := OrderedCollection new + add: 'foo'; add: 'Foo BAR'; add: ''; add: ' \\'''; + add: 'élève en Français'; + add: (Character codePoint: 12354) asString; "HIRAGANA LETTER A" + yourself; + asArray. + self + assert: (self writeRead: objects) + equals: objects +] + +{ #category : #private } +NeoJSONWriteReadTests >> writeRead: object [ + | json | + json := String streamContents: [ :stream | + (NeoJSONWriter on: stream) nextPut: object ]. + ^ (NeoJSONReader on: json readStream) next +] diff --git a/repository/Neo-JSON-Tests/NeoJSONWriterTests.class.st b/repository/Neo-JSON-Tests/NeoJSONWriterTests.class.st new file mode 100644 index 0000000..79d25bc --- /dev/null +++ b/repository/Neo-JSON-Tests/NeoJSONWriterTests.class.st @@ -0,0 +1,372 @@ +" +I am NeoJSONWriterTests, a test suite for NeoJSONWriter. +" +Class { + #name : #NeoJSONWriterTests, + #superclass : #TestCase, + #category : 'Neo-JSON-Tests' +} + +{ #category : #testing } +NeoJSONWriterTests >> testAsciiOnlyStrings [ + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) + asciiOnly: true; + nextPut: object ] ]. + self assert: (writer value: 'élève français') equals: '"\u00E9l\u00E8ve fran\u00E7ais"'. + self assert: (writer value: 'foo') equals: '"foo"'. + self assert: (writer value: 'Foo BAR') equals: '"Foo BAR"'. + self assert: (writer value: '') equals: '""'. + self + assert: (writer value: (String withAll: ( OrderedCollection new + add: $"; + add: $\; + add: $/; + add: Character tab; + add: Character cr; + add: Character lf; + add: Character newPage; + add: Character backspace; + yourself ))) + equals: '"\"\\/\t\r\n\f\b"' + + +] + +{ #category : #testing } +NeoJSONWriterTests >> testAssociation [ + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) + for: Association do: [ :mapping | + mapping mapAccessors: #(key value) ]; + nextPut: object ] ]. + self assert: (writer value: 'foo' -> 42) equals: '{"key":"foo","value":42}'. + self assert: (writer value: Association new) equals: '{}' +] + +{ #category : #testing } +NeoJSONWriterTests >> testBooleans [ + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) nextPut: object ] ]. + self assert: (writer value: true) equals: 'true'. + self assert: (writer value: false) equals: 'false'. +] + +{ #category : #testing } +NeoJSONWriterTests >> testByteArray [ + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) nextPut: object ] ]. + self assert: (writer value: #[1 2 3]) equals: '[1,2,3]'. + self assert: (writer value: #[]) equals: '[]' + +] + +{ #category : #testing } +NeoJSONWriterTests >> testDate [ + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) + for: Date customDo: [ :mapping | + mapping encoder: [ :date | date yyyymmdd ] ]; + nextPut: object ] ]. + self assert: (writer value: (Date fromString: '2012-06-08')) equals: '"2012-06-08"' +] + +{ #category : #testing } +NeoJSONWriterTests >> testDateAndTime [ + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) + for: DateAndTime customDo: [ :mapping | + mapping encoder: [ :dateAndTime | dateAndTime printString ] ]; + nextPut: object ] ]. + self + assert: (writer value: (DateAndTime year: 2012 month: 2 day: 14 hour: 16 minute: 40 second: 18 offset: 1 hour)) + equals: '"2012-02-14T16:40:18+01:00"' +] + +{ #category : #testing } +NeoJSONWriterTests >> testFloats [ + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) nextPut: object ] ]. + self assert: (writer value: 123.0) equals: '123.0'. + self assert: (writer value: -123.0) equals: '-123.0'. + self assert: (writer value: 0.0) equals: '0.0'. +] + +{ #category : #testing } +NeoJSONWriterTests >> testIntegers [ + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) nextPut: object ] ]. + self assert: (writer value: 123) equals: '123'. + self assert: (writer value: -123) equals: '-123'. + self assert: (writer value: 0) equals: '0'. +] + +{ #category : #testing } +NeoJSONWriterTests >> testLists [ + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) nextPut: object ] ]. + self assert: (writer value: #(1 2 3)) equals: '[1,2,3]'. + self assert: (writer value: #()) equals: '[]'. + +] + +{ #category : #testing } +NeoJSONWriterTests >> testListsExtra [ + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) nextPut: object ] ]. + #( OrderedCollection LinkedList ByteArray IntegerArray SortedCollection ) do: [ :each | + Smalltalk at: each ifPresent: [ :collectionClass | + self assert: (writer value: (collectionClass withAll: #(1 2 3))) equals: '[1,2,3]'. + self assert: (writer value: collectionClass new) equals: '[]' ] ] + +] + +{ #category : #testing } +NeoJSONWriterTests >> testMaps [ + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) nextPut: object ] ]. + self assert: ((writer value: (Dictionary newFromPairs: #( 'x' 1 'y' 2))) includesSubstring: '"x":1'). + self assert: ((writer value: (Dictionary newFromPairs: #( 'x' 1 'y' 2))) includesSubstring: '"y":2'). + self assert: (writer value: Dictionary new) equals: '{}'. + +] + +{ #category : #testing } +NeoJSONWriterTests >> testMapsExtra [ + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) nextPut: object ] ]. + self assert: (writer value: (IdentityDictionary newFromPairs: #( 'x' 1))) equals: '{"x":1}'. + self assert: (writer value: IdentityDictionary new) equals: '{}'. + #( SmallDictionary OrderedDictionary OrderedIdentityDictionary ) do: [ :each | + | dictionaryClass | + dictionaryClass := Smalltalk at: each ifAbsent: [ nil ]. + dictionaryClass ifNotNil: [ + self assert: (writer value: (dictionaryClass new at: 'x' put: 1; at: 'y' put: 2; yourself)) equals: '{"x":1,"y":2}'. + self assert: (writer value: dictionaryClass new) equals: '{}'] ] + +] + +{ #category : #testing } +NeoJSONWriterTests >> testNextPutStringAsHex [ + | output | + output := String + streamContents: [ :out | + (NeoJSONWriter on: out) + for: #StringAsHex + customDo: [ :mapping | + mapping + encoder: [ :x | x asByteArray hex asUppercase ]; + decoder: [ :x | (ByteArray readHexFrom: x) asString ] ]; + nextPut: 'Foo bar!' as: #StringAsHex ]. + self assert: output equals: '"466F6F2062617221"' +] + +{ #category : #testing } +NeoJSONWriterTests >> testNonBMPCharacterEncoding [ + "Characters not in the Basic Multilingual Plane are encoded as a UTF-16 surrogate pair" + + | string json | + string := 16r1D11E asCharacter asString. "MUSICAL SYMBOL G CLEF" + json := String streamContents: [ :out | + (NeoJSONWriter on: out) asciiOnly: true; nextPut: string ]. + self assert: json equals: '"\uD834\uDD1E"' +] + +{ #category : #testing } +NeoJSONWriterTests >> testNull [ + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) nextPut: object ] ]. + self assert: (writer value: nil) equals: 'null' +] + +{ #category : #testing } +NeoJSONWriterTests >> testPoint [ + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) nextPut: object ] ]. + self should: [ writer value: 1@2 ] raise: NeoJSONMappingNotFound +] + +{ #category : #testing } +NeoJSONWriterTests >> testPoint1 [ + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) + for: Point do: [ :mapping | + mapping mapProperty: 'x' getter: [ :point | point x ] setter: [ :point :value | point x: value ]. + mapping mapProperty: 'y' getter: [ :point | point y ] setter: [ :point :value | point y: value ]. ]; + nextPut: object ] ]. + self assert: (writer value: 1@2) equals: '{"x":1,"y":2}'. + self assert: (writer value: Point new) equals: '{}' +] + +{ #category : #testing } +NeoJSONWriterTests >> testPoint2 [ + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) + mapAllInstVarsFor: Point; + nextPut: object ] ]. + self assert: (writer value: 1@2) equals: '{"x":1,"y":2}'. + self assert: (writer value: Point new) equals: '{}' +] + +{ #category : #testing } +NeoJSONWriterTests >> testPoint3 [ + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) + for: Point do: [ :mapping | + mapping mapInstVars: #(x y) ]; + nextPut: object ] ]. + self assert: (writer value: 1@2) equals: '{"x":1,"y":2}'. + self assert: (writer value: Point new) equals: '{}' +] + +{ #category : #testing } +NeoJSONWriterTests >> testPointUsingAsString [ + | output | + output := String + streamContents: [ :out | + (NeoJSONWriter on: out) + for: Point + do: [ :mapping | + (mapping + mapProperty: #x + getter: [ :object | object x ] + setter: [ :object :value | object setX: value setY: object y ]) + valueSchema: #AsString. + (mapping + mapProperty: #y + getter: [ :object | object y ] + setter: [ :object :value | object setX: object x setY: value ]) + valueSchema: #AsString ]; + for: #AsString + customDo: [ :mapping | + mapping + encoder: [ :x | x asString ]; + decoder: [ :x | x asNumber ] ]; + nextPut: 1 @ 2 ]. + self assert: output equals: '{"x":"1","y":"2"}' +] + +{ #category : #testing } +NeoJSONWriterTests >> testPointWriteNil [ + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) + writeNil: true; + mapAllInstVarsFor: Point; + nextPut: object ] ]. + self assert: (writer value: 1@2) equals: '{"x":1,"y":2}'. + self assert: (writer value: Point new) equals: '{"x":null,"y":null}' +] + +{ #category : #testing } +NeoJSONWriterTests >> testPreservePropertyOrder [ + | writer testObject | + (testObject := NeoJSONTestObject2 new) + id: 123; + width: 100; + height: 50; + data: 'test'. + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) + for: NeoJSONTestObject2 do: [ :mapping | mapping mapInstVars: #(id width height data) ]; + nextPut: object ] ]. + self assert: (writer value: testObject) equals: '{"id":123,"width":100,"height":50,"data":"test"}'. + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) + for: NeoJSONTestObject2 do: [ :mapping | mapping mapInstVars: #(width height data id) ]; + nextPut: object ] ]. + self assert: (writer value: testObject) equals: '{"width":100,"height":50,"data":"test","id":123}'. + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) + for: NeoJSONTestObject2 do: [ :mapping | mapping mapInstVars: #(data id height width) ]; + nextPut: object ] ]. + self assert: (writer value: testObject) equals: '{"data":"test","id":123,"height":50,"width":100}'. + +] + +{ #category : #testing } +NeoJSONWriterTests >> testStrings [ + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) nextPut: object ] ]. + self assert: (writer value: 'foo') equals: '"foo"'. + self assert: (writer value: 'Foo BAR') equals: '"Foo BAR"'. + self assert: (writer value: '') equals: '""'. + self + assert: (writer value: (String withAll: ( OrderedCollection new + add: $"; + add: $\; + add: $/; + add: Character tab; + add: Character cr; + add: Character lf; + add: Character newPage; + add: Character backspace; + yourself ))) + equals: '"\"\\/\t\r\n\f\b"' + + + +] + +{ #category : #testing } +NeoJSONWriterTests >> testSymbol [ + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) nextPut: object ] ]. + self assert: (writer value: #foo) equals: '"foo"'. + self assert: (writer value: #'FOO-1') equals: '"FOO-1"' + +] + +{ #category : #testing } +NeoJSONWriterTests >> testTime [ + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) + for: Time customDo: [ :mapping | + mapping encoder: [ :time | time printString ] ]; + nextPut: object ] ]. + self assert: ((writer value: (Time fromSeconds: 52208)) includesSubstring: '2:30:08') +] diff --git a/repository/Neo-JSON-Tests/package.st b/repository/Neo-JSON-Tests/package.st new file mode 100644 index 0000000..cac63e2 --- /dev/null +++ b/repository/Neo-JSON-Tests/package.st @@ -0,0 +1 @@ +Package { #name : #'Neo-JSON-Tests' } From b52e89b6036448b3e22065dddafd8adf12d330f0 Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Mon, 1 Oct 2018 23:10:39 +0200 Subject: [PATCH 07/90] Create .smalltalk.ston --- .smalltalk.ston | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .smalltalk.ston diff --git a/.smalltalk.ston b/.smalltalk.ston new file mode 100644 index 0000000..65d9618 --- /dev/null +++ b/.smalltalk.ston @@ -0,0 +1,9 @@ +SmalltalkCISpec { + #loading : [ + SCIMetacelloLoadSpec { + #baseline : 'NeoJSON', + #directory : 'repository', + #platforms : [ #pharo ] + } + ] +} From 20ff4d732ed8e99612d4ce5359e3d56f0eecd25b Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Mon, 1 Oct 2018 23:13:49 +0200 Subject: [PATCH 08/90] Create .travis.yml --- .travis.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..9be676a --- /dev/null +++ b/.travis.yml @@ -0,0 +1,10 @@ +language: smalltalk +sudo: enabled + +os: + - linux + +smalltalk: + - Pharo-7.0 + - Pharo-6.1 + - Pharo64-7.0 From aa7ab9d4ba09c603153b777c597117d940c5ba48 Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Mon, 1 Oct 2018 23:14:34 +0200 Subject: [PATCH 09/90] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index af27d5c..14f5c69 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ NeoJSON NeoJSON is an elegant and efficient standalone Smalltalk framework to read and write JSON converting to or from Smalltalk objects. +[![Build Status](https://travis-ci.org/svenvc/NeoJSON.svg?branch=master)](https://travis-ci.org/svenvc/NeoJSON) + MIT Licensed. Go ahead and read the [NeoJSON paper](https://github.com/svenvc/docs/blob/master/neo/neo-json-paper.md). From 363b125c3fc9a37d5142072417a52f61200be99c Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Mon, 1 Oct 2018 23:24:54 +0200 Subject: [PATCH 10/90] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 14f5c69..ff1c90a 100644 --- a/README.md +++ b/README.md @@ -8,3 +8,6 @@ NeoJSON is an elegant and efficient standalone Smalltalk framework to read and w MIT Licensed. Go ahead and read the [NeoJSON paper](https://github.com/svenvc/docs/blob/master/neo/neo-json-paper.md). + +Basically, NeoJSONWriter is used to write a JSON representation of Smalltalk objects to a textual stream. +Similary, NeoJSONReader is used to parse a JSON representation from a textual stream into Smalltalk objects. From 2248f982ce3f4318e024e02002d3af50f72bca7b Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Mon, 1 Oct 2018 23:30:27 +0200 Subject: [PATCH 11/90] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index ff1c90a..d8a1c98 100644 --- a/README.md +++ b/README.md @@ -11,3 +11,6 @@ Go ahead and read the [NeoJSON paper](https://github.com/svenvc/docs/blob/master Basically, NeoJSONWriter is used to write a JSON representation of Smalltalk objects to a textual stream. Similary, NeoJSONReader is used to parse a JSON representation from a textual stream into Smalltalk objects. + +http://www.json.org +https://en.wikipedia.org/wiki/JSON From d79d6a1a6e260e14ed329e47f59912a24a88bf93 Mon Sep 17 00:00:00 2001 From: Norbert Hartl Date: Tue, 6 Nov 2018 15:52:05 +0100 Subject: [PATCH 12/90] fixed bogus formatted .properties file --- repository/.properties | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/repository/.properties b/repository/.properties index 4e21084..53a5454 100644 --- a/repository/.properties +++ b/repository/.properties @@ -1,4 +1,3 @@ { #format : #tonel -}e -} \ No newline at end of file +} From 14da7628190cdc6b94462c8a41650b54f44a5ea9 Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Sat, 15 Dec 2018 17:32:52 +0100 Subject: [PATCH 13/90] added installation instructions --- README.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d8a1c98..4b7876e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ -NeoJSON -======= +# NeoJSON NeoJSON is an elegant and efficient standalone Smalltalk framework to read and write JSON converting to or from Smalltalk objects. @@ -14,3 +13,20 @@ Similary, NeoJSONReader is used to parse a JSON representation from a textual st http://www.json.org https://en.wikipedia.org/wiki/JSON + +## Installation + +You can load NeoJSON using Metacello + +```Smalltalk +Metacello new + repository: 'github://svenvc/NeoJSON/repository'; + baseline: 'NeoJSON'; + load. +``` + +You can use the following dependency from your own Metacello configuration or baseline + +```Smalltalk +spec baseline: 'NeoJSON' with: [ spec repository: 'github://svenvc/NeoJSON/repository' ]. +``` From c368bbf475f60d564cd3fb708e99b92efea8ffd3 Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Mon, 25 Feb 2019 16:57:09 +0100 Subject: [PATCH 14/90] Change NeoJSONWriter to give an error when map keys/names are not strings (as per the standard) Add a unit test, refactor #encodeKey: messages a bit --- repository/Neo-JSON-Core/NeoJSONWriter.class.st | 15 +++++++++------ .../Neo-JSON-Tests/NeoJSONWriterTests.class.st | 10 ++++++++++ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/repository/Neo-JSON-Core/NeoJSONWriter.class.st b/repository/Neo-JSON-Core/NeoJSONWriter.class.st index 4616e64..697dd87 100644 --- a/repository/Neo-JSON-Core/NeoJSONWriter.class.st +++ b/repository/Neo-JSON-Core/NeoJSONWriter.class.st @@ -93,20 +93,23 @@ NeoJSONWriter >> encodeChar: char [ ] { #category : #private } -NeoJSONWriter >> encodeKey: key value: value [ +NeoJSONWriter >> encodeKey: key [ + key isString ifFalse: [ ^ self error: 'JSON key names in objects must be strings' ]. self nextPut: key. self prettyPrintSpace. writeStream nextPut: $:. - self prettyPrintSpace. + self prettyPrintSpace +] + +{ #category : #private } +NeoJSONWriter >> encodeKey: key value: value [ + self encodeKey: key. self nextPut: value ] { #category : #private } NeoJSONWriter >> encodeKey: key value: value as: valueSchema [ - self nextPut: key. - self prettyPrintSpace. - writeStream nextPut: $:. - self prettyPrintSpace. + self encodeKey: key. self nextPut: value as: valueSchema ] diff --git a/repository/Neo-JSON-Tests/NeoJSONWriterTests.class.st b/repository/Neo-JSON-Tests/NeoJSONWriterTests.class.st index 79d25bc..0ddf5e4 100644 --- a/repository/Neo-JSON-Tests/NeoJSONWriterTests.class.st +++ b/repository/Neo-JSON-Tests/NeoJSONWriterTests.class.st @@ -141,6 +141,16 @@ NeoJSONWriterTests >> testListsExtra [ ] +{ #category : #testing } +NeoJSONWriterTests >> testMapKeysMustBeStrings [ + self should: [ NeoJSONWriter toString: { 1->#a } asDictionary ] raise: Error. + self should: [ NeoJSONWriter toString: { true->#a } asDictionary ] raise: Error. + self should: [ NeoJSONWriter toString: { nil->#a } asDictionary ] raise: Error. + self should: [ NeoJSONWriter toString: { #()->#a } asDictionary ] raise: Error. + self should: [ NeoJSONWriter toString: { Dictionary new->#a } asDictionary ] raise: Error. + self should: [ NeoJSONWriter toString: { Float pi->#a } asDictionary ] raise: Error. +] + { #category : #testing } NeoJSONWriterTests >> testMaps [ | writer | From f585bec28158771e658e313a68ecdbdf90ead759 Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Fri, 12 Mar 2021 18:06:09 +0100 Subject: [PATCH 15/90] Create CI.yml --- .github/workflows/CI.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/CI.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000..6ff1b5f --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,19 @@ +name: CI + +on: [ push, pull_request, workflow_dispatch ] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + smalltalk: [ Pharo64-9.0, Pharo64-8.0, Pharo64-7.0 ] + name: ${{ matrix.smalltalk }} + steps: + - uses: actions/checkout@v2 + - uses: hpi-swa/setup-smalltalkCI@v1 + with: + smalltalk-version: ${{ matrix.smalltalk }} + - run: smalltalkci -s ${{ matrix.smalltalk }} + shell: bash + timeout-minutes: 1 From d6f03446e6407858aa709add6cf80a461be22121 Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Fri, 12 Mar 2021 18:08:44 +0100 Subject: [PATCH 16/90] Using new CI badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4b7876e..975d54d 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ NeoJSON is an elegant and efficient standalone Smalltalk framework to read and write JSON converting to or from Smalltalk objects. -[![Build Status](https://travis-ci.org/svenvc/NeoJSON.svg?branch=master)](https://travis-ci.org/svenvc/NeoJSON) +[![CI](https://github.com/svenvc/NeoJSON/actions/workflows/CI.yml/badge.svg)](https://github.com/svenvc/NeoJSON/actions/workflows/CI.yml) MIT Licensed. From cf48693413ef1277592cf5196b2fa431d97f5fff Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Fri, 12 Mar 2021 18:10:03 +0100 Subject: [PATCH 17/90] Stop using Travis CI --- .travis.yml | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9be676a..0000000 --- a/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: smalltalk -sudo: enabled - -os: - - linux - -smalltalk: - - Pharo-7.0 - - Pharo-6.1 - - Pharo64-7.0 From a35ab06e4f472ac18a1de930c4bbc4a4e49fc652 Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Wed, 19 May 2021 10:03:49 +0200 Subject: [PATCH 18/90] Add NeoJSONWriter>#floatPrinter: to set an optional float printer Add NeoJSONFloatPrinter as a first custom implementation with fixed parameters (for now) Add NeoJSONFloatPrinterTests Add NeoJSONWriterTests>>#testFloatPrinter --- .../NeoJSONFloatPrinter.class.st | 154 ++++++++++++++++++ .../Neo-JSON-Core/NeoJSONWriter.class.st | 23 ++- .../NeoJSONFloatPrintrTests.class.st | 80 +++++++++ .../NeoJSONWriterTests.class.st | 20 +++ 4 files changed, 274 insertions(+), 3 deletions(-) create mode 100644 repository/Neo-JSON-Core/NeoJSONFloatPrinter.class.st create mode 100644 repository/Neo-JSON-Tests/NeoJSONFloatPrintrTests.class.st diff --git a/repository/Neo-JSON-Core/NeoJSONFloatPrinter.class.st b/repository/Neo-JSON-Core/NeoJSONFloatPrinter.class.st new file mode 100644 index 0000000..146b776 --- /dev/null +++ b/repository/Neo-JSON-Core/NeoJSONFloatPrinter.class.st @@ -0,0 +1,154 @@ +" +I am NeoJSONFloatPrinter. + +I can print Float numbers is a compact, human friendly format. + +The following are hardcoded (for now): + + - base 10 + - precision 5 digits + - decimal point + - exponent e + - NaN, Inf and -Inf + - lower 1e-4 + - upper 1e6 + - decimal notation for abs values inside abs [ lower, upper ] + - scientific notation for abs values outside [ lower, upper ] + - no padding, no trailing zeros in fraction part + - only negative sign, never a positive sign + - no thousands separators + - no engineering notation + +" +Class { + #name : #NeoJSONFloatPrinter, + #superclass : #Object, + #category : #'Neo-JSON-Core' +} + +{ #category : #constants } +NeoJSONFloatPrinter >> base [ + ^ 10 +] + +{ #category : #constants } +NeoJSONFloatPrinter >> decimalPoint [ + ^ $. +] + +{ #category : #constants } +NeoJSONFloatPrinter >> exponent [ + ^ $e +] + +{ #category : #constants } +NeoJSONFloatPrinter >> infinite [ + ^ 'Inf' +] + +{ #category : #constants } +NeoJSONFloatPrinter >> lower [ + ^ self base raisedTo: (self precision - 1) negated +] + +{ #category : #constants } +NeoJSONFloatPrinter >> nan [ + ^ 'NaN' +] + +{ #category : #constants } +NeoJSONFloatPrinter >> precision [ + ^ 5 +] + +{ #category : #printing } +NeoJSONFloatPrinter >> print: float [ + ^ String new: 16 streamContents: [ :out | + self print: float on: out ] +] + +{ #category : #private } +NeoJSONFloatPrinter >> print: fractionPart asFractionOn: stream [ + | zeros | + zeros := 0. "leading zeros are significant, trailing zeros are not printed" + self precision to: 1 by: -1 do: [ :position | | digit | + digit := fractionPart digitAt: position base: self base. + digit = 0 + ifTrue: [ zeros := zeros +1 ] + ifFalse: [ + zeros > 0 ifTrue: [ + zeros timesRepeat: [ stream nextPut: $0 ]. + zeros := 0 ]. + stream nextPut: digit asCharacterDigit ] ] +] + +{ #category : #private } +NeoJSONFloatPrinter >> print: float decimalOn: stream [ + | fractionPart zeros | + stream print: float asInteger. + stream nextPut: self decimalPoint. + fractionPart := (float fractionPart * (self base raisedTo: self precision)) rounded. + zeros := 0. + self precision to: 1 by: -1 do: [ :position | | digit | + digit := fractionPart digitAt: position base: self base. + digit = 0 + ifTrue: [ zeros := zeros +1 ] + ifFalse: [ + zeros > 0 ifTrue: [ zeros timesRepeat: [ stream nextPut: $0 ]. zeros := 0 ]. + stream nextPut: digit asCharacterDigit ] ] +] + +{ #category : #printing } +NeoJSONFloatPrinter >> print: float on: stream [ + | int abs | + (float isZero or: [ float isFinite not ]) + ifTrue: [ ^ self print: float specialOn: stream ]. + self print: float signOn: stream. + ((abs := float abs) between: self lower and: self upper) + ifTrue: [ + (int := abs asInteger) = abs + ifTrue: [ int printOn: stream ] + ifFalse: [ self print: abs decimalOn: stream ] ] + ifFalse: [ self print: abs scientificOn: stream ] +] + +{ #category : #private } +NeoJSONFloatPrinter >> print: float scientificOn: stream [ + | exponent mantissa | + exponent := (float ln / self base ln) floor. + mantissa := float / (self base raisedTo: exponent). + self print: mantissa decimalOn: stream. + stream + nextPut: self exponent; + print: exponent +] + +{ #category : #private } +NeoJSONFloatPrinter >> print: float signOn: stream [ + float sign = -1 + ifTrue: [ stream nextPut: $- ] +] + +{ #category : #private } +NeoJSONFloatPrinter >> print: float specialOn: stream [ + float isZero + ifTrue: [ + stream nextPut: $0 ] + ifFalse: [ + float isNaN + ifTrue: [ + stream nextPutAll: self nan ] + ifFalse: [ + self print: float signOn: stream. + stream nextPutAll: self infinite ] ] +] + +{ #category : #printing } +NeoJSONFloatPrinter >> printFloat: float on: stream [ + self print: float on: stream +] + +{ #category : #constants } +NeoJSONFloatPrinter >> upper [ + ^ self base raisedTo: (self precision + 1) +] diff --git a/repository/Neo-JSON-Core/NeoJSONWriter.class.st b/repository/Neo-JSON-Core/NeoJSONWriter.class.st index 697dd87..fd1c6e2 100644 --- a/repository/Neo-JSON-Core/NeoJSONWriter.class.st +++ b/repository/Neo-JSON-Core/NeoJSONWriter.class.st @@ -31,9 +31,10 @@ Class { 'level', 'newLine', 'asciiOnly', - 'writeNil' + 'writeNil', + 'floatPrinter' ], - #category : 'Neo-JSON-Core' + #category : #'Neo-JSON-Core' } { #category : #'instance creation' } @@ -157,6 +158,14 @@ NeoJSONWriter >> escapeUnicode: codePoint [ ifFalse: [ self error: 'Character Unicode code point outside encoder range' ] ] ] +{ #category : #'initialize-release' } +NeoJSONWriter >> floatPrinter: anObject [ + "Set the float print, an object that implements #printFloat:on: + By default, I am my own float printer" + + floatPrinter := anObject +] + { #category : #private } NeoJSONWriter >> indentedDo: block [ level := level + 1. @@ -172,6 +181,7 @@ NeoJSONWriter >> initialize [ self prettyPrint: false. self asciiOnly: false. self writeNil: false. + self floatPrinter: self. level := 0 ] @@ -252,6 +262,13 @@ NeoJSONWriter >> prettyPrintSpace [ ifTrue: [ writeStream nextPut: Character space ] ] +{ #category : #printing } +NeoJSONWriter >> printFloat: float on: stream [ + "See NeoJSONFloatPrinter for a custom float printer" + + float printOn: stream +] + { #category : #writing } NeoJSONWriter >> writeBoolean: boolean [ boolean printOn: writeStream @@ -259,7 +276,7 @@ NeoJSONWriter >> writeBoolean: boolean [ { #category : #writing } NeoJSONWriter >> writeFloat: float [ - float printOn: writeStream + floatPrinter printFloat: float on: writeStream ] { #category : #writing } diff --git a/repository/Neo-JSON-Tests/NeoJSONFloatPrintrTests.class.st b/repository/Neo-JSON-Tests/NeoJSONFloatPrintrTests.class.st new file mode 100644 index 0000000..1eefe72 --- /dev/null +++ b/repository/Neo-JSON-Tests/NeoJSONFloatPrintrTests.class.st @@ -0,0 +1,80 @@ +" +I am NeoJSONFloatPrinterTests, the collection of unit tests for NeoJSONFloatPrinter. +" +Class { + #name : #NeoJSONFloatPrintrTests, + #superclass : #TestCase, + #instVars : [ + 'printer' + ], + #category : #'Neo-JSON-Tests' +} + +{ #category : #running } +NeoJSONFloatPrintrTests >> setUp [ + super setUp. + printer := NeoJSONFloatPrinter new +] + +{ #category : #tests } +NeoJSONFloatPrintrTests >> testDecimalNotation [ + self assert: (printer print: 1.5) equals: '1.5'. + self assert: (printer print: -1.5) equals: '-1.5'. + self assert: (printer print: 0.5) equals: '0.5'. + self assert: (printer print: -0.5) equals: '-0.5'. + self assert: (printer print: (1/3) asFloat) equals: '0.33333'. + self assert: (printer print: (-1/3) asFloat) equals: '-0.33333'. + self assert: (printer print: 0.00123) equals: '0.00123'. + self assert: (printer print: -0.00123) equals: '-0.00123'. + self assert: (printer print: 0.00012) equals: '0.00012'. + self assert: (printer print: -0.00012) equals: '-0.00012'. + self assert: (printer print: 123456.12345) equals: '123456.12345'. + self assert: (printer print: -123456.12345) equals: '-123456.12345'. + +] + +{ #category : #tests } +NeoJSONFloatPrintrTests >> testInteger [ + self assert: (printer print: 1.0) equals: '1'. + self assert: (printer print: 0.0) equals: '0'. + self assert: (printer print: -1.0) equals: '-1'. + self assert: (printer print: 123.0) equals: '123'. + self assert: (printer print: 123456.0) equals: '123456'. + +] + +{ #category : #tests } +NeoJSONFloatPrintrTests >> testScientificNotation [ + self assert: (printer print: 1234567.5) equals: '1.23457e6'. "note the rounding" + self assert: (printer print: -1234567.5) equals: '-1.23457e6'. "note the rounding" + self assert: (printer print: 0.0000123) equals: '1.23e-5'. + self assert: (printer print: -0.0000123) equals: '-1.23e-5'. + +] + +{ #category : #tests } +NeoJSONFloatPrintrTests >> testSpecialValues [ + self assert: (printer print: Float zero) equals: '0'. + self assert: (printer print: Float nan) equals: 'NaN'. + self assert: (printer print: Float infinity) equals: 'Inf'. + self assert: (printer print: Float infinity negated) equals: '-Inf'. +] + +{ #category : #tests } +NeoJSONFloatPrintrTests >> testWellKnownConstants [ + self assert: (printer print: Float pi) equals: '3.14159'. + self assert: (printer print: Float e) equals: '2.71828'. + "the earth's mass in kg" + self assert: (printer print: 5.9724e24) equals: '5.9724e24'. + "mass of electron in kg" + self assert: (printer print: 9.10938356e-31) equals: '9.10938e-31'. + "planck's constant in Js" + self assert: (printer print: 1.05457e-34) equals: '1.05457e-34'. + "speed of light in m/s" + self assert: (printer print: 2.99792e8) equals: '2.99792e8'. + "charge of electron in C" + self assert: (printer print: -1.60218e-19) equals: '-1.60218e-19'. + "boltzmann's constant in J/K" + self assert: (printer print: 1.38065e-23) equals: '1.38065e-23'. + +] diff --git a/repository/Neo-JSON-Tests/NeoJSONWriterTests.class.st b/repository/Neo-JSON-Tests/NeoJSONWriterTests.class.st index 0ddf5e4..94119e7 100644 --- a/repository/Neo-JSON-Tests/NeoJSONWriterTests.class.st +++ b/repository/Neo-JSON-Tests/NeoJSONWriterTests.class.st @@ -95,6 +95,26 @@ NeoJSONWriterTests >> testDateAndTime [ equals: '"2012-02-14T16:40:18+01:00"' ] +{ #category : #testing } +NeoJSONWriterTests >> testFloatPrinter [ + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) + floatPrinter: NeoJSONFloatPrinter new; + nextPut: object ] ]. + self assert: (writer value: 123.0) equals: '123'. + self assert: (writer value: -123.0) equals: '-123'. + self assert: (writer value: 0.0) equals: '0'. + self assert: (writer value: 1.50) equals: '1.5'. + self assert: (writer value: -1.25) equals: '-1.25'. + self assert: (writer value: Float pi) equals: '3.14159'. + self assert: (writer value: 9.10938356e-31) equals: '9.10938e-31'. + self assert: (writer value: 5.9724e24) equals: '5.9724e24'. + self assert: (writer value: 1234567890.1234567890) equals: '1.23457e9'. + self assert: (writer value: (1/3) asFloat) equals: '0.33333'. +] + { #category : #testing } NeoJSONWriterTests >> testFloats [ | writer | From dd148218dc2e7e20b9d9dca125c3ef91d31c60ac Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Fri, 21 May 2021 11:25:04 +0200 Subject: [PATCH 19/90] Make NeoJSONFloatPrinter more configurable. Add #lowPrecision and #scientificOnly as examples with unit tests. --- .../NeoJSONFloatPrinter.class.st | 106 +++++++++++------- .../NeoJSONFloatPrintrTests.class.st | 27 +++++ 2 files changed, 92 insertions(+), 41 deletions(-) diff --git a/repository/Neo-JSON-Core/NeoJSONFloatPrinter.class.st b/repository/Neo-JSON-Core/NeoJSONFloatPrinter.class.st index 146b776..0b22f3e 100644 --- a/repository/Neo-JSON-Core/NeoJSONFloatPrinter.class.st +++ b/repository/Neo-JSON-Core/NeoJSONFloatPrinter.class.st @@ -1,15 +1,14 @@ " I am NeoJSONFloatPrinter. -I can print Float numbers is a compact, human friendly format. +I print Float numbers in a compact, human friendly format. -The following are hardcoded (for now): - - - base 10 +The following (default) parameters are used: + - base 10 - hardcoded (for now) - precision 5 digits - - decimal point - - exponent e - - NaN, Inf and -Inf + - decimal point - hardcoded (for now) + - exponent e - hardcoded (for now) + - NaN, Inf and -Inf - hardcoded (for now) - lower 1e-4 - upper 1e6 - decimal notation for abs values inside abs [ lower, upper ] @@ -19,16 +18,38 @@ The following are hardcoded (for now): - no thousands separators - no engineering notation +See my class side for configuration examples. + +My public interface is in the printing protocol. + " Class { #name : #NeoJSONFloatPrinter, #superclass : #Object, + #instVars : [ + 'precision', + 'lower', + 'upper', + 'base' + ], #category : #'Neo-JSON-Core' } -{ #category : #constants } -NeoJSONFloatPrinter >> base [ - ^ 10 +{ #category : #'instance creation' } +NeoJSONFloatPrinter class >> lowPrecision [ + ^ self new + precision: 2; + lower: 1e-2; + upper: 1e5; + yourself +] + +{ #category : #'instance creation' } +NeoJSONFloatPrinter class >> scientificOnly [ + ^ self new + lower: 0; + upper: 0; + yourself ] { #category : #constants } @@ -46,9 +67,18 @@ NeoJSONFloatPrinter >> infinite [ ^ 'Inf' ] -{ #category : #constants } -NeoJSONFloatPrinter >> lower [ - ^ self base raisedTo: (self precision - 1) negated +{ #category : #'initialize-release' } +NeoJSONFloatPrinter >> initialize [ + super initialize. + base := 10. + precision := 5. + lower := 1e-4. + upper := 1e6 +] + +{ #category : #'initialize-release' } +NeoJSONFloatPrinter >> lower: number [ + lower := number ] { #category : #constants } @@ -56,9 +86,10 @@ NeoJSONFloatPrinter >> nan [ ^ 'NaN' ] -{ #category : #constants } -NeoJSONFloatPrinter >> precision [ - ^ 5 +{ #category : #'initialize-release' } +NeoJSONFloatPrinter >> precision: numberOfDigits [ + self assert: (numberOfDigits between: 1 and: 20). + precision := numberOfDigits ] { #category : #printing } @@ -68,11 +99,20 @@ NeoJSONFloatPrinter >> print: float [ ] { #category : #private } -NeoJSONFloatPrinter >> print: fractionPart asFractionOn: stream [ +NeoJSONFloatPrinter >> print: float decimalOn: stream [ + stream print: float asInteger. + stream nextPut: self decimalPoint. + self + print: (float fractionPart * (base raisedTo: precision)) rounded + fractionOn: stream +] + +{ #category : #private } +NeoJSONFloatPrinter >> print: fractionPart fractionOn: stream [ | zeros | zeros := 0. "leading zeros are significant, trailing zeros are not printed" - self precision to: 1 by: -1 do: [ :position | | digit | - digit := fractionPart digitAt: position base: self base. + precision to: 1 by: -1 do: [ :position | | digit | + digit := fractionPart digitAt: position base: base. digit = 0 ifTrue: [ zeros := zeros +1 ] ifFalse: [ @@ -82,29 +122,13 @@ NeoJSONFloatPrinter >> print: fractionPart asFractionOn: stream [ stream nextPut: digit asCharacterDigit ] ] ] -{ #category : #private } -NeoJSONFloatPrinter >> print: float decimalOn: stream [ - | fractionPart zeros | - stream print: float asInteger. - stream nextPut: self decimalPoint. - fractionPart := (float fractionPart * (self base raisedTo: self precision)) rounded. - zeros := 0. - self precision to: 1 by: -1 do: [ :position | | digit | - digit := fractionPart digitAt: position base: self base. - digit = 0 - ifTrue: [ zeros := zeros +1 ] - ifFalse: [ - zeros > 0 ifTrue: [ zeros timesRepeat: [ stream nextPut: $0 ]. zeros := 0 ]. - stream nextPut: digit asCharacterDigit ] ] -] - { #category : #printing } NeoJSONFloatPrinter >> print: float on: stream [ | int abs | (float isZero or: [ float isFinite not ]) ifTrue: [ ^ self print: float specialOn: stream ]. self print: float signOn: stream. - ((abs := float abs) between: self lower and: self upper) + ((abs := float abs) between: lower and: upper) ifTrue: [ (int := abs asInteger) = abs ifTrue: [ int printOn: stream ] @@ -115,8 +139,8 @@ NeoJSONFloatPrinter >> print: float on: stream [ { #category : #private } NeoJSONFloatPrinter >> print: float scientificOn: stream [ | exponent mantissa | - exponent := (float ln / self base ln) floor. - mantissa := float / (self base raisedTo: exponent). + exponent := (float ln / base ln) floor. + mantissa := float / (base raisedTo: exponent). self print: mantissa decimalOn: stream. stream nextPut: self exponent; @@ -148,7 +172,7 @@ NeoJSONFloatPrinter >> printFloat: float on: stream [ self print: float on: stream ] -{ #category : #constants } -NeoJSONFloatPrinter >> upper [ - ^ self base raisedTo: (self precision + 1) +{ #category : #'initialize-release' } +NeoJSONFloatPrinter >> upper: number [ + upper := number ] diff --git a/repository/Neo-JSON-Tests/NeoJSONFloatPrintrTests.class.st b/repository/Neo-JSON-Tests/NeoJSONFloatPrintrTests.class.st index 1eefe72..6caea6f 100644 --- a/repository/Neo-JSON-Tests/NeoJSONFloatPrintrTests.class.st +++ b/repository/Neo-JSON-Tests/NeoJSONFloatPrintrTests.class.st @@ -43,6 +43,20 @@ NeoJSONFloatPrintrTests >> testInteger [ ] +{ #category : #tests } +NeoJSONFloatPrintrTests >> testLowPrecision [ + printer := NeoJSONFloatPrinter lowPrecision. + self assert: (printer print: (4/3) asFloat) equals: '1.33'. + self assert: (printer print: 12345.66) equals: '12345.66'. + self assert: (printer print: -123456.77) equals: '-1.23e5'. + self assert: (printer print: Float pi) equals: '3.14'. + self assert: (printer print: Float e negated) equals: '-2.72'. + "the earth's mass in kg" + self assert: (printer print: 5.9724e24) equals: '5.97e24'. + "mass of electron in kg" + self assert: (printer print: 9.10938356e-31) equals: '9.11e-31'. +] + { #category : #tests } NeoJSONFloatPrintrTests >> testScientificNotation [ self assert: (printer print: 1234567.5) equals: '1.23457e6'. "note the rounding" @@ -52,6 +66,19 @@ NeoJSONFloatPrintrTests >> testScientificNotation [ ] +{ #category : #tests } +NeoJSONFloatPrintrTests >> testScientificOnly [ + printer := NeoJSONFloatPrinter scientificOnly. + self assert: (printer print: (4/3) asFloat) equals: '1.33333e0'. + self assert: (printer print: 12345.66) equals: '1.23457e4'. + self assert: (printer print: Float pi) equals: '3.14159e0'. + self assert: (printer print: Float e negated) equals: '-2.71828e0'. + "the earth's mass in kg" + self assert: (printer print: 5.9724e24) equals: '5.9724e24'. + "mass of electron in kg" + self assert: (printer print: 9.10938356e-31) equals: '9.10938e-31'. +] + { #category : #tests } NeoJSONFloatPrintrTests >> testSpecialValues [ self assert: (printer print: Float zero) equals: '0'. From a16e02b3e770cf2c6e1b15e4f2d71073535f07b5 Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Sun, 23 May 2021 18:38:09 +0200 Subject: [PATCH 20/90] Link to the Pharo Enterprise book chapter --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 975d54d..e56a7fd 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ NeoJSON is an elegant and efficient standalone Smalltalk framework to read and w MIT Licensed. +A chapter in the [Enterprise Pharo](https://books.pharo.org/enterprise-pharo/) book is a good introduction to [NeoJSON](https://ci.inria.fr/pharo-contribution/job/EnterprisePharoBook/lastSuccessfulBuild/artifact/book-result/NeoJSON/NeoJSON.html). + Go ahead and read the [NeoJSON paper](https://github.com/svenvc/docs/blob/master/neo/neo-json-paper.md). Basically, NeoJSONWriter is used to write a JSON representation of Smalltalk objects to a textual stream. From ce07be61ccdf4c23d62d8cd4816adb4d27b0e129 Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Fri, 29 Oct 2021 14:27:54 +0200 Subject: [PATCH 21/90] Rename NeoJSONFloatPrintrTests to NeoJSONFloatPrinterTests --- ...ss.st => NeoJSONFloatPrinterTests.class.st} | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) rename repository/Neo-JSON-Tests/{NeoJSONFloatPrintrTests.class.st => NeoJSONFloatPrinterTests.class.st} (89%) diff --git a/repository/Neo-JSON-Tests/NeoJSONFloatPrintrTests.class.st b/repository/Neo-JSON-Tests/NeoJSONFloatPrinterTests.class.st similarity index 89% rename from repository/Neo-JSON-Tests/NeoJSONFloatPrintrTests.class.st rename to repository/Neo-JSON-Tests/NeoJSONFloatPrinterTests.class.st index 6caea6f..2aa0bff 100644 --- a/repository/Neo-JSON-Tests/NeoJSONFloatPrintrTests.class.st +++ b/repository/Neo-JSON-Tests/NeoJSONFloatPrinterTests.class.st @@ -2,7 +2,7 @@ I am NeoJSONFloatPrinterTests, the collection of unit tests for NeoJSONFloatPrinter. " Class { - #name : #NeoJSONFloatPrintrTests, + #name : #NeoJSONFloatPrinterTests, #superclass : #TestCase, #instVars : [ 'printer' @@ -11,13 +11,13 @@ Class { } { #category : #running } -NeoJSONFloatPrintrTests >> setUp [ +NeoJSONFloatPrinterTests >> setUp [ super setUp. printer := NeoJSONFloatPrinter new ] { #category : #tests } -NeoJSONFloatPrintrTests >> testDecimalNotation [ +NeoJSONFloatPrinterTests >> testDecimalNotation [ self assert: (printer print: 1.5) equals: '1.5'. self assert: (printer print: -1.5) equals: '-1.5'. self assert: (printer print: 0.5) equals: '0.5'. @@ -34,7 +34,7 @@ NeoJSONFloatPrintrTests >> testDecimalNotation [ ] { #category : #tests } -NeoJSONFloatPrintrTests >> testInteger [ +NeoJSONFloatPrinterTests >> testInteger [ self assert: (printer print: 1.0) equals: '1'. self assert: (printer print: 0.0) equals: '0'. self assert: (printer print: -1.0) equals: '-1'. @@ -44,7 +44,7 @@ NeoJSONFloatPrintrTests >> testInteger [ ] { #category : #tests } -NeoJSONFloatPrintrTests >> testLowPrecision [ +NeoJSONFloatPrinterTests >> testLowPrecision [ printer := NeoJSONFloatPrinter lowPrecision. self assert: (printer print: (4/3) asFloat) equals: '1.33'. self assert: (printer print: 12345.66) equals: '12345.66'. @@ -58,7 +58,7 @@ NeoJSONFloatPrintrTests >> testLowPrecision [ ] { #category : #tests } -NeoJSONFloatPrintrTests >> testScientificNotation [ +NeoJSONFloatPrinterTests >> testScientificNotation [ self assert: (printer print: 1234567.5) equals: '1.23457e6'. "note the rounding" self assert: (printer print: -1234567.5) equals: '-1.23457e6'. "note the rounding" self assert: (printer print: 0.0000123) equals: '1.23e-5'. @@ -67,7 +67,7 @@ NeoJSONFloatPrintrTests >> testScientificNotation [ ] { #category : #tests } -NeoJSONFloatPrintrTests >> testScientificOnly [ +NeoJSONFloatPrinterTests >> testScientificOnly [ printer := NeoJSONFloatPrinter scientificOnly. self assert: (printer print: (4/3) asFloat) equals: '1.33333e0'. self assert: (printer print: 12345.66) equals: '1.23457e4'. @@ -80,7 +80,7 @@ NeoJSONFloatPrintrTests >> testScientificOnly [ ] { #category : #tests } -NeoJSONFloatPrintrTests >> testSpecialValues [ +NeoJSONFloatPrinterTests >> testSpecialValues [ self assert: (printer print: Float zero) equals: '0'. self assert: (printer print: Float nan) equals: 'NaN'. self assert: (printer print: Float infinity) equals: 'Inf'. @@ -88,7 +88,7 @@ NeoJSONFloatPrintrTests >> testSpecialValues [ ] { #category : #tests } -NeoJSONFloatPrintrTests >> testWellKnownConstants [ +NeoJSONFloatPrinterTests >> testWellKnownConstants [ self assert: (printer print: Float pi) equals: '3.14159'. self assert: (printer print: Float e) equals: '2.71828'. "the earth's mass in kg" From 109d08bb08216b1ae583861a5c631cc0a564d248 Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Wed, 3 Nov 2021 17:11:10 +0100 Subject: [PATCH 22/90] Make NeoJSONObject inherit from OrderedDictionary. This is meant as a convenience feature only as the official JSON specification clearly states "An object is an unordered set of name/value pairs". --- repository/Neo-JSON-Core/NeoJSONObject.class.st | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/repository/Neo-JSON-Core/NeoJSONObject.class.st b/repository/Neo-JSON-Core/NeoJSONObject.class.st index 0cbac9c..4d8e343 100644 --- a/repository/Neo-JSON-Core/NeoJSONObject.class.st +++ b/repository/Neo-JSON-Core/NeoJSONObject.class.st @@ -1,6 +1,6 @@ " I am NeoJSONObject. -I am a Dictionary. +I am an OrderedDictionary. I behave more like a JavaScript object. I return nil for missing keys. I allow any property to be read or set by using a normal accessor message. @@ -35,12 +35,14 @@ The first is special because it returns nil as soon as a key is missing. The sec NeoJSONObject new atPath: #(one two three) put: 42; yourself. NeoJSONObject new atPath: #(one two three) put: 42; atPath: #(one two three). - + +The fact that I am an OrderedDictionary means to I maintain the order of keys. This is meant as a convenience feature only as the official JSON specification clearly states ""An object is an unordered set of name/value pairs"". + " Class { #name : #NeoJSONObject, - #superclass : #Dictionary, - #category : 'Neo-JSON-Core' + #superclass : #OrderedDictionary, + #category : #'Neo-JSON-Core' } { #category : #convenience } From d0b66e77dad0d88a7728e416cbe5ec47df552a8a Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Wed, 10 Nov 2021 13:16:01 +0100 Subject: [PATCH 23/90] Patch a bug in OrderedDictionary>>#at:ifPresent:ifAbsentPut: (in Pharo 7 & 8, but fixed in Pharo 9 and later) by adding the correct implementation to NeoJSONObject --- repository/Neo-JSON-Core/NeoJSONObject.class.st | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/repository/Neo-JSON-Core/NeoJSONObject.class.st b/repository/Neo-JSON-Core/NeoJSONObject.class.st index 4d8e343..b5fb6c4 100644 --- a/repository/Neo-JSON-Core/NeoJSONObject.class.st +++ b/repository/Neo-JSON-Core/NeoJSONObject.class.st @@ -63,6 +63,21 @@ NeoJSONObject >> at: key [ ^ self at: key ifAbsent: [ nil ] ] +{ #category : #accessing } +NeoJSONObject >> at: key ifPresent: aPresentBlock ifAbsentPut: anAbsentBlock [ + "Lookup the given key in the receiver. If it is present, answer the + value of evaluating the first block optionally with the value associated with the key. + Otherwise store and return the result of evaluating the second block as the new value of the key." + + "Overwritten to patch a bug in the superclass implementation in Pharo 7 and 8. + This problem was fixed in Pharo 9 where this overwrite is no longer necessary but harmless." + + ^ self + at: key + ifPresent: aPresentBlock + ifAbsent: [ self at: key put: anAbsentBlock value ] +] + { #category : #accessing } NeoJSONObject >> atPath: keyCollection [ "Use each key in keyCollection recursively, stop when nil is encountered" From 91a79b303b70212829a7834384bca31dfe7446f0 Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Sun, 30 Jan 2022 12:23:44 +0100 Subject: [PATCH 24/90] Use OSPlatform current lineEnding as default for NeoJSONWriter's new line setting --- repository/Neo-JSON-Core/NeoJSONWriter.class.st | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/repository/Neo-JSON-Core/NeoJSONWriter.class.st b/repository/Neo-JSON-Core/NeoJSONWriter.class.st index fd1c6e2..cbf6aa3 100644 --- a/repository/Neo-JSON-Core/NeoJSONWriter.class.st +++ b/repository/Neo-JSON-Core/NeoJSONWriter.class.st @@ -176,8 +176,7 @@ NeoJSONWriter >> indentedDo: block [ { #category : #'initialize-release' } NeoJSONWriter >> initialize [ super initialize. - "For portability reasons use `Character cr asString` rather than `String cr`" - self newLine: Character cr asString. + self newLine: OSPlatform current lineEnding. self prettyPrint: false. self asciiOnly: false. self writeNil: false. From c1fde7150aa02f50dd905ea5b2212a0c21a5faa1 Mon Sep 17 00:00:00 2001 From: Gabriel Omar Cotelli Date: Wed, 6 Apr 2022 12:30:03 -0300 Subject: [PATCH 25/90] Add Pharo 10 to CI --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 6ff1b5f..47584f5 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - smalltalk: [ Pharo64-9.0, Pharo64-8.0, Pharo64-7.0 ] + smalltalk: [ Pharo64-10, Pharo64-9.0, Pharo64-8.0, Pharo64-7.0 ] name: ${{ matrix.smalltalk }} steps: - uses: actions/checkout@v2 From 5037c7a5867a848722f71ee5c9c60c6a4aa60f57 Mon Sep 17 00:00:00 2001 From: "Esteban A. Maringolo" Date: Tue, 23 Aug 2022 11:40:49 -0300 Subject: [PATCH 26/90] Adds support for different species of String in NeoJSONReader streams --- .../Neo-JSON-Core/NeoJSONReader.class.st | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/repository/Neo-JSON-Core/NeoJSONReader.class.st b/repository/Neo-JSON-Core/NeoJSONReader.class.st index 1019299..b0d9838 100644 --- a/repository/Neo-JSON-Core/NeoJSONReader.class.st +++ b/repository/Neo-JSON-Core/NeoJSONReader.class.st @@ -39,7 +39,7 @@ Class { 'mapClass', 'propertyNamesAsSymbols' ], - #category : 'Neo-JSON-Core' + #category : #'Neo-JSON-Core' } { #category : #convenience } @@ -450,14 +450,23 @@ NeoJSONReader >> propertyNamesAsSymbols: boolean [ propertyNamesAsSymbols := boolean ] +{ #category : #private } +NeoJSONReader >> stringStreamClass [ + "Answer the class of the collection used for the stringStream of receiver. + + NOTE: It is String, but if receiver's readStream is over + another class of String, then this provides compatibility for that." + + ^ readStream collectionSpecies +] + { #category : #private } NeoJSONReader >> stringStreamContents: block [ "Like String streamContents: block but reusing the underlying buffer for improved efficiency" - - stringStream - ifNil: [ - stringStream := (String new: 32) writeStream ]. + + stringStream ifNil: [ + stringStream := (self stringStreamClass new: 32) writeStream ]. stringStream reset. block value: stringStream. ^ stringStream contents From 2bcd1c865732546139ffc82f82f2b5c5bbac7acb Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Wed, 24 Aug 2022 11:22:26 +0200 Subject: [PATCH 27/90] Add NeoJSONMockStream>>#collectionSpecies --- repository/Neo-JSON-Tests/NeoJSONMockStream.class.st | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/repository/Neo-JSON-Tests/NeoJSONMockStream.class.st b/repository/Neo-JSON-Tests/NeoJSONMockStream.class.st index 5310f72..e0d871c 100644 --- a/repository/Neo-JSON-Tests/NeoJSONMockStream.class.st +++ b/repository/Neo-JSON-Tests/NeoJSONMockStream.class.st @@ -28,6 +28,11 @@ NeoJSONMockStream >> close [ ^ stream close ] +{ #category : #accessing } +NeoJSONMockStream >> collectionSpecies [ + ^ stream collectionSpecies +] + { #category : #accessing } NeoJSONMockStream >> next [ ^ stream next From a18a783fbd2465ce7bbdd041ee2042f711f304eb Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Mon, 28 Nov 2022 13:41:33 +0100 Subject: [PATCH 28/90] Add Pharo 11 CI support --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 47584f5..69094b1 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - smalltalk: [ Pharo64-10, Pharo64-9.0, Pharo64-8.0, Pharo64-7.0 ] + smalltalk: [ Pharo64-11, Pharo64-10, Pharo64-9.0, Pharo64-8.0, Pharo64-7.0 ] name: ${{ matrix.smalltalk }} steps: - uses: actions/checkout@v2 From 3dc868944d6eb2ba65927d3018ad13d93a7c4905 Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Tue, 2 May 2023 14:08:21 +0200 Subject: [PATCH 29/90] Add NeoJSONObject>>#at:at:[put:] overrides delegated to #atPath:put: with unit test --- .../Neo-JSON-Core/NeoJSONObject.class.st | 37 +++++++++++++------ .../NeoJSONObjectTests.class.st | 17 ++++++++- 2 files changed, 42 insertions(+), 12 deletions(-) diff --git a/repository/Neo-JSON-Core/NeoJSONObject.class.st b/repository/Neo-JSON-Core/NeoJSONObject.class.st index b5fb6c4..6147e62 100644 --- a/repository/Neo-JSON-Core/NeoJSONObject.class.st +++ b/repository/Neo-JSON-Core/NeoJSONObject.class.st @@ -50,7 +50,7 @@ NeoJSONObject class >> fromString: string [ "Parse string as JSON, so that maps become instances of me" ^ (NeoJSONReader on: string readStream) - mapClass: NeoJSONObject; + mapClass: self; propertyNamesAsSymbols: true; next ] @@ -59,10 +59,25 @@ NeoJSONObject class >> fromString: string [ NeoJSONObject >> at: key [ "I return nil for missing keys. My superclass would signal a KeyNotFound." - + ^ self at: key ifAbsent: [ nil ] ] +{ #category : #'nested dictionaries' } +NeoJSONObject >> at: firstKey at: secondKey [ + "I return nil for missing keys. + My superclass would signal a KeyNotFound." + + ^ self atPath: { firstKey. secondKey } +] + +{ #category : #'nested dictionaries' } +NeoJSONObject >> at: firstKey at: secondKey put: value [ + "Store value under secondKey in nested object under firstKey, create new level when needed" + + ^ self atPath: { firstKey. secondKey } put: value +] + { #category : #accessing } NeoJSONObject >> at: key ifPresent: aPresentBlock ifAbsentPut: anAbsentBlock [ "Lookup the given key in the receiver. If it is present, answer the @@ -71,7 +86,7 @@ NeoJSONObject >> at: key ifPresent: aPresentBlock ifAbsentPut: anAbsentBlock [ "Overwritten to patch a bug in the superclass implementation in Pharo 7 and 8. This problem was fixed in Pharo 9 where this overwrite is no longer necessary but harmless." - + ^ self at: key ifPresent: aPresentBlock @@ -81,19 +96,19 @@ NeoJSONObject >> at: key ifPresent: aPresentBlock ifAbsentPut: anAbsentBlock [ { #category : #accessing } NeoJSONObject >> atPath: keyCollection [ "Use each key in keyCollection recursively, stop when nil is encountered" - + | value | value := self. keyCollection do: [ :each | value := value at: each. value ifNil: [ ^ nil ] ]. - ^ value + ^ value ] { #category : #accessing } NeoJSONObject >> atPath: keyCollection put: newValue [ "Use each key in keyCollection recursively, create new levels when needed" - + | target | keyCollection ifEmpty: [ ^ self ]. target := self. @@ -108,7 +123,7 @@ NeoJSONObject >> atPath: keyCollection put: newValue [ NeoJSONObject >> doesNotUnderstand: message [ "Overwritten so that 'self foo' becomes 'self at: #foo' and 'self foo: 1' becomes 'self at: #foo put: 1' except that self is returned" - + | key | key := message selector. key isUnary @@ -121,7 +136,7 @@ NeoJSONObject >> doesNotUnderstand: message [ { #category : #accessing } NeoJSONObject >> name [ "Overwritten to make this accessor available as key" - + ^ self at: #name ] @@ -131,15 +146,15 @@ NeoJSONObject >> printOn: stream [ [ (NeoJSONWriter on: stream) nextPut: self ] on: Error - do: [ :exception | + do: [ :exception | stream nextPutAll: ' Error printing JSON: '; - nextPutAll: exception printString ] + print: exception ] ] { #category : #evaluating } NeoJSONObject >> value [ "Overwritten to make this accessor available as key" - + ^ self at: #value ] diff --git a/repository/Neo-JSON-Tests/NeoJSONObjectTests.class.st b/repository/Neo-JSON-Tests/NeoJSONObjectTests.class.st index e6270c0..4947aa1 100644 --- a/repository/Neo-JSON-Tests/NeoJSONObjectTests.class.st +++ b/repository/Neo-JSON-Tests/NeoJSONObjectTests.class.st @@ -5,9 +5,24 @@ I am NeoJSONObjectTests, I hold unit tests for NeoJSONObject. Class { #name : #NeoJSONObjectTests, #superclass : #TestCase, - #category : 'Neo-JSON-Tests' + #category : #'Neo-JSON-Tests' } +{ #category : #testing } +NeoJSONObjectTests >> testAtAt [ + | object | + object := NeoJSONObject new. + self assert: (object at: #foo) isNil. + self assert: (object at: #foo at: #bar) isNil. + object at: #foo at: #bar put: 123. + self assert: (object at: #foo) notNil. + self assert: (object at: #foo at: #bar) equals: 123. + self assert: object foo bar equals: 123. + object at: #foo at: #bar put: -1. + self assert: (object at: #foo at: #bar) equals: -1. + self assert: (object at: #foo at: #foo) isNil +] + { #category : #testing } NeoJSONObjectTests >> testAtPath [ | object | From e4960117e36f7b99bb2c3cd5a2ac82230b6ac943 Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Tue, 20 Jun 2023 16:37:01 +0200 Subject: [PATCH 30/90] Improve Float parsing accuracy following improvements made in STON (postpone float conversion as long as possible) https://github.com/svenvc/ston/pull/35 https://github.com/svenvc/ston/commit/a9959114c3036aad1dd5c327a5b8ac3309e4c3e5 --- repository/Neo-JSON-Core/NeoJSONReader.class.st | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/repository/Neo-JSON-Core/NeoJSONReader.class.st b/repository/Neo-JSON-Core/NeoJSONReader.class.st index b0d9838..f546d82 100644 --- a/repository/Neo-JSON-Core/NeoJSONReader.class.st +++ b/repository/Neo-JSON-Core/NeoJSONReader.class.st @@ -342,13 +342,15 @@ NeoJSONReader >> parseMapKeysDo: block [ { #category : #parsing } NeoJSONReader >> parseNumber [ - | negated number | + | negated number isFloat | negated := readStream peekFor: $-. number := self parseNumberInteger. - (readStream peekFor: $.) - ifTrue: [ number := number + self parseNumberFraction ]. + isFloat := (readStream peekFor: $.) + ifTrue: [ number := number + self parseNumberFraction. true ] + ifFalse: [ false ]. ((readStream peekFor: $e) or: [ readStream peekFor: $E ]) ifTrue: [ number := number * self parseNumberExponent ]. + isFloat ifTrue: [ number := number asFloat ]. negated ifTrue: [ number := number negated ]. self consumeWhitespace. @@ -377,11 +379,11 @@ NeoJSONReader >> parseNumberExponent [ NeoJSONReader >> parseNumberFraction [ | number power | number := 0. - power := 1.0. + power := 1. [ readStream atEnd not and: [ readStream peek isDigit ] ] whileTrue: [ number := 10 * number + readStream next digitValue. - power := power * 10.0 ]. + power := power * 10 ]. ^ number / power ] From b05162a6e420b501a87c6fc9503745b69d51237a Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Wed, 6 Sep 2023 21:04:21 +0200 Subject: [PATCH 31/90] https://github.com/svenvc/NeoJSON/issues/20 UTF-16 surrogate pairs might be invalid, make sure an error is raised --- repository/Neo-JSON-Core/NeoJSONReader.class.st | 4 +++- repository/Neo-JSON-Tests/NeoJSONReaderTests.class.st | 7 +++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/repository/Neo-JSON-Core/NeoJSONReader.class.st b/repository/Neo-JSON-Core/NeoJSONReader.class.st index f546d82..5666cf2 100644 --- a/repository/Neo-JSON-Core/NeoJSONReader.class.st +++ b/repository/Neo-JSON-Core/NeoJSONReader.class.st @@ -226,7 +226,9 @@ NeoJSONReader >> parseCharacterHex [ leadSurrogate := value. trailSurrogate := self parseTrailingSurrogateHexEscape. codePoint := (leadSurrogate - 16rD800) * 16r400 + (trailSurrogate - 16rDC00). - codePoint := 16r10000 + codePoint ]. + codePoint := 16r10000 + codePoint. + codePoint > 16r10FFFF + ifTrue: [ self error: 'Character Unicode code point outside encoder range' ] ]. ^ Character codePoint: codePoint ] diff --git a/repository/Neo-JSON-Tests/NeoJSONReaderTests.class.st b/repository/Neo-JSON-Tests/NeoJSONReaderTests.class.st index dbc4d45..97fc6e2 100644 --- a/repository/Neo-JSON-Tests/NeoJSONReaderTests.class.st +++ b/repository/Neo-JSON-Tests/NeoJSONReaderTests.class.st @@ -4,7 +4,7 @@ I am NeoJSONReaderTests, a test suite for NeoJSONReader. Class { #name : #NeoJSONReaderTests, #superclass : #TestCase, - #category : 'Neo-JSON-Tests' + #category : #'Neo-JSON-Tests' } { #category : #testing } @@ -209,7 +209,10 @@ NeoJSONReaderTests >> testNonBMPCharacterDecoding [ | string object | string := 16r1D11E asCharacter asString. "MUSICAL SYMBOL G CLEF" object := (NeoJSONReader fromString: '"\uD834\uDD1E"'). - self assert: object equals: string + self assert: object equals: string. + + "UTF-16 surrogate pairs might be invalid, make sure an error is raised" + self should: [ NeoJSONReader fromString: '"\udbff\ue000"' ] raise: NeoJSONParseError ] { #category : #testing } From a2698e380fba15904535f8af098cd67aff286859 Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Mon, 23 Oct 2023 14:06:41 +0200 Subject: [PATCH 32/90] Introduced NeoJSONArray as complement to NeoJSONObject Added basic examples to NeoJSONObject and NeoJSONArray Added GT extensions to NeoJSONObject and NeoJSONArray Introduced Neo-JSON-GT package and Baseline group --- .../BaselineOfNeoJSON.class.st | 8 ++- .../Neo-JSON-Core/NeoJSONArray.class.st | 55 +++++++++++++++ .../Neo-JSON-Core/NeoJSONObject.class.st | 68 +++++++++++++++++++ .../Neo-JSON-GT/NeoJSONArray.extension.st | 23 +++++++ .../Neo-JSON-GT/NeoJSONObject.extension.st | 23 +++++++ repository/Neo-JSON-GT/package.st | 1 + 6 files changed, 175 insertions(+), 3 deletions(-) create mode 100644 repository/Neo-JSON-Core/NeoJSONArray.class.st create mode 100644 repository/Neo-JSON-GT/NeoJSONArray.extension.st create mode 100644 repository/Neo-JSON-GT/NeoJSONObject.extension.st create mode 100644 repository/Neo-JSON-GT/package.st diff --git a/repository/BaselineOfNeoJSON/BaselineOfNeoJSON.class.st b/repository/BaselineOfNeoJSON/BaselineOfNeoJSON.class.st index b981f21..518446a 100644 --- a/repository/BaselineOfNeoJSON/BaselineOfNeoJSON.class.st +++ b/repository/BaselineOfNeoJSON/BaselineOfNeoJSON.class.st @@ -5,7 +5,7 @@ I am a BaselineOf. Class { #name : #BaselineOfNeoJSON, #superclass : #BaselineOf, - #category : 'BaselineOfNeoJSON' + #category : #BaselineOfNeoJSON } { #category : #baselines } @@ -24,8 +24,10 @@ BaselineOfNeoJSON >> baseline: spec [ do: [ spec package: 'Neo-JSON-Pharo-Core' with: [ spec requires: #('Neo-JSON-Core') ]; package: 'Neo-JSON-Pharo-Tests' with: [ spec requires: #('Neo-JSON-Tests') ]; - package: 'Neo-JSON-Pharo-Examples' with: [ spec requires: #('Neo-JSON-Core') ]; + package: 'Neo-JSON-Pharo-Examples' with: [ spec requires: #('Neo-JSON-Core') ]; + package: 'Neo-JSON-GT' with: [ spec requires: #('Neo-JSON-Core') ]; group: 'core' with: #('Neo-JSON-Core' 'Neo-JSON-Pharo-Core'); group: 'tests' with: #('Neo-JSON-Tests' 'Neo-JSON-Pharo-Tests'); - group: 'examples' with: #('Neo-JSON-Pharo-Examples') ]. + group: 'examples' with: #('Neo-JSON-Pharo-Examples'); + group: 'gt' with: #('Neo-JSON-GT') ]. ] diff --git a/repository/Neo-JSON-Core/NeoJSONArray.class.st b/repository/Neo-JSON-Core/NeoJSONArray.class.st new file mode 100644 index 0000000..1993750 --- /dev/null +++ b/repository/Neo-JSON-Core/NeoJSONArray.class.st @@ -0,0 +1,55 @@ +" +I am NeoJSONArray. +I am an Array. + +I am often used in combination with NeoJSONObject, to represent the result of parsing JSON. + +Used in its generic way, NeoJSONParser will return Arrays and Dictionaries. +Returning NeoJSONArrays and NeoJSONObjects, simple subclasses, allows to add some convenience methods. + +" +Class { + #name : #NeoJSONArray, + #superclass : #Array, + #type : #variable, + #category : #'Neo-JSON-Core' +} + +{ #category : #example } +NeoJSONArray class >> exampleNumbers [ + + | numbers | + numbers := self new: 128. + 0 to: 127 do: [ :n | + numbers + at: n + 1 + put: (NeoJSONObject new + integer: n; + decimal: (n printStringBase: 10); + octal: (n printStringBase: 8); + hexadecimal: (n printStringBase: 16); + binary: (n printStringBase: 2); + roman: n printStringRoman; + words: n asWords; + prime: n isPrime; + character: n asCharacter asString) ]. + ^ numbers +] + +{ #category : #example } +NeoJSONArray class >> exampleSimple [ + + ^ self withAll: { 0 . 1 . Float pi. 'string' . true . false. nil } +] + +{ #category : #print } +NeoJSONArray >> printOn: stream [ + "I use my JSON representation when printing myself" + + [ (NeoJSONWriter on: stream) nextPut: self ] + on: Error + do: [ :exception | + stream + nextPutAll: ' Error printing JSON: '; + print: exception ] +] diff --git a/repository/Neo-JSON-Core/NeoJSONObject.class.st b/repository/Neo-JSON-Core/NeoJSONObject.class.st index 6147e62..737b275 100644 --- a/repository/Neo-JSON-Core/NeoJSONObject.class.st +++ b/repository/Neo-JSON-Core/NeoJSONObject.class.st @@ -45,12 +45,80 @@ Class { #category : #'Neo-JSON-Core' } +{ #category : #example } +NeoJSONObject class >> exampleMagnitudeClassHierarchy [ + + | builder | + builder := [ :aClass | + NeoJSONObject new + name: aClass name; + superclass: aClass superclass name; + instanceVariables: aClass instVarNames; + category: aClass category; + totalInstanceVariablesCount: aClass allInstVarNames size; + methodCount: aClass methods size; + totalMethodCount: aClass allMethods size; + subclasses: (aClass subclasses + collect: [ :aSubclass | builder value: aSubclass ] + as: NeoJSONArray) ]. + ^ builder value: Magnitude +] + +{ #category : #example } +NeoJSONObject class >> exampleNested [ + + ^ self exampleSimple array: NeoJSONArray exampleSimple +] + +{ #category : #example } +NeoJSONObject class >> exampleNestedRoundtrip [ + + | json result| + json := self exampleNested printString. + result := self fromString: json. + self assert: result equals: self exampleNested. + ^ result +] + +{ #category : #example } +NeoJSONObject class >> exampleSimple [ + + ^ self new + foo: 100; + bar: 200 +] + +{ #category : #example } +NeoJSONObject class >> exampleSimpleJSON [ + + ^ '{"foo":100,"bar":200}' +] + +{ #category : #example } +NeoJSONObject class >> exampleSimpleParsing [ + + | result | + result := self fromString: self exampleSimpleJSON. + self assert: result equals: self exampleSimple. + ^ result +] + +{ #category : #example } +NeoJSONObject class >> exampleSimpleWriting [ + + | result | + result := self exampleSimple printString. + self assert: result equals: self exampleSimpleJSON. + ^ result +] + { #category : #convenience } NeoJSONObject class >> fromString: string [ "Parse string as JSON, so that maps become instances of me" ^ (NeoJSONReader on: string readStream) mapClass: self; + listClass: NeoJSONArray; propertyNamesAsSymbols: true; next ] diff --git a/repository/Neo-JSON-GT/NeoJSONArray.extension.st b/repository/Neo-JSON-GT/NeoJSONArray.extension.st new file mode 100644 index 0000000..b335106 --- /dev/null +++ b/repository/Neo-JSON-GT/NeoJSONArray.extension.st @@ -0,0 +1,23 @@ +Extension { #name : #NeoJSONArray } + +{ #category : #'*Neo-JSON-GT' } +NeoJSONArray >> gtJsonFor: aView [ + + ^ aView explicit + title: 'JSON'; + priority: 10; + stencil: [ | editorElement textEditor text | + textEditor := BrTextEditorModel new. + textEditor styler: JSONParser gtStyler. + editorElement := BrEditorElement new. + editorElement editor: textEditor. + text := (NeoJSONWriter toStringPretty: self) asRopedText. + text glamorousCodeFontDo: #beNotOverwritableByStyler; glamorousCodeSizeDo: #beNotOverwritableByStyler. + textEditor text: text. + editorElement + padding: (BlInsets all: 10); + constraintsDo: [ :c | + c horizontal matchParent. + c vertical matchParent ]. + editorElement ] +] diff --git a/repository/Neo-JSON-GT/NeoJSONObject.extension.st b/repository/Neo-JSON-GT/NeoJSONObject.extension.st new file mode 100644 index 0000000..af0f02f --- /dev/null +++ b/repository/Neo-JSON-GT/NeoJSONObject.extension.st @@ -0,0 +1,23 @@ +Extension { #name : #NeoJSONObject } + +{ #category : #'*Neo-JSON-GT' } +NeoJSONObject >> gtJsonFor: aView [ + + ^ aView explicit + title: 'JSON'; + priority: 10; + stencil: [ | editorElement textEditor text | + textEditor := BrTextEditorModel new. + textEditor styler: JSONParser gtStyler. + editorElement := BrEditorElement new. + editorElement editor: textEditor. + text := (NeoJSONWriter toStringPretty: self) asRopedText. + text glamorousCodeFontDo: #beNotOverwritableByStyler; glamorousCodeSizeDo: #beNotOverwritableByStyler. + textEditor text: text. + editorElement + padding: (BlInsets all: 10); + constraintsDo: [ :c | + c horizontal matchParent. + c vertical matchParent ]. + editorElement ] +] diff --git a/repository/Neo-JSON-GT/package.st b/repository/Neo-JSON-GT/package.st new file mode 100644 index 0000000..7db5071 --- /dev/null +++ b/repository/Neo-JSON-GT/package.st @@ -0,0 +1 @@ +Package { #name : #'Neo-JSON-GT' } From 45e63045f5830caec6ac76fdb637b3500540af97 Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Mon, 23 Oct 2023 15:02:28 +0200 Subject: [PATCH 33/90] First Lepiter page --- lepiter/81brlbrknhsro4cxzdl06l22t.bak | 458 ++++++++++++++++++++++ lepiter/81brlbrknhsro4cxzdl06l22t.lepiter | 458 ++++++++++++++++++++++ lepiter/lepiter.properties | 4 + 3 files changed, 920 insertions(+) create mode 100644 lepiter/81brlbrknhsro4cxzdl06l22t.bak create mode 100644 lepiter/81brlbrknhsro4cxzdl06l22t.lepiter create mode 100644 lepiter/lepiter.properties diff --git a/lepiter/81brlbrknhsro4cxzdl06l22t.bak b/lepiter/81brlbrknhsro4cxzdl06l22t.bak new file mode 100644 index 0000000..96278d9 --- /dev/null +++ b/lepiter/81brlbrknhsro4cxzdl06l22t.bak @@ -0,0 +1,458 @@ +{ + "__schema" : "4.1", + "__type" : "page", + "children" : { + "__type" : "snippets", + "items" : [ + { + "__type" : "textSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T14:46:58.18415+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T14:49:51.893292+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "AmTLWsPEDQCi43d6A47Ahw==" + }, + "paragraphStyle" : { + "__type" : "textStyle" + }, + "string" : "JSON (JavaScript Object Notation) is an open standard file format and data interchange format that uses human-readable text to store and transmit data objects consisting of attribute–value pairs and arrays (or other serializable values). JSON is a language-independent data format. It was derived from JavaScript, but many modern programming languages include code to generate and parse JSON-format data." + }, + { + "__type" : "textSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T14:46:40.657807+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T14:46:40.661675+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "f2zmV8PEDQCipgVSA47Ahw==" + }, + "paragraphStyle" : { + "__type" : "textStyle" + }, + "string" : "NeoJSON is an elegant and efficient standalone Smalltalk framework to read and write JSON converting to or from Smalltalk objects." + }, + { + "__type" : "textSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T15:00:44.919808+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T15:00:55.457512+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "SFoSjMPEDQCtn/w5A47Ahw==" + }, + "paragraphStyle" : { + "__type" : "textStyle" + }, + "string" : "# NeoJSONObject" + }, + { + "__type" : "textSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T14:52:15.641291+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T14:53:01.507768+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "oWC3bcPEDQCkF2fPA47Ahw==" + }, + "paragraphStyle" : { + "__type" : "textStyle" + }, + "string" : "Here is a small and simple example of JSON, a map with 2 key-value pairs." + }, + { + "__type" : "exampleSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T14:50:22.488316+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T14:50:22.488316+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "m874ZsPEDQCjnp0hA47Ahw==" + }, + "exampleSelector" : "exampleSimpleJSON", + "previewHeight" : 200, + "previewShowSelector" : "gtViewsFor:", + "exampleBehaviorName" : "NeoJSONObject class", + "codeExpanded" : true, + "previewExpanded" : false, + "noCode" : false + }, + { + "__type" : "textSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T14:57:40.534498+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T15:01:16.025958+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "o9QUgcPEDQCovrAyA47Ahw==" + }, + "paragraphStyle" : { + "__type" : "textStyle" + }, + "string" : "This corresponds with the following example object:" + }, + { + "__type" : "exampleSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T14:58:18.972457+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T14:58:18.972457+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "U2Ffg8PEDQCqYXrCA47Ahw==" + }, + "exampleSelector" : "exampleSimple", + "previewHeight" : 200, + "previewShowSelector" : "gtViewsFor:", + "exampleBehaviorName" : "NeoJSONObject class", + "codeExpanded" : true, + "previewExpanded" : false, + "noCode" : false + }, + { + "__type" : "textSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T14:53:13.189284+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T14:58:50.307554+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "2Y7ScMPEDQCl4qMXA47Ahw==" + }, + "paragraphStyle" : { + "__type" : "textStyle" + }, + "string" : "Let's see. One convenient way to parse this is to use NeoJSONObject class>>#fromString." + }, + { + "__type" : "exampleSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T14:53:54.818539+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T14:53:54.818539+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "b7Wgc8PEDQCnNYsqA47Ahw==" + }, + "exampleSelector" : "exampleSimpleParsing", + "previewHeight" : 200, + "previewShowSelector" : "gtViewsFor:", + "exampleBehaviorName" : "NeoJSONObject class", + "codeExpanded" : true, + "previewExpanded" : false, + "noCode" : false + }, + { + "__type" : "textSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T14:58:59.204816+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T14:59:48.738683+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "LFqyf8PEDQCol8EmA47Ahw==" + }, + "paragraphStyle" : { + "__type" : "textStyle" + }, + "string" : "The inverse operation, from an object to JSON is also convenient, given it is a NeoJSONObject." + }, + { + "__type" : "exampleSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T14:59:55.641591+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T14:59:55.641591+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "c28iicPEDQCtTBTqA47Ahw==" + }, + "exampleSelector" : "exampleSimpleWriting", + "previewHeight" : 200, + "previewShowSelector" : "gtViewsFor:", + "exampleBehaviorName" : "NeoJSONObject class", + "codeExpanded" : true, + "previewExpanded" : false, + "noCode" : false + } + ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T14:46:09.552647+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T14:46:58.17813+02:00" + } + }, + "pageType" : { + "__type" : "namedPage", + "title" : "Parsing and Writing JSON" + }, + "uid" : { + "__type" : "uuid", + "uuid" : "c553e557-c3c4-0d00-a2a5-cc1e038ec087" + } +} \ No newline at end of file diff --git a/lepiter/81brlbrknhsro4cxzdl06l22t.lepiter b/lepiter/81brlbrknhsro4cxzdl06l22t.lepiter new file mode 100644 index 0000000..6cba269 --- /dev/null +++ b/lepiter/81brlbrknhsro4cxzdl06l22t.lepiter @@ -0,0 +1,458 @@ +{ + "__schema" : "4.1", + "__type" : "page", + "children" : { + "__type" : "snippets", + "items" : [ + { + "__type" : "textSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T14:46:58.18415+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T14:49:51.893292+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "AmTLWsPEDQCi43d6A47Ahw==" + }, + "paragraphStyle" : { + "__type" : "textStyle" + }, + "string" : "JSON (JavaScript Object Notation) is an open standard file format and data interchange format that uses human-readable text to store and transmit data objects consisting of attribute–value pairs and arrays (or other serializable values). JSON is a language-independent data format. It was derived from JavaScript, but many modern programming languages include code to generate and parse JSON-format data." + }, + { + "__type" : "textSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T14:46:40.657807+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T14:46:40.661675+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "f2zmV8PEDQCipgVSA47Ahw==" + }, + "paragraphStyle" : { + "__type" : "textStyle" + }, + "string" : "NeoJSON is an elegant and efficient standalone Smalltalk framework to read and write JSON converting to or from Smalltalk objects." + }, + { + "__type" : "textSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T15:00:44.919808+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T15:00:55.457512+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "SFoSjMPEDQCtn/w5A47Ahw==" + }, + "paragraphStyle" : { + "__type" : "textStyle" + }, + "string" : "# NeoJSONObject" + }, + { + "__type" : "textSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T14:52:15.641291+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T14:53:01.507768+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "oWC3bcPEDQCkF2fPA47Ahw==" + }, + "paragraphStyle" : { + "__type" : "textStyle" + }, + "string" : "Here is a small and simple example of JSON, a map with 2 key-value pairs." + }, + { + "__type" : "exampleSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T14:50:22.488316+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T14:50:22.488316+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "m874ZsPEDQCjnp0hA47Ahw==" + }, + "exampleSelector" : "exampleSimpleJSON", + "previewHeight" : 200, + "previewShowSelector" : "gtViewsFor:", + "exampleBehaviorName" : "NeoJSONObject class", + "codeExpanded" : true, + "previewExpanded" : false, + "noCode" : false + }, + { + "__type" : "textSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T14:57:40.534498+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T15:01:16.025958+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "o9QUgcPEDQCovrAyA47Ahw==" + }, + "paragraphStyle" : { + "__type" : "textStyle" + }, + "string" : "This corresponds with the following example object:" + }, + { + "__type" : "exampleSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T14:58:18.972457+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T14:58:18.972457+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "U2Ffg8PEDQCqYXrCA47Ahw==" + }, + "exampleSelector" : "exampleSimple", + "previewHeight" : 200, + "previewShowSelector" : "gtViewsFor:", + "exampleBehaviorName" : "NeoJSONObject class", + "codeExpanded" : true, + "previewExpanded" : false, + "noCode" : false + }, + { + "__type" : "textSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T14:53:13.189284+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T15:01:32.987758+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "2Y7ScMPEDQCl4qMXA47Ahw==" + }, + "paragraphStyle" : { + "__type" : "textStyle" + }, + "string" : "Let's see. One convenient way to parse JSON is to use NeoJSONObject class>>#fromString." + }, + { + "__type" : "exampleSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T14:53:54.818539+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T14:53:54.818539+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "b7Wgc8PEDQCnNYsqA47Ahw==" + }, + "exampleSelector" : "exampleSimpleParsing", + "previewHeight" : 200, + "previewShowSelector" : "gtViewsFor:", + "exampleBehaviorName" : "NeoJSONObject class", + "codeExpanded" : true, + "previewExpanded" : false, + "noCode" : false + }, + { + "__type" : "textSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T14:58:59.204816+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T14:59:48.738683+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "LFqyf8PEDQCol8EmA47Ahw==" + }, + "paragraphStyle" : { + "__type" : "textStyle" + }, + "string" : "The inverse operation, from an object to JSON is also convenient, given it is a NeoJSONObject." + }, + { + "__type" : "exampleSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T14:59:55.641591+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T14:59:55.641591+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "c28iicPEDQCtTBTqA47Ahw==" + }, + "exampleSelector" : "exampleSimpleWriting", + "previewHeight" : 200, + "previewShowSelector" : "gtViewsFor:", + "exampleBehaviorName" : "NeoJSONObject class", + "codeExpanded" : true, + "previewExpanded" : false, + "noCode" : false + } + ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T14:46:09.552647+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-23T14:46:58.17813+02:00" + } + }, + "pageType" : { + "__type" : "namedPage", + "title" : "Parsing and Writing JSON" + }, + "uid" : { + "__type" : "uuid", + "uuid" : "c553e557-c3c4-0d00-a2a5-cc1e038ec087" + } +} \ No newline at end of file diff --git a/lepiter/lepiter.properties b/lepiter/lepiter.properties new file mode 100644 index 0000000..d57cfb4 --- /dev/null +++ b/lepiter/lepiter.properties @@ -0,0 +1,4 @@ +{ + "uuid" : "f8e32c57-c3c4-0d00-a2a4-02c0038ec087", + "schema" : "4.1" +} \ No newline at end of file From d70b6df718339c2aef88ac70f8c5577f755ba667 Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Tue, 24 Oct 2023 11:33:58 +0200 Subject: [PATCH 34/90] Extend docs --- lepiter/81brlbrknhsro4cxzdl06l22t.bak | 87 ++++++++++++++++-- lepiter/81brlbrknhsro4cxzdl06l22t.lepiter | 89 +++++++++++++++++-- .../Neo-JSON-Core/NeoJSONObject.class.st | 12 +++ 3 files changed, 177 insertions(+), 11 deletions(-) diff --git a/lepiter/81brlbrknhsro4cxzdl06l22t.bak b/lepiter/81brlbrknhsro4cxzdl06l22t.bak index 96278d9..eef434e 100644 --- a/lepiter/81brlbrknhsro4cxzdl06l22t.bak +++ b/lepiter/81brlbrknhsro4cxzdl06l22t.bak @@ -217,7 +217,7 @@ "__type" : "time", "time" : { "__type" : "dateAndTime", - "dateAndTimeString" : "2023-10-23T15:01:16.025958+02:00" + "dateAndTimeString" : "2023-10-24T11:06:23.066158+02:00" } }, "uid" : { @@ -269,6 +269,83 @@ "previewExpanded" : false, "noCode" : false }, + { + "__type" : "textSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-24T10:52:41.800972+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-24T11:08:17.241982+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "dVXPMtTEDQC1y38DBchSng==" + }, + "paragraphStyle" : { + "__type" : "textStyle" + }, + "string" : "{{gtClass:NeoJSONObject}} is a subclass of OrderedDictionary which automatically implements accessors using key access. When a key does not exist, nil is returned instead of a {{gtClass:KeyNotFound}} being raised." + }, + { + "__type" : "exampleSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-24T11:16:16.219788+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-24T11:16:16.219788+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "Vq4dh9TEDQC8hjUdBchSng==" + }, + "exampleSelector" : "exampleSimpleUsage", + "previewHeight" : 200, + "previewShowSelector" : "gtViewsFor:", + "exampleBehaviorName" : "NeoJSONObject class", + "codeExpanded" : true, + "previewExpanded" : false, + "noCode" : false + }, { "__type" : "textSnippet", "children" : { @@ -294,7 +371,7 @@ "__type" : "time", "time" : { "__type" : "dateAndTime", - "dateAndTimeString" : "2023-10-23T14:58:50.307554+02:00" + "dateAndTimeString" : "2023-10-24T11:21:09.587872+02:00" } }, "uid" : { @@ -304,7 +381,7 @@ "paragraphStyle" : { "__type" : "textStyle" }, - "string" : "Let's see. One convenient way to parse this is to use NeoJSONObject class>>#fromString." + "string" : "One convenient way to parse JSON is to use {{gtMethod: NeoJSONObject class>>#fromString:}}." }, { "__type" : "exampleSnippet", @@ -371,7 +448,7 @@ "__type" : "time", "time" : { "__type" : "dateAndTime", - "dateAndTimeString" : "2023-10-23T14:59:48.738683+02:00" + "dateAndTimeString" : "2023-10-24T10:52:03.553046+02:00" } }, "uid" : { @@ -381,7 +458,7 @@ "paragraphStyle" : { "__type" : "textStyle" }, - "string" : "The inverse operation, from an object to JSON is also convenient, given it is a NeoJSONObject." + "string" : "The inverse operation, from an object to JSON is also convenient, given it is a {{gtClass:NeoJSONObject}} whose {{gtMethod: NeoJSONObject>>#printOn:}} outputs JSON." }, { "__type" : "exampleSnippet", diff --git a/lepiter/81brlbrknhsro4cxzdl06l22t.lepiter b/lepiter/81brlbrknhsro4cxzdl06l22t.lepiter index 6cba269..3d76944 100644 --- a/lepiter/81brlbrknhsro4cxzdl06l22t.lepiter +++ b/lepiter/81brlbrknhsro4cxzdl06l22t.lepiter @@ -186,7 +186,7 @@ }, "exampleSelector" : "exampleSimpleJSON", "previewHeight" : 200, - "previewShowSelector" : "gtViewsFor:", + "previewShowSelector" : "gtStringFor:", "exampleBehaviorName" : "NeoJSONObject class", "codeExpanded" : true, "previewExpanded" : false, @@ -217,7 +217,7 @@ "__type" : "time", "time" : { "__type" : "dateAndTime", - "dateAndTimeString" : "2023-10-23T15:01:16.025958+02:00" + "dateAndTimeString" : "2023-10-24T11:06:23.066158+02:00" } }, "uid" : { @@ -269,6 +269,83 @@ "previewExpanded" : false, "noCode" : false }, + { + "__type" : "textSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-24T10:52:41.800972+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-24T11:08:17.241982+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "dVXPMtTEDQC1y38DBchSng==" + }, + "paragraphStyle" : { + "__type" : "textStyle" + }, + "string" : "{{gtClass:NeoJSONObject}} is a subclass of OrderedDictionary which automatically implements accessors using key access. When a key does not exist, nil is returned instead of a {{gtClass:KeyNotFound}} being raised." + }, + { + "__type" : "exampleSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-24T11:16:16.219788+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-24T11:16:16.219788+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "Vq4dh9TEDQC8hjUdBchSng==" + }, + "exampleSelector" : "exampleSimpleUsage", + "previewHeight" : 200, + "previewShowSelector" : "gtViewsFor:", + "exampleBehaviorName" : "NeoJSONObject class", + "codeExpanded" : true, + "previewExpanded" : false, + "noCode" : false + }, { "__type" : "textSnippet", "children" : { @@ -294,7 +371,7 @@ "__type" : "time", "time" : { "__type" : "dateAndTime", - "dateAndTimeString" : "2023-10-23T15:01:32.987758+02:00" + "dateAndTimeString" : "2023-10-24T11:21:09.587872+02:00" } }, "uid" : { @@ -304,7 +381,7 @@ "paragraphStyle" : { "__type" : "textStyle" }, - "string" : "Let's see. One convenient way to parse JSON is to use NeoJSONObject class>>#fromString." + "string" : "One convenient way to parse JSON is to use {{gtMethod: NeoJSONObject class>>#fromString:}}." }, { "__type" : "exampleSnippet", @@ -371,7 +448,7 @@ "__type" : "time", "time" : { "__type" : "dateAndTime", - "dateAndTimeString" : "2023-10-23T14:59:48.738683+02:00" + "dateAndTimeString" : "2023-10-24T10:52:03.553046+02:00" } }, "uid" : { @@ -381,7 +458,7 @@ "paragraphStyle" : { "__type" : "textStyle" }, - "string" : "The inverse operation, from an object to JSON is also convenient, given it is a NeoJSONObject." + "string" : "The inverse operation, from an object to JSON is also convenient, given it is a {{gtClass:NeoJSONObject}} whose {{gtMethod: NeoJSONObject>>#printOn:}} outputs JSON." }, { "__type" : "exampleSnippet", diff --git a/repository/Neo-JSON-Core/NeoJSONObject.class.st b/repository/Neo-JSON-Core/NeoJSONObject.class.st index 737b275..d5da387 100644 --- a/repository/Neo-JSON-Core/NeoJSONObject.class.st +++ b/repository/Neo-JSON-Core/NeoJSONObject.class.st @@ -103,6 +103,18 @@ NeoJSONObject class >> exampleSimpleParsing [ ^ result ] +{ #category : #example } +NeoJSONObject class >> exampleSimpleUsage [ + + | simple | + simple := NeoJSONObject exampleSimple. + self assert: simple foo equals: (simple at: #foo). + self assert: (simple foo: -1) equals: (simple at: #foo put: -1; yourself). + self assert: (simple includesKey: #baz) not. + self assert: simple baz equals: nil. + ^ simple +] + { #category : #example } NeoJSONObject class >> exampleSimpleWriting [ From 2415f508808bc0d29ed74e3e816f59bfc8aac895 Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Wed, 25 Oct 2023 13:27:33 +0200 Subject: [PATCH 35/90] More example, more documentation --- lepiter/81brlbrknhsro4cxzdl06l22t.bak | 695 ++++++++++++++++- lepiter/81brlbrknhsro4cxzdl06l22t.lepiter | 728 +++++++++++++++++- .../Neo-JSON-Core/NeoJSONObject.class.st | 23 + .../Neo-JSON-Core/NeoJSONReader.class.st | 23 + .../Neo-JSON-Core/NeoJSONWriter.class.st | 28 + 5 files changed, 1491 insertions(+), 6 deletions(-) diff --git a/lepiter/81brlbrknhsro4cxzdl06l22t.bak b/lepiter/81brlbrknhsro4cxzdl06l22t.bak index eef434e..5a641c9 100644 --- a/lepiter/81brlbrknhsro4cxzdl06l22t.bak +++ b/lepiter/81brlbrknhsro4cxzdl06l22t.bak @@ -78,6 +78,576 @@ }, "string" : "NeoJSON is an elegant and efficient standalone Smalltalk framework to read and write JSON converting to or from Smalltalk objects." }, + { + "__type" : "textSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T11:58:50.079586+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T11:59:38.00409+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "7dQtPenEDQCwkkjwCLMSBQ==" + }, + "paragraphStyle" : { + "__type" : "textStyle" + }, + "string" : "# Arrays & Dictionaries" + }, + { + "__type" : "textSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T11:59:44.369072+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T12:06:19.904615+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "BEJqQOnEDQCxjPmCCLMSBQ==" + }, + "paragraphStyle" : { + "__type" : "textStyle" + }, + "string" : "JSON is defined using a number of primitive types (numbers, strings, booleans and null) and two composite types (lists and maps). Maps consist of unordered key value pairs and are sometimes called objects. Lists contain an ordered collection of JSON values. The natural or generic mapping of these two concepts is to {{gtClass:Array}} and {{gtClass:Dictionary}}. This is what {{gtClass:NeoJSONReader}} does out of the box." + }, + { + "__type" : "textSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T12:04:56.100214+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T12:06:41.24643+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "cOT+UunEDQC6HlPJCLMSBQ==" + }, + "paragraphStyle" : { + "__type" : "textStyle" + }, + "string" : "Let's consider some JSON input." + }, + { + "__type" : "exampleSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T12:06:49.982516+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T12:06:49.982516+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "1JnIWenEDQC8L1vZCLMSBQ==" + }, + "exampleSelector" : "exampleCoordinatesJSON", + "previewHeight" : 200, + "previewShowSelector" : "gtStringFor:", + "exampleBehaviorName" : "NeoJSONReader class", + "codeExpanded" : true, + "previewExpanded" : false, + "noCode" : false + }, + { + "__type" : "textSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T12:08:10.942323+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T12:08:49.896313+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "W7XlXenEDQC8h3syCLMSBQ==" + }, + "paragraphStyle" : { + "__type" : "textStyle" + }, + "string" : "Here is how to use {{gtClass:NeoJSONReader}} to parse this JSON input." + }, + { + "__type" : "exampleSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T12:08:58.808255+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T12:08:58.808255+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "1VN2YenEDQC+SF0qCLMSBQ==" + }, + "exampleSelector" : "exampleCoordinatesGenericParsing", + "previewHeight" : 200, + "previewShowSelector" : "gtViewsFor:", + "exampleBehaviorName" : "NeoJSONReader class", + "codeExpanded" : true, + "previewExpanded" : false, + "noCode" : false + }, + { + "__type" : "textSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T12:09:56.333014+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T12:10:36.168612+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "3BTkZOnEDQC+rIHICLMSBQ==" + }, + "paragraphStyle" : { + "__type" : "textStyle" + }, + "string" : "The resulting data structure is an array of dictionaries." + }, + { + "__type" : "textSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T12:11:20.602757+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T13:23:52.709532+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "I+/paenEDQCAHWklCLMSBQ==" + }, + "paragraphStyle" : { + "__type" : "textStyle" + }, + "string" : "Generating JSON is done using {{gtClass:NeoJSONWriter}} with this data structure as input. Actually, many collections are considered as lists except those that are explicitly seen as maps because they contain key value pairs. " + }, + { + "__type" : "exampleSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T12:13:27.745059+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T12:13:27.745059+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "afp9cenEDQCFexvvCLMSBQ==" + }, + "exampleSelector" : "exampleCoordinatesGenericWriting", + "previewHeight" : 200, + "previewShowSelector" : "gtStringFor:", + "exampleBehaviorName" : "NeoJSONWriter class", + "codeExpanded" : true, + "previewExpanded" : false, + "noCode" : false + }, + { + "__type" : "textSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T12:16:38.934273+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T12:16:45.257142+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "5kjjfOnEDQCFy427CLMSBQ==" + }, + "paragraphStyle" : { + "__type" : "textStyle" + }, + "string" : "# Mapping" + }, + { + "__type" : "textSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T12:16:47.512544+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T13:03:04.233496+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "ADJmfenEDQCF9BZpCLMSBQ==" + }, + "paragraphStyle" : { + "__type" : "textStyle" + }, + "string" : "JSON is fully dynamic and does not contain any type or class information. However, users do place meaning on certain JSON constructs. In our coordinates example we can all see that this is a list of x y coordinates, although this is not explicitly defined. So we might be inclined to use {{gtClass:Point}} here. Mapping allows you to make some use of the implicit schema present in JSON, either during parsing or during writing." + }, + { + "__type" : "textSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T13:03:13.264218+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T13:04:58.868156+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "kWFxI+rEDQCvbdhdBdJ9wA==" + }, + "paragraphStyle" : { + "__type" : "textStyle" + }, + "string" : "For parsing we need to tell the reader about the domain object that we want to use. And although we could have used {{gtMethod:NeoJSONReader>>#nextListAs:}} we defined and used a virtual type, ArrayOfPoints. " + }, + { + "__type" : "exampleSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T13:01:50.942757+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T13:01:50.942757+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "jUGJHurEDQCu8xlxBdJ9wA==" + }, + "exampleSelector" : "exampleCoordinatesCustomParsing", + "previewHeight" : 200, + "previewShowSelector" : "gtViewsFor:", + "exampleBehaviorName" : "NeoJSONReader class", + "codeExpanded" : true, + "previewExpanded" : false, + "noCode" : false + }, + { + "__type" : "textSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T13:05:40.597846+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T13:09:44.12187+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "04M5LOrEDQCz5dG4BdJ9wA==" + }, + "paragraphStyle" : { + "__type" : "textStyle" + }, + "string" : "For writing, we only need to map Point. Without a mapping, the writer would fail on Point since it does not know how to turn points into JSON." + }, + { + "__type" : "exampleSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T13:06:22.54966+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T13:06:22.54966+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "Dai5LurEDQC1aiNMBdJ9wA==" + }, + "exampleSelector" : "exampleCoordinatesCustomWriting", + "previewHeight" : 200, + "previewShowSelector" : "gtViewsFor:", + "exampleBehaviorName" : "NeoJSONWriter class", + "codeExpanded" : true, + "previewExpanded" : false, + "noCode" : false + }, { "__type" : "textSnippet", "children" : { @@ -103,7 +673,7 @@ "__type" : "time", "time" : { "__type" : "dateAndTime", - "dateAndTimeString" : "2023-10-23T15:00:55.457512+02:00" + "dateAndTimeString" : "2023-10-25T12:16:52.770243+02:00" } }, "uid" : { @@ -140,7 +710,7 @@ "__type" : "time", "time" : { "__type" : "dateAndTime", - "dateAndTimeString" : "2023-10-23T14:53:01.507768+02:00" + "dateAndTimeString" : "2023-10-25T13:26:15.191477+02:00" } }, "uid" : { @@ -150,7 +720,7 @@ "paragraphStyle" : { "__type" : "textStyle" }, - "string" : "Here is a small and simple example of JSON, a map with 2 key-value pairs." + "string" : "Another option is to use {{gtClass:NeoJSONObject}} and {{gtClass:NeoJSONArray}}. These are then used as mapClHere is a small and simple example of JSON, a map with 2 key-value pairs." }, { "__type" : "exampleSnippet", @@ -186,7 +756,7 @@ }, "exampleSelector" : "exampleSimpleJSON", "previewHeight" : 200, - "previewShowSelector" : "gtViewsFor:", + "previewShowSelector" : "gtStringFor:", "exampleBehaviorName" : "NeoJSONObject class", "codeExpanded" : true, "previewExpanded" : false, @@ -499,6 +1069,123 @@ "codeExpanded" : true, "previewExpanded" : false, "noCode" : false + }, + { + "__type" : "textSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T13:15:58.018722+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T13:16:34.590223+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "upYGUerEDQC3uiMoBdJ9wA==" + }, + "paragraphStyle" : { + "__type" : "textStyle" + }, + "string" : "The next two examples show how to work with the coordinates example." + }, + { + "__type" : "exampleSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T13:16:55.662258+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T13:16:55.662258+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "Yy52VOrEDQC5snhFBdJ9wA==" + }, + "exampleSelector" : "exampleCoordinatesWriting", + "previewHeight" : 200, + "previewShowSelector" : "gtViewsFor:", + "exampleBehaviorName" : "NeoJSONObject class", + "codeExpanded" : true, + "previewExpanded" : false, + "noCode" : false + }, + { + "__type" : "exampleSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T13:17:12.624073+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T13:17:12.624073+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "wv94VerEDQC5uU/RBdJ9wA==" + }, + "exampleSelector" : "exampleCoordinatesParsing", + "previewHeight" : 200, + "previewShowSelector" : "gtViewsFor:", + "exampleBehaviorName" : "NeoJSONObject class", + "codeExpanded" : true, + "previewExpanded" : false, + "noCode" : false } ] }, diff --git a/lepiter/81brlbrknhsro4cxzdl06l22t.lepiter b/lepiter/81brlbrknhsro4cxzdl06l22t.lepiter index 3d76944..0ed6103 100644 --- a/lepiter/81brlbrknhsro4cxzdl06l22t.lepiter +++ b/lepiter/81brlbrknhsro4cxzdl06l22t.lepiter @@ -78,6 +78,576 @@ }, "string" : "NeoJSON is an elegant and efficient standalone Smalltalk framework to read and write JSON converting to or from Smalltalk objects." }, + { + "__type" : "textSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T11:58:50.079586+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T11:59:38.00409+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "7dQtPenEDQCwkkjwCLMSBQ==" + }, + "paragraphStyle" : { + "__type" : "textStyle" + }, + "string" : "# Arrays & Dictionaries" + }, + { + "__type" : "textSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T11:59:44.369072+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T12:06:19.904615+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "BEJqQOnEDQCxjPmCCLMSBQ==" + }, + "paragraphStyle" : { + "__type" : "textStyle" + }, + "string" : "JSON is defined using a number of primitive types (numbers, strings, booleans and null) and two composite types (lists and maps). Maps consist of unordered key value pairs and are sometimes called objects. Lists contain an ordered collection of JSON values. The natural or generic mapping of these two concepts is to {{gtClass:Array}} and {{gtClass:Dictionary}}. This is what {{gtClass:NeoJSONReader}} does out of the box." + }, + { + "__type" : "textSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T12:04:56.100214+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T12:06:41.24643+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "cOT+UunEDQC6HlPJCLMSBQ==" + }, + "paragraphStyle" : { + "__type" : "textStyle" + }, + "string" : "Let's consider some JSON input." + }, + { + "__type" : "exampleSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T12:06:49.982516+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T12:06:49.982516+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "1JnIWenEDQC8L1vZCLMSBQ==" + }, + "exampleSelector" : "exampleCoordinatesJSON", + "previewHeight" : 200, + "previewShowSelector" : "gtStringFor:", + "exampleBehaviorName" : "NeoJSONReader class", + "codeExpanded" : true, + "previewExpanded" : false, + "noCode" : false + }, + { + "__type" : "textSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T12:08:10.942323+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T12:08:49.896313+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "W7XlXenEDQC8h3syCLMSBQ==" + }, + "paragraphStyle" : { + "__type" : "textStyle" + }, + "string" : "Here is how to use {{gtClass:NeoJSONReader}} to parse this JSON input." + }, + { + "__type" : "exampleSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T12:08:58.808255+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T12:08:58.808255+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "1VN2YenEDQC+SF0qCLMSBQ==" + }, + "exampleSelector" : "exampleCoordinatesGenericParsing", + "previewHeight" : 200, + "previewShowSelector" : "gtViewsFor:", + "exampleBehaviorName" : "NeoJSONReader class", + "codeExpanded" : true, + "previewExpanded" : false, + "noCode" : false + }, + { + "__type" : "textSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T12:09:56.333014+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T12:10:36.168612+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "3BTkZOnEDQC+rIHICLMSBQ==" + }, + "paragraphStyle" : { + "__type" : "textStyle" + }, + "string" : "The resulting data structure is an array of dictionaries." + }, + { + "__type" : "textSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T12:11:20.602757+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T13:23:52.709532+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "I+/paenEDQCAHWklCLMSBQ==" + }, + "paragraphStyle" : { + "__type" : "textStyle" + }, + "string" : "Generating JSON is done using {{gtClass:NeoJSONWriter}} with this data structure as input. Actually, many collections are considered as lists except those that are explicitly seen as maps because they contain key value pairs. " + }, + { + "__type" : "exampleSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T12:13:27.745059+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T12:13:27.745059+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "afp9cenEDQCFexvvCLMSBQ==" + }, + "exampleSelector" : "exampleCoordinatesGenericWriting", + "previewHeight" : 200, + "previewShowSelector" : "gtStringFor:", + "exampleBehaviorName" : "NeoJSONWriter class", + "codeExpanded" : true, + "previewExpanded" : false, + "noCode" : false + }, + { + "__type" : "textSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T12:16:38.934273+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T12:16:45.257142+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "5kjjfOnEDQCFy427CLMSBQ==" + }, + "paragraphStyle" : { + "__type" : "textStyle" + }, + "string" : "# Mapping" + }, + { + "__type" : "textSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T12:16:47.512544+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T13:03:04.233496+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "ADJmfenEDQCF9BZpCLMSBQ==" + }, + "paragraphStyle" : { + "__type" : "textStyle" + }, + "string" : "JSON is fully dynamic and does not contain any type or class information. However, users do place meaning on certain JSON constructs. In our coordinates example we can all see that this is a list of x y coordinates, although this is not explicitly defined. So we might be inclined to use {{gtClass:Point}} here. Mapping allows you to make some use of the implicit schema present in JSON, either during parsing or during writing." + }, + { + "__type" : "textSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T13:03:13.264218+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T13:04:58.868156+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "kWFxI+rEDQCvbdhdBdJ9wA==" + }, + "paragraphStyle" : { + "__type" : "textStyle" + }, + "string" : "For parsing we need to tell the reader about the domain object that we want to use. And although we could have used {{gtMethod:NeoJSONReader>>#nextListAs:}} we defined and used a virtual type, ArrayOfPoints. " + }, + { + "__type" : "exampleSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T13:01:50.942757+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T13:01:50.942757+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "jUGJHurEDQCu8xlxBdJ9wA==" + }, + "exampleSelector" : "exampleCoordinatesCustomParsing", + "previewHeight" : 200, + "previewShowSelector" : "gtViewsFor:", + "exampleBehaviorName" : "NeoJSONReader class", + "codeExpanded" : true, + "previewExpanded" : false, + "noCode" : false + }, + { + "__type" : "textSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T13:05:40.597846+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T13:09:44.12187+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "04M5LOrEDQCz5dG4BdJ9wA==" + }, + "paragraphStyle" : { + "__type" : "textStyle" + }, + "string" : "For writing, we only need to map Point. Without a mapping, the writer would fail on Point since it does not know how to turn points into JSON." + }, + { + "__type" : "exampleSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T13:06:22.54966+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T13:06:22.54966+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "Dai5LurEDQC1aiNMBdJ9wA==" + }, + "exampleSelector" : "exampleCoordinatesCustomWriting", + "previewHeight" : 200, + "previewShowSelector" : "gtViewsFor:", + "exampleBehaviorName" : "NeoJSONWriter class", + "codeExpanded" : true, + "previewExpanded" : false, + "noCode" : false + }, { "__type" : "textSnippet", "children" : { @@ -103,7 +673,7 @@ "__type" : "time", "time" : { "__type" : "dateAndTime", - "dateAndTimeString" : "2023-10-23T15:00:55.457512+02:00" + "dateAndTimeString" : "2023-10-25T12:16:52.770243+02:00" } }, "uid" : { @@ -115,6 +685,43 @@ }, "string" : "# NeoJSONObject" }, + { + "__type" : "textSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T13:26:33.484917+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T13:26:33.484917+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "aA/ndurEDQC7ZHW+BdJ9wA==" + }, + "paragraphStyle" : { + "__type" : "textStyle" + }, + "string" : "Another option is to use {{gtClass:NeoJSONObject}} and {{gtClass:NeoJSONArray}}. These are then used as mapClass and listClass instead of Dictionary and Array. " + }, { "__type" : "textSnippet", "children" : { @@ -140,7 +747,7 @@ "__type" : "time", "time" : { "__type" : "dateAndTime", - "dateAndTimeString" : "2023-10-23T14:53:01.507768+02:00" + "dateAndTimeString" : "2023-10-25T13:26:33.48926+02:00" } }, "uid" : { @@ -499,6 +1106,123 @@ "codeExpanded" : true, "previewExpanded" : false, "noCode" : false + }, + { + "__type" : "textSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T13:15:58.018722+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T13:16:34.590223+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "upYGUerEDQC3uiMoBdJ9wA==" + }, + "paragraphStyle" : { + "__type" : "textStyle" + }, + "string" : "The next two examples show how to work with the coordinates example." + }, + { + "__type" : "exampleSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T13:16:55.662258+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T13:16:55.662258+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "Yy52VOrEDQC5snhFBdJ9wA==" + }, + "exampleSelector" : "exampleCoordinatesWriting", + "previewHeight" : 200, + "previewShowSelector" : "gtViewsFor:", + "exampleBehaviorName" : "NeoJSONObject class", + "codeExpanded" : true, + "previewExpanded" : false, + "noCode" : false + }, + { + "__type" : "exampleSnippet", + "children" : { + "__type" : "snippets", + "items" : [ ] + }, + "createEmail" : { + "__type" : "email", + "emailString" : "" + }, + "createTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T13:17:12.624073+02:00" + } + }, + "editEmail" : { + "__type" : "email", + "emailString" : "" + }, + "editTime" : { + "__type" : "time", + "time" : { + "__type" : "dateAndTime", + "dateAndTimeString" : "2023-10-25T13:17:12.624073+02:00" + } + }, + "uid" : { + "__type" : "uid", + "uidString" : "wv94VerEDQC5uU/RBdJ9wA==" + }, + "exampleSelector" : "exampleCoordinatesParsing", + "previewHeight" : 200, + "previewShowSelector" : "gtViewsFor:", + "exampleBehaviorName" : "NeoJSONObject class", + "codeExpanded" : true, + "previewExpanded" : false, + "noCode" : false } ] }, diff --git a/repository/Neo-JSON-Core/NeoJSONObject.class.st b/repository/Neo-JSON-Core/NeoJSONObject.class.st index d5da387..99254fe 100644 --- a/repository/Neo-JSON-Core/NeoJSONObject.class.st +++ b/repository/Neo-JSON-Core/NeoJSONObject.class.st @@ -45,6 +45,29 @@ Class { #category : #'Neo-JSON-Core' } +{ #category : #example } +NeoJSONObject class >> exampleCoordinates [ + + ^ (0 to: 4) + collect: [ :each | self new x: each; y: each * 2 ] + as: NeoJSONArray +] + +{ #category : #example } +NeoJSONObject class >> exampleCoordinatesParsing [ + + | result | + result := self fromString: NeoJSONReader exampleCoordinatesJSON. + self assert: result equals: self exampleCoordinates. + ^ result +] + +{ #category : #example } +NeoJSONObject class >> exampleCoordinatesWriting [ + + ^ self exampleCoordinates printString +] + { #category : #example } NeoJSONObject class >> exampleMagnitudeClassHierarchy [ diff --git a/repository/Neo-JSON-Core/NeoJSONReader.class.st b/repository/Neo-JSON-Core/NeoJSONReader.class.st index 5666cf2..24c83ff 100644 --- a/repository/Neo-JSON-Core/NeoJSONReader.class.st +++ b/repository/Neo-JSON-Core/NeoJSONReader.class.st @@ -42,6 +42,29 @@ Class { #category : #'Neo-JSON-Core' } +{ #category : #example } +NeoJSONReader class >> exampleCoordinatesCustomParsing [ + + | reader | + reader := self on: self exampleCoordinatesJSON readStream. + reader mapAllInstVarsFor: Point. + reader for: #ArrayOfPoints customDo: [ :mapping | + mapping listOfElementSchema: Point ]. + ^ reader nextAs: #ArrayOfPoints +] + +{ #category : #example } +NeoJSONReader class >> exampleCoordinatesGenericParsing [ + + ^ self fromString: self exampleCoordinatesJSON +] + +{ #category : #example } +NeoJSONReader class >> exampleCoordinatesJSON [ + + ^ '[{"x":0,"y":0},{"x":1,"y":2},{"x":2,"y":4},{"x":3,"y":6},{"x":4,"y":8}]' +] + { #category : #convenience } NeoJSONReader class >> fromString: string [ ^ (self on: string readStream) next diff --git a/repository/Neo-JSON-Core/NeoJSONWriter.class.st b/repository/Neo-JSON-Core/NeoJSONWriter.class.st index cbf6aa3..eb1c4c7 100644 --- a/repository/Neo-JSON-Core/NeoJSONWriter.class.st +++ b/repository/Neo-JSON-Core/NeoJSONWriter.class.st @@ -37,6 +37,34 @@ Class { #category : #'Neo-JSON-Core' } +{ #category : #example } +NeoJSONWriter class >> exampleCoordinates [ + + ^ { 0@0 . 1@2. 2@4. 3@6 . 4@8} +] + +{ #category : #example } +NeoJSONWriter class >> exampleCoordinatesCustomWriting [ + + ^ String streamContents: [ :out | + | writer | + writer := self on: out. + writer mapAllInstVarsFor: Point. + writer nextPut: self exampleCoordinates ] +] + +{ #category : #example } +NeoJSONWriter class >> exampleCoordinatesGeneric [ + + ^ (0 to: 4) collect: [ :each | { 'x' -> each . 'y' -> (each * 2) } asDictionary ] +] + +{ #category : #example } +NeoJSONWriter class >> exampleCoordinatesGenericWriting [ + + ^ self toString: self exampleCoordinatesGeneric +] + { #category : #'instance creation' } NeoJSONWriter class >> on: writeStream [ "Initialize on writeStream, which should be a character stream that From 4e0d822bdadb8854f84a2ceb2b9f4e68c8bd6f56 Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Tue, 14 Nov 2023 13:42:59 +0100 Subject: [PATCH 36/90] Remove Neo-JSON-GT package and gt group from BaselineOfNeoJSON --- repository/BaselineOfNeoJSON/BaselineOfNeoJSON.class.st | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/repository/BaselineOfNeoJSON/BaselineOfNeoJSON.class.st b/repository/BaselineOfNeoJSON/BaselineOfNeoJSON.class.st index 518446a..b8c1e7d 100644 --- a/repository/BaselineOfNeoJSON/BaselineOfNeoJSON.class.st +++ b/repository/BaselineOfNeoJSON/BaselineOfNeoJSON.class.st @@ -25,9 +25,7 @@ BaselineOfNeoJSON >> baseline: spec [ package: 'Neo-JSON-Pharo-Core' with: [ spec requires: #('Neo-JSON-Core') ]; package: 'Neo-JSON-Pharo-Tests' with: [ spec requires: #('Neo-JSON-Tests') ]; package: 'Neo-JSON-Pharo-Examples' with: [ spec requires: #('Neo-JSON-Core') ]; - package: 'Neo-JSON-GT' with: [ spec requires: #('Neo-JSON-Core') ]; group: 'core' with: #('Neo-JSON-Core' 'Neo-JSON-Pharo-Core'); group: 'tests' with: #('Neo-JSON-Tests' 'Neo-JSON-Pharo-Tests'); - group: 'examples' with: #('Neo-JSON-Pharo-Examples'); - group: 'gt' with: #('Neo-JSON-GT') ]. + group: 'examples' with: #('Neo-JSON-Pharo-Examples') ]. ] From 2b0c0d20bc68965c600179f3da16bcace727e8b6 Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Tue, 14 Nov 2023 16:12:52 +0100 Subject: [PATCH 37/90] Delete repository/Neo-JSON-GT directory --- .../Neo-JSON-GT/NeoJSONArray.extension.st | 23 ------------------- .../Neo-JSON-GT/NeoJSONObject.extension.st | 23 ------------------- repository/Neo-JSON-GT/package.st | 1 - 3 files changed, 47 deletions(-) delete mode 100644 repository/Neo-JSON-GT/NeoJSONArray.extension.st delete mode 100644 repository/Neo-JSON-GT/NeoJSONObject.extension.st delete mode 100644 repository/Neo-JSON-GT/package.st diff --git a/repository/Neo-JSON-GT/NeoJSONArray.extension.st b/repository/Neo-JSON-GT/NeoJSONArray.extension.st deleted file mode 100644 index b335106..0000000 --- a/repository/Neo-JSON-GT/NeoJSONArray.extension.st +++ /dev/null @@ -1,23 +0,0 @@ -Extension { #name : #NeoJSONArray } - -{ #category : #'*Neo-JSON-GT' } -NeoJSONArray >> gtJsonFor: aView [ - - ^ aView explicit - title: 'JSON'; - priority: 10; - stencil: [ | editorElement textEditor text | - textEditor := BrTextEditorModel new. - textEditor styler: JSONParser gtStyler. - editorElement := BrEditorElement new. - editorElement editor: textEditor. - text := (NeoJSONWriter toStringPretty: self) asRopedText. - text glamorousCodeFontDo: #beNotOverwritableByStyler; glamorousCodeSizeDo: #beNotOverwritableByStyler. - textEditor text: text. - editorElement - padding: (BlInsets all: 10); - constraintsDo: [ :c | - c horizontal matchParent. - c vertical matchParent ]. - editorElement ] -] diff --git a/repository/Neo-JSON-GT/NeoJSONObject.extension.st b/repository/Neo-JSON-GT/NeoJSONObject.extension.st deleted file mode 100644 index af0f02f..0000000 --- a/repository/Neo-JSON-GT/NeoJSONObject.extension.st +++ /dev/null @@ -1,23 +0,0 @@ -Extension { #name : #NeoJSONObject } - -{ #category : #'*Neo-JSON-GT' } -NeoJSONObject >> gtJsonFor: aView [ - - ^ aView explicit - title: 'JSON'; - priority: 10; - stencil: [ | editorElement textEditor text | - textEditor := BrTextEditorModel new. - textEditor styler: JSONParser gtStyler. - editorElement := BrEditorElement new. - editorElement editor: textEditor. - text := (NeoJSONWriter toStringPretty: self) asRopedText. - text glamorousCodeFontDo: #beNotOverwritableByStyler; glamorousCodeSizeDo: #beNotOverwritableByStyler. - textEditor text: text. - editorElement - padding: (BlInsets all: 10); - constraintsDo: [ :c | - c horizontal matchParent. - c vertical matchParent ]. - editorElement ] -] diff --git a/repository/Neo-JSON-GT/package.st b/repository/Neo-JSON-GT/package.st deleted file mode 100644 index 7db5071..0000000 --- a/repository/Neo-JSON-GT/package.st +++ /dev/null @@ -1 +0,0 @@ -Package { #name : #'Neo-JSON-GT' } From 1d81fa2c0b3806ea31d9a8b4a8d8a12d8ffa6a77 Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Wed, 29 Nov 2023 11:01:42 +0100 Subject: [PATCH 38/90] Extend NeoJSONObject/NeoJSONArray path access a bit to better allow for array indexing Add #testPathAccess Improve class comments --- .../Neo-JSON-Core/NeoJSONArray.class.st | 31 ++++++++++++++++++- .../Neo-JSON-Core/NeoJSONObject.class.st | 17 +++++----- .../NeoJSONObjectTests.class.st | 22 +++++++++++++ 3 files changed, 61 insertions(+), 9 deletions(-) diff --git a/repository/Neo-JSON-Core/NeoJSONArray.class.st b/repository/Neo-JSON-Core/NeoJSONArray.class.st index 1993750..6ab1d36 100644 --- a/repository/Neo-JSON-Core/NeoJSONArray.class.st +++ b/repository/Neo-JSON-Core/NeoJSONArray.class.st @@ -3,7 +3,9 @@ I am NeoJSONArray. I am an Array. I am often used in combination with NeoJSONObject, to represent the result of parsing JSON. - + + I support path access for nested instances of me, using #atPath: and #atPath:put: + Used in its generic way, NeoJSONParser will return Arrays and Dictionaries. Returning NeoJSONArrays and NeoJSONObjects, simple subclasses, allows to add some convenience methods. @@ -42,6 +44,33 @@ NeoJSONArray class >> exampleSimple [ ^ self withAll: { 0 . 1 . Float pi. 'string' . true . false. nil } ] +{ #category : #accessing } +NeoJSONArray >> atPath: keyCollection [ + "Use each key in keyCollection recursively, return nil when a key is missing. + Note how keys can also be indexes to arrays." + + | value | + value := self. + keyCollection do: [ :each | + value := value at: each ifAbsent: [ ^ nil ] ]. + ^ value +] + +{ #category : #accessing } +NeoJSONArray >> atPath: keyCollection put: newValue [ + "Use each key in keyCollection recursively, create new levels when needed. + Note how keys can also be indexes to arrays." + + | target | + keyCollection ifEmpty: [ ^ self ]. + target := self. + keyCollection allButLastDo: [ :each | + target := target + at: each + ifAbsent: [ target at: each put: target species new ] ]. + ^ target at: keyCollection last put: newValue +] + { #category : #print } NeoJSONArray >> printOn: stream [ "I use my JSON representation when printing myself" diff --git a/repository/Neo-JSON-Core/NeoJSONObject.class.st b/repository/Neo-JSON-Core/NeoJSONObject.class.st index 99254fe..5943169 100644 --- a/repository/Neo-JSON-Core/NeoJSONObject.class.st +++ b/repository/Neo-JSON-Core/NeoJSONObject.class.st @@ -37,7 +37,7 @@ The first is special because it returns nil as soon as a key is missing. The sec NeoJSONObject new atPath: #(one two three) put: 42; atPath: #(one two three). The fact that I am an OrderedDictionary means to I maintain the order of keys. This is meant as a convenience feature only as the official JSON specification clearly states ""An object is an unordered set of name/value pairs"". - +I work together with NeoJSONArray. " Class { #name : #NeoJSONObject, @@ -198,27 +198,28 @@ NeoJSONObject >> at: key ifPresent: aPresentBlock ifAbsentPut: anAbsentBlock [ { #category : #accessing } NeoJSONObject >> atPath: keyCollection [ - "Use each key in keyCollection recursively, stop when nil is encountered" + "Use each key in keyCollection recursively, return nil when a key is missing. + Note how keys can also be indexes to arrays." | value | value := self. keyCollection do: [ :each | - value := value at: each. - value ifNil: [ ^ nil ] ]. + value := value at: each ifAbsent: [ ^ nil ] ]. ^ value ] { #category : #accessing } NeoJSONObject >> atPath: keyCollection put: newValue [ - "Use each key in keyCollection recursively, create new levels when needed" + "Use each key in keyCollection recursively, create new levels when needed. + Note how keys can also be indexes to arrays." | target | keyCollection ifEmpty: [ ^ self ]. target := self. keyCollection allButLastDo: [ :each | - (target at: each) - ifNil: [ target := target at: each put: target species new ] - ifNotNil: [ :subValue | target := subValue ] ]. + target := target + at: each + ifAbsent: [ target at: each put: target species new ] ]. ^ target at: keyCollection last put: newValue ] diff --git a/repository/Neo-JSON-Tests/NeoJSONObjectTests.class.st b/repository/Neo-JSON-Tests/NeoJSONObjectTests.class.st index 4947aa1..d393d39 100644 --- a/repository/Neo-JSON-Tests/NeoJSONObjectTests.class.st +++ b/repository/Neo-JSON-Tests/NeoJSONObjectTests.class.st @@ -97,3 +97,25 @@ NeoJSONObjectTests >> testJSON [ json := (NeoJSONWriter toString: object). self assert: (NeoJSONObject fromString: json) equals: object ] + +{ #category : #testing } +NeoJSONObjectTests >> testPathAccess [ + | data | + data := NeoJSONObject fromString: '{"foo":1,"bar":2,"array":[{"a":1},{"b":2}]}'. + self assert: (data atPath: #(array 1 a)) equals: 1. + self assert: (data atPath: #(array 2 b)) equals: 2. + self assert: (data atPath: #(missing 1)) equals: nil. + data atPath: #(missing) put: 7. + self assert: (data atPath: #(missing)) equals: 7. + self assert: (data atPath: #(array 3)) equals: nil. + data := NeoJSONObject fromString: '[{"c":1},{"c":2},{"c":3}]'. + self assert: (data atPath: #(2 c)) equals: 2. + self assert: (data atPath: #(10 c)) equals: nil. + self assert: (data atPath: #(3 missing)) equals: nil. + data atPath: #(3 missing) put: #found. + self assert: (data atPath: #(3 missing)) equals: #found. + (data at: 3) removeKey: #missing. + self assert: (data atPath: #(3 missing)) equals: nil. + data atPath: #(3 missing x) put: #found. + self assert: (data atPath: #(3 missing x)) equals: #found. +] From c09b91c901ec94e74c6fbd55247cce3f3d0d42b0 Mon Sep 17 00:00:00 2001 From: svenvc Date: Wed, 27 Mar 2024 09:44:52 +0100 Subject: [PATCH 39/90] improve class side instance creation of NeoJSONObject --- .../Neo-JSON-Core/NeoJSONObject.class.st | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/repository/Neo-JSON-Core/NeoJSONObject.class.st b/repository/Neo-JSON-Core/NeoJSONObject.class.st index 5943169..4c62cfb 100644 --- a/repository/Neo-JSON-Core/NeoJSONObject.class.st +++ b/repository/Neo-JSON-Core/NeoJSONObject.class.st @@ -148,16 +148,30 @@ NeoJSONObject class >> exampleSimpleWriting [ ] { #category : #convenience } -NeoJSONObject class >> fromString: string [ - "Parse string as JSON, so that maps become instances of me" +NeoJSONObject class >> fromStream: readStream [ + "Parse stream as JSON, so that maps become instances of me and lists instances of NeoJSONArray" - ^ (NeoJSONReader on: string readStream) + ^ (NeoJSONReader on: readStream readStream) mapClass: self; listClass: NeoJSONArray; propertyNamesAsSymbols: true; next ] +{ #category : #convenience } +NeoJSONObject class >> fromString: string [ + "Parse string as JSON, so that maps become instances of me and lists instances of NeoJSONArray" + + ^ self fromStream: string readStream +] + +{ #category : #convenience } +NeoJSONObject class >> readFrom: readStream [ + "Parse stream as JSON, so that maps become instances of me and lists instances of NeoJSONArray" + + ^ self fromStream: readStream +] + { #category : #accessing } NeoJSONObject >> at: key [ "I return nil for missing keys. From c4561bac65ff63cf5471c03d0cd6b4f9e4e852f9 Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Thu, 18 Apr 2024 10:57:18 +0200 Subject: [PATCH 40/90] Update CI.yml Added Pharo 12 --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 69094b1..50ce268 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - smalltalk: [ Pharo64-11, Pharo64-10, Pharo64-9.0, Pharo64-8.0, Pharo64-7.0 ] + smalltalk: [ Pharo64-12, Pharo64-11, Pharo64-10, Pharo64-9.0, Pharo64-8.0, Pharo64-7.0 ] name: ${{ matrix.smalltalk }} steps: - uses: actions/checkout@v2 From 4fea2578cf93ed7ef2e4fdfdee1c7b67af3490dd Mon Sep 17 00:00:00 2001 From: svenvc Date: Fri, 19 Apr 2024 14:33:40 +0200 Subject: [PATCH 41/90] added NeoJSON[Object|Array]>>#findPath[s]: for searching an object graph --- .../Neo-JSON-Core/NeoJSONArray.class.st | 26 +++++++++ .../Neo-JSON-Core/NeoJSONObject.class.st | 28 ++++++++++ .../NeoJSONObjectTests.class.st | 56 +++++++++++++++++++ 3 files changed, 110 insertions(+) diff --git a/repository/Neo-JSON-Core/NeoJSONArray.class.st b/repository/Neo-JSON-Core/NeoJSONArray.class.st index 6ab1d36..1d3bec6 100644 --- a/repository/Neo-JSON-Core/NeoJSONArray.class.st +++ b/repository/Neo-JSON-Core/NeoJSONArray.class.st @@ -71,6 +71,32 @@ NeoJSONArray >> atPath: keyCollection put: newValue [ ^ target at: keyCollection last put: newValue ] +{ #category : #accessing } +NeoJSONArray >> findPath: conditionBlock [ + "Find and return the first path to an object in the graph that I represent + for which conditionBlock holds. Return nil when not found." + + self doWithIndex: [ :each :index | + (each isCollection and: [ each isString not ]) ifTrue: [ + (each findPath: conditionBlock) ifNotNil: [ :subPath | + ^ { index } , subPath ] ] ]. + ^ nil +] + +{ #category : #accessing } +NeoJSONArray >> findPaths: conditionBlock [ + "Find and return all paths to objects in the graph that I represent + for which conditionBlock holds. Return an empty collection when none are found." + + | found | + found := OrderedCollection new. + self doWithIndex: [ :each :index | + (each isCollection and: [ each isString not ]) ifTrue: [ + (each findPaths: conditionBlock) do: [ :subPath | + found add: { index } , subPath ] ] ]. + ^ found +] + { #category : #print } NeoJSONArray >> printOn: stream [ "I use my JSON representation when printing myself" diff --git a/repository/Neo-JSON-Core/NeoJSONObject.class.st b/repository/Neo-JSON-Core/NeoJSONObject.class.st index 4c62cfb..0d20c03 100644 --- a/repository/Neo-JSON-Core/NeoJSONObject.class.st +++ b/repository/Neo-JSON-Core/NeoJSONObject.class.st @@ -251,6 +251,34 @@ NeoJSONObject >> doesNotUnderstand: message [ ifFalse: [ super doesNotUnderstand: message ] ] +{ #category : #accessing } +NeoJSONObject >> findPath: conditionBlock [ + "Find and return the first path to an object in the graph that I represent + for which conditionBlock holds. Return nil when not found." + + (conditionBlock value: self) ifTrue: [ ^ #() ]. + self keysAndValuesDo: [ :key :value | + (value isCollection and: [ value isString not ]) ifTrue: [ + (value findPath: conditionBlock) ifNotNil: [ :subPath | + ^ { key } , subPath ] ] ]. + ^ nil +] + +{ #category : #accessing } +NeoJSONObject >> findPaths: conditionBlock [ + "Find and return all paths to objects in the graph that I represent + for which conditionBlock holds. Return an empty collection when none are found." + + | found | + found := OrderedCollection new. + (conditionBlock value: self) ifTrue: [ found add: #() ]. + self keysAndValuesDo: [ :key :value | + (value isCollection and: [ value isString not ]) ifTrue: [ + (value findPaths: conditionBlock) do: [ :subPath | + found add: { key } , subPath ] ] ]. + ^ found +] + { #category : #accessing } NeoJSONObject >> name [ "Overwritten to make this accessor available as key" diff --git a/repository/Neo-JSON-Tests/NeoJSONObjectTests.class.st b/repository/Neo-JSON-Tests/NeoJSONObjectTests.class.st index d393d39..d6faddb 100644 --- a/repository/Neo-JSON-Tests/NeoJSONObjectTests.class.st +++ b/repository/Neo-JSON-Tests/NeoJSONObjectTests.class.st @@ -8,6 +8,23 @@ Class { #category : #'Neo-JSON-Tests' } +{ #category : #accessing } +NeoJSONObjectTests >> exampleJSONSchema [ + ^ NeoJSONObject fromString: '{ + "$id" : "https://example.com/schemas/address", + "type" : "object", + "properties" : { + "street_address" : { "$anchor" : "street_address", "type" : "string" }, + "city" : { "type" : "string" }, + "state" : { "type" : "string" } + }, + "required" : ["street_address", "city", "state"], + "$defs" : { + "country" : { "type" : "object", "$anchor" : "country", "enum" : ["us","canada","gb"] } + } +}' +] + { #category : #testing } NeoJSONObjectTests >> testAtAt [ | object | @@ -86,6 +103,45 @@ NeoJSONObjectTests >> testCRUD [ self assert: object isEmpty ] +{ #category : #testing } +NeoJSONObjectTests >> testFindPath [ + | json path | + json := self exampleJSONSchema. + + path := json findPath: [ :object | (object at: '$anchor') = 'street_address' ]. + self deny: path isNil. + self assert: path equals: #(properties street_address). + self assert: ((json atPath: path) at: '$anchor') equals: 'street_address'. + + path := json findPath: [ :object | (object at: 'foo') = 'bar' ]. + self assert: path isNil. + + path := json findPath: [ :object | (object at: '$anchor') = 'country' ]. + self deny: path isNil. + self assert: path equals: #('$defs' country). + self assert: ((json atPath: path) at: '$anchor') equals: 'country' +] + +{ #category : #testing } +NeoJSONObjectTests >> testFindPaths [ + | json paths | + json := self exampleJSONSchema. + + paths := json findPaths: [ :object | object includesKey: '$anchor' ]. + self deny: paths isEmpty. + self assert: paths asArray equals: #((properties street_address) ('$defs' country)). + self assert: ((json atPath: paths first) at: '$anchor') equals: 'street_address'. + self assert: ((json atPath: paths second) at: '$anchor') equals: 'country'. + + paths := json findPaths: [ :object | (object at: 'foo') = 'bar' ]. + self assert: paths isEmpty. + + paths := json findPaths: [ :object | object includesKey: #type ]. + self deny: paths isEmpty. + paths do: [ :path | + self assert: (#(string object) includes: ((json atPath: path) at: #type)) ] +] + { #category : #testing } NeoJSONObjectTests >> testJSON [ | data json object | From 17efabc2fdb0c2469bb348e79b363c3f91441ac7 Mon Sep 17 00:00:00 2001 From: svenvc Date: Wed, 24 Apr 2024 19:47:23 +0200 Subject: [PATCH 42/90] adding support for Newline delimited JSON (application/x-ndjson) & JSON Lines (application/jsonl) with NeoJSONWriter>>#nextPutAll: and NeoJSONReader>>#upToEnd exemplified in NeoJSONExamplesTests>>#testMultiInstances --- .../Neo-JSON-Core/NeoJSONReader.class.st | 10 +++++++++ .../Neo-JSON-Core/NeoJSONWriter.class.st | 11 ++++++++++ .../NeoJSONExamplesTests.class.st | 21 ++++++++++++++++++- 3 files changed, 41 insertions(+), 1 deletion(-) diff --git a/repository/Neo-JSON-Core/NeoJSONReader.class.st b/repository/Neo-JSON-Core/NeoJSONReader.class.st index 24c83ff..a203934 100644 --- a/repository/Neo-JSON-Core/NeoJSONReader.class.st +++ b/repository/Neo-JSON-Core/NeoJSONReader.class.st @@ -515,3 +515,13 @@ NeoJSONReader >> unescapeChar: char [ ifTrue: [ ^ Character tab ]. self error: 'Unknown escape char: ', (String with: char) ] + +{ #category : #accessing } +NeoJSONReader >> upToEnd [ + "Parse and collect JSON values from my stream until it ends, returning the collection. + This supports Newline delimited JSON (application/x-ndjson) & JSON Lines (application/jsonl). + Warning: though each element is valid JSON, taken as a whole the result is non-valid JSON." + + ^ Array streamContents: [ :out | + [ self atEnd ] whileFalse: [ out nextPut: self next ] ] +] diff --git a/repository/Neo-JSON-Core/NeoJSONWriter.class.st b/repository/Neo-JSON-Core/NeoJSONWriter.class.st index eb1c4c7..50a6c9b 100644 --- a/repository/Neo-JSON-Core/NeoJSONWriter.class.st +++ b/repository/Neo-JSON-Core/NeoJSONWriter.class.st @@ -267,6 +267,17 @@ NeoJSONWriter >> nextPut: anObject as: schema [ ^ mapping writeObject: anObject on: self ] +{ #category : #accessing } +NeoJSONWriter >> nextPutAll: aCollection [ + "Write a separate JSON representation of all objects in aCollection to my stream. + This supports Newline delimited JSON (application/x-ndjson) & JSON Lines (application/jsonl). + Warning: though each element is valid JSON, taken as a whole the result is non-valid JSON." + + aCollection do: [ :each | + self nextPut: each. + self newline ] +] + { #category : #'initialize-release' } NeoJSONWriter >> on: aWriteStream [ "Initialize on aWriteStream, which should be a character stream that diff --git a/repository/Neo-JSON-Tests/NeoJSONExamplesTests.class.st b/repository/Neo-JSON-Tests/NeoJSONExamplesTests.class.st index 080539e..2ba78f5 100644 --- a/repository/Neo-JSON-Tests/NeoJSONExamplesTests.class.st +++ b/repository/Neo-JSON-Tests/NeoJSONExamplesTests.class.st @@ -4,9 +4,28 @@ NeoJSONExamplesTests runs a couple of examples as tests Class { #name : #NeoJSONExamplesTests, #superclass : #TestCase, - #category : 'Neo-JSON-Tests' + #category : #'Neo-JSON-Tests' } +{ #category : #tests } +NeoJSONExamplesTests >> testMultiInstances [ + "Newline delimited JSON (application/x-ndjson) - https://github.com/ndjson/ndjson-spec" + "JSON Lines (application/jsonl) - https://jsonlines.org" + + | data json | + + data := (1 to: 10) collect: [ :each | + { #number -> each } asDictionary ]. + + json := String streamContents: [ :out | + (NeoJSONWriter on: out) nextPutAll: data ]. + + self assert: (NeoJSONReader on: json readStream) upToEnd equals: data. + + self assert: (NeoJSONReader on: json readStream) next equals: data first. + self deny: ((NeoJSONReader on: json readStream) next; atEnd) +] + { #category : #tests } NeoJSONExamplesTests >> testPoints [ | points json result | From f5652fb238989c9b4287179ff0725eab25765033 Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Thu, 1 Aug 2024 16:20:30 +0200 Subject: [PATCH 43/90] Extend NeoJSON findPath code --- .../Neo-JSON-Core/NeoJSONArray.class.st | 15 ++++++----- .../Neo-JSON-Core/NeoJSONObject.class.st | 5 ++-- .../NeoJSONObjectTests.class.st | 25 +++++++++++++------ 3 files changed, 29 insertions(+), 16 deletions(-) diff --git a/repository/Neo-JSON-Core/NeoJSONArray.class.st b/repository/Neo-JSON-Core/NeoJSONArray.class.st index 1d3bec6..6b636b7 100644 --- a/repository/Neo-JSON-Core/NeoJSONArray.class.st +++ b/repository/Neo-JSON-Core/NeoJSONArray.class.st @@ -76,9 +76,11 @@ NeoJSONArray >> findPath: conditionBlock [ "Find and return the first path to an object in the graph that I represent for which conditionBlock holds. Return nil when not found." - self doWithIndex: [ :each :index | - (each isCollection and: [ each isString not ]) ifTrue: [ - (each findPath: conditionBlock) ifNotNil: [ :subPath | + (conditionBlock value: self) ifTrue: [ ^ #(()) ]. + self doWithIndex: [ :value :index | + (conditionBlock value: value) ifTrue: [ ^ { index } ]. + (value isCollection and: [ value isString not ]) ifTrue: [ + (value findPath: conditionBlock) ifNotNil: [ :subPath | ^ { index } , subPath ] ] ]. ^ nil ] @@ -90,9 +92,10 @@ NeoJSONArray >> findPaths: conditionBlock [ | found | found := OrderedCollection new. - self doWithIndex: [ :each :index | - (each isCollection and: [ each isString not ]) ifTrue: [ - (each findPaths: conditionBlock) do: [ :subPath | + self doWithIndex: [ :value :index | + (conditionBlock value: value) ifTrue: [ found add: { index } ]. + (value isCollection and: [ value isString not ]) ifTrue: [ + (value findPaths: conditionBlock) do: [ :subPath | found add: { index } , subPath ] ] ]. ^ found ] diff --git a/repository/Neo-JSON-Core/NeoJSONObject.class.st b/repository/Neo-JSON-Core/NeoJSONObject.class.st index 0d20c03..ebd7b99 100644 --- a/repository/Neo-JSON-Core/NeoJSONObject.class.st +++ b/repository/Neo-JSON-Core/NeoJSONObject.class.st @@ -256,8 +256,9 @@ NeoJSONObject >> findPath: conditionBlock [ "Find and return the first path to an object in the graph that I represent for which conditionBlock holds. Return nil when not found." - (conditionBlock value: self) ifTrue: [ ^ #() ]. + (conditionBlock value: self) ifTrue: [ ^ #(()) ]. self keysAndValuesDo: [ :key :value | + (conditionBlock value: value) ifTrue: [ ^ { key } ]. (value isCollection and: [ value isString not ]) ifTrue: [ (value findPath: conditionBlock) ifNotNil: [ :subPath | ^ { key } , subPath ] ] ]. @@ -271,8 +272,8 @@ NeoJSONObject >> findPaths: conditionBlock [ | found | found := OrderedCollection new. - (conditionBlock value: self) ifTrue: [ found add: #() ]. self keysAndValuesDo: [ :key :value | + (conditionBlock value: value) ifTrue: [ found add: { key } ]. (value isCollection and: [ value isString not ]) ifTrue: [ (value findPaths: conditionBlock) do: [ :subPath | found add: { key } , subPath ] ] ]. diff --git a/repository/Neo-JSON-Tests/NeoJSONObjectTests.class.st b/repository/Neo-JSON-Tests/NeoJSONObjectTests.class.st index d6faddb..b71a187 100644 --- a/repository/Neo-JSON-Tests/NeoJSONObjectTests.class.st +++ b/repository/Neo-JSON-Tests/NeoJSONObjectTests.class.st @@ -108,18 +108,23 @@ NeoJSONObjectTests >> testFindPath [ | json path | json := self exampleJSONSchema. - path := json findPath: [ :object | (object at: '$anchor') = 'street_address' ]. + path := json findPath: [ :object | object isDictionary and: [ (object at: '$anchor') = 'street_address' ] ]. self deny: path isNil. self assert: path equals: #(properties street_address). self assert: ((json atPath: path) at: '$anchor') equals: 'street_address'. - path := json findPath: [ :object | (object at: 'foo') = 'bar' ]. + path := json findPath: [ :object | object isDictionary and: [ (object at: 'foo') = 'bar' ] ]. self assert: path isNil. - path := json findPath: [ :object | (object at: '$anchor') = 'country' ]. + path := json findPath: [ :object | object isDictionary and: [ (object at: '$anchor') = 'country' ] ]. self deny: path isNil. self assert: path equals: #('$defs' country). - self assert: ((json atPath: path) at: '$anchor') equals: 'country' + self assert: ((json atPath: path) at: '$anchor') equals: 'country'. + + json := NeoJSONObject new at: '$anchor' put: 'top'; yourself. + self + assert: (json findPath: [ :object | object isDictionary and: [ (object at: '$anchor') = 'top' ] ]) + equals: #(()) ] { #category : #testing } @@ -127,19 +132,23 @@ NeoJSONObjectTests >> testFindPaths [ | json paths | json := self exampleJSONSchema. - paths := json findPaths: [ :object | object includesKey: '$anchor' ]. + paths := json findPaths: [ :object | object isDictionary and: [ object includesKey: '$anchor' ] ]. self deny: paths isEmpty. self assert: paths asArray equals: #((properties street_address) ('$defs' country)). self assert: ((json atPath: paths first) at: '$anchor') equals: 'street_address'. self assert: ((json atPath: paths second) at: '$anchor') equals: 'country'. - paths := json findPaths: [ :object | (object at: 'foo') = 'bar' ]. + paths := json findPaths: [ :object | object isDictionary and: [ (object at: 'foo') = 'bar' ] ]. self assert: paths isEmpty. - paths := json findPaths: [ :object | object includesKey: #type ]. + paths := json findPaths: [ :object | object isDictionary and: [ object includesKey: #type ] ]. self deny: paths isEmpty. paths do: [ :path | - self assert: (#(string object) includes: ((json atPath: path) at: #type)) ] + self assert: (#(string object) includes: ((json atPath: path) at: #type)) ]. + + paths := json findPaths: [ :_ | true ]. + paths do: [ :each | + self assert: (json atPath: each) notNil ] ] { #category : #testing } From 31fd0a274d9633fde5da11ebe68043edf07fd68e Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Fri, 15 Nov 2024 14:48:46 +0100 Subject: [PATCH 44/90] Added NeoJSONObject>>#removeAtPath: --- repository/Neo-JSON-Core/NeoJSONObject.class.st | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/repository/Neo-JSON-Core/NeoJSONObject.class.st b/repository/Neo-JSON-Core/NeoJSONObject.class.st index ebd7b99..729832d 100644 --- a/repository/Neo-JSON-Core/NeoJSONObject.class.st +++ b/repository/Neo-JSON-Core/NeoJSONObject.class.st @@ -299,6 +299,20 @@ NeoJSONObject >> printOn: stream [ print: exception ] ] +{ #category : #accessing } +NeoJSONObject >> removeAtPath: keyCollection [ + "Use each key in keyCollection recursively and remove the final key. + Note how keys can also be indexes to arrays." + + | target | + keyCollection ifEmpty: [ ^ self ]. + target := self. + keyCollection allButLastDo: [ :each | + target := target at: each ifAbsent: [ ^ self ] ]. + "todo: fix this for arrays" + ^ target removeKey: keyCollection last +] + { #category : #evaluating } NeoJSONObject >> value [ "Overwritten to make this accessor available as key" From b1ca95dcce4c6dc1daff63acc4a14b10f89a7170 Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Fri, 15 Nov 2024 18:24:26 +0100 Subject: [PATCH 45/90] Fix NeoJSONCustomMapping>>#listOfType: to also set a default writer and update comments --- .../NeoJSONCustomMapping.class.st | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/repository/Neo-JSON-Core/NeoJSONCustomMapping.class.st b/repository/Neo-JSON-Core/NeoJSONCustomMapping.class.st index 6c0f47a..aeb7c3d 100644 --- a/repository/Neo-JSON-Core/NeoJSONCustomMapping.class.st +++ b/repository/Neo-JSON-Core/NeoJSONCustomMapping.class.st @@ -11,7 +11,7 @@ Class { 'reader', 'writer' ], - #category : 'Neo-JSON-Core' + #category : #'Neo-JSON-Core' } { #category : #mapping } @@ -42,7 +42,8 @@ NeoJSONCustomMapping >> identifier [ { #category : #mapping } NeoJSONCustomMapping >> listOfElementSchema: elementSchema [ "Set the reader to a block that will create an instance of the - standard listClass while reading a list of elements of type elementSchema" + standard listClass while reading a list of elements of type elementSchema. + Pass down the elementSchema to the elements in the writer." self reader: [ :jsonReader | jsonReader listClass streamContents: [ :stream | @@ -51,28 +52,32 @@ NeoJSONCustomMapping >> listOfElementSchema: elementSchema [ stream nextPut: element ] ] ]. self writer: [ :jsonWriter :list | jsonWriter writeListStreamingDo: [ :listWriter | - list do: [ :each | listWriter writeElement: each as: elementSchema ] ] ] - + list do: [ :each | + listWriter writeElement: each as: elementSchema ] ] ] ] { #category : #mapping } NeoJSONCustomMapping >> listOfType: collectionClass [ "Set the reader to a block that will create an instance of collectionClass - using #streamContents: while reading a list of elements" + using #streamContents: while reading a list of elements. + Set the writer to write the list's elements." self reader: [ :jsonReader | collectionClass streamContents: [ :stream | jsonReader parseListDo: [ | element | element := jsonReader next. - stream nextPut: element ] ] ] - "we do not set a writer, #neoJsonOn: should be sufficient, no element type known anyway" - + stream nextPut: element ] ] ]. + self writer: [ :jsonWriter :list | + jsonWriter writeListStreamingDo: [ :listWriter | + list do: [ :each | + listWriter writeElement: each ] ] ] ] { #category : #mapping } NeoJSONCustomMapping >> listOfType: collectionClass andElementSchema: elementSchema [ "Set the reader to a block that will create an instance of collectionClass - using #streamContents: while reading a list of elements of type elementSchema" + using #streamContents: while reading a list of elements of type elementSchema. + Pass down the elementSchema to the elements in the writer." self reader: [ :jsonReader | collectionClass streamContents: [ :stream | From f54cfb4a931971ed356d1dfde0e135951e82daae Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Mon, 18 Nov 2024 09:16:56 +0100 Subject: [PATCH 46/90] Make NeoJSONArray an OrderedCollection subclass so that insertion/addition/removal are possible (see methods #at:add and #removeKey: as well as #atPath:add which are mirrored on NeoJSONObject) --- .../Neo-JSON-Core/NeoJSONArray.class.st | 35 +++++++++++++++++-- .../Neo-JSON-Core/NeoJSONObject.class.st | 22 +++++++++++- .../NeoJSONObjectTests.class.st | 15 ++++++++ 3 files changed, 68 insertions(+), 4 deletions(-) diff --git a/repository/Neo-JSON-Core/NeoJSONArray.class.st b/repository/Neo-JSON-Core/NeoJSONArray.class.st index 6b636b7..3ef0026 100644 --- a/repository/Neo-JSON-Core/NeoJSONArray.class.st +++ b/repository/Neo-JSON-Core/NeoJSONArray.class.st @@ -12,8 +12,7 @@ Returning NeoJSONArrays and NeoJSONObjects, simple subclasses, allows to add som " Class { #name : #NeoJSONArray, - #superclass : #Array, - #type : #variable, + #superclass : #OrderedCollection, #category : #'Neo-JSON-Core' } @@ -21,7 +20,7 @@ Class { NeoJSONArray class >> exampleNumbers [ | numbers | - numbers := self new: 128. + numbers := self new: 128 withAll: nil. 0 to: 127 do: [ :n | numbers at: n + 1 @@ -44,6 +43,13 @@ NeoJSONArray class >> exampleSimple [ ^ self withAll: { 0 . 1 . Float pi. 'string' . true . false. nil } ] +{ #category : #adding } +NeoJSONArray >> at: index add: object [ + ^ index = '-' + ifTrue: [ self addLast: object ] + ifFalse: [ self insert: object before: index ] +] + { #category : #accessing } NeoJSONArray >> atPath: keyCollection [ "Use each key in keyCollection recursively, return nil when a key is missing. @@ -56,6 +62,22 @@ NeoJSONArray >> atPath: keyCollection [ ^ value ] +{ #category : #adding } +NeoJSONArray >> atPath: keyCollection add: newValue [ + "Use each key in keyCollection recursively, create new levels when needed. + Note how keys can also be indexes to arrays. + This variant will insert/add to arrays" + + | target | + keyCollection ifEmpty: [ ^ self ]. + target := self. + keyCollection allButLastDo: [ :each | + target := target + at: each + ifAbsent: [ target at: each add: target species new ] ]. + ^ target at: keyCollection last add: newValue +] + { #category : #accessing } NeoJSONArray >> atPath: keyCollection put: newValue [ "Use each key in keyCollection recursively, create new levels when needed. @@ -111,3 +133,10 @@ NeoJSONArray >> printOn: stream [ nextPutAll: ' Error printing JSON: '; print: exception ] ] + +{ #category : #removing } +NeoJSONArray >> removeKey: index [ + "Polymorphic with NeoJSONObject: remove the element at index" + + ^ self removeAt: index +] diff --git a/repository/Neo-JSON-Core/NeoJSONObject.class.st b/repository/Neo-JSON-Core/NeoJSONObject.class.st index 729832d..07abf5a 100644 --- a/repository/Neo-JSON-Core/NeoJSONObject.class.st +++ b/repository/Neo-JSON-Core/NeoJSONObject.class.st @@ -180,6 +180,11 @@ NeoJSONObject >> at: key [ ^ self at: key ifAbsent: [ nil ] ] +{ #category : #add } +NeoJSONObject >> at: key add: object [ + ^ self at: key put: object +] + { #category : #'nested dictionaries' } NeoJSONObject >> at: firstKey at: secondKey [ "I return nil for missing keys. @@ -222,6 +227,22 @@ NeoJSONObject >> atPath: keyCollection [ ^ value ] +{ #category : #accessing } +NeoJSONObject >> atPath: keyCollection add: newValue [ + "Use each key in keyCollection recursively, create new levels when needed. + Note how keys can also be indexes to arrays. + This variant will insert/add to arrays." + + | target | + keyCollection ifEmpty: [ ^ self ]. + target := self. + keyCollection allButLastDo: [ :each | + target := target + at: each + ifAbsent: [ target at: each add: target species new ] ]. + ^ target at: keyCollection last add: newValue +] + { #category : #accessing } NeoJSONObject >> atPath: keyCollection put: newValue [ "Use each key in keyCollection recursively, create new levels when needed. @@ -309,7 +330,6 @@ NeoJSONObject >> removeAtPath: keyCollection [ target := self. keyCollection allButLastDo: [ :each | target := target at: each ifAbsent: [ ^ self ] ]. - "todo: fix this for arrays" ^ target removeKey: keyCollection last ] diff --git a/repository/Neo-JSON-Tests/NeoJSONObjectTests.class.st b/repository/Neo-JSON-Tests/NeoJSONObjectTests.class.st index b71a187..57a0dcc 100644 --- a/repository/Neo-JSON-Tests/NeoJSONObjectTests.class.st +++ b/repository/Neo-JSON-Tests/NeoJSONObjectTests.class.st @@ -25,6 +25,21 @@ NeoJSONObjectTests >> exampleJSONSchema [ }' ] +{ #category : #testing } +NeoJSONObjectTests >> testArray [ + | jsonArray array | + jsonArray := '[1,2,3]'. + array := NeoJSONObject fromString: jsonArray. + self assert: array asString equals: jsonArray. + self assertCollection: array hasSameElements: #(1 2 3). + array at: 1 add: 0. + array at: #- add: 4. + self assertCollection: array hasSameElements: #(0 1 2 3 4). + array removeKey: 5. + array removeKey: 1. + self assertCollection: array hasSameElements: #(1 2 3) +] + { #category : #testing } NeoJSONObjectTests >> testAtAt [ | object | From 66706221f079730bf7db1b3730f94d8144793e88 Mon Sep 17 00:00:00 2001 From: rydnr Date: Tue, 15 Apr 2025 02:53:20 +0200 Subject: [PATCH 47/90] Added Nix flake. It uses an unofficial Nix [1] flake [2] for the PharoVM, that is in alpha stage. Usage: - To launch a shell with Pharo 12 available: `cd .nix && nix develop .` - To build the NeoJSON derivation (a blank Pharo 12 image with NeoJSON loaded): `cd .nix && nix build .` - To list the available outputs of the flake: `cd .nix && nix flake show .` - To inspect the flake metadata: `cd .nix && nix flake metadata .` [1] https://nixos.org [2] https://github.com/rydnr/nix-flakes/tree/main/pharo-vm --- .nix/flake.lock | 85 +++++++++++++++++++++++++++++++++ .nix/flake.nix | 122 ++++++++++++++++++++++++++++++++++++++++++++++++ .nix/shared.nix | 35 ++++++++++++++ 3 files changed, 242 insertions(+) create mode 100644 .nix/flake.lock create mode 100644 .nix/flake.nix create mode 100644 .nix/shared.nix diff --git a/.nix/flake.lock b/.nix/flake.lock new file mode 100644 index 0000000..9ade815 --- /dev/null +++ b/.nix/flake.lock @@ -0,0 +1,85 @@ +{ + "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1652776076, + "narHash": "sha256-gzTw/v1vj4dOVbpBSJX4J0DwUR6LIyXo7/SuuTJp1kM=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "04c1b180862888302ddfb2e3ad9eaa63afc60cf8", + "type": "github" + }, + "original": { + "owner": "numtide", + "ref": "v1.0.0", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "locked": { + "lastModified": 1652776076, + "narHash": "sha256-gzTw/v1vj4dOVbpBSJX4J0DwUR6LIyXo7/SuuTJp1kM=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "04c1b180862888302ddfb2e3ad9eaa63afc60cf8", + "type": "github" + }, + "original": { + "owner": "numtide", + "ref": "v1.0.0", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1744664988, + "narHash": "sha256-tv5QkwoHUT7957XYPOWpyBD440SdfPBPBVymbXlmqsc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "eff64d6c1a13c9a3348f332f75cbde1935dc3d21", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "release-24.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "pharo-vm-12": { + "inputs": { + "flake-utils": "flake-utils_2", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "dir": "pharo-vm", + "lastModified": 1744567847, + "narHash": "sha256-Am5h1E69nFUdjD+XDFRw7wB3Lr2k2bxrRKygy96LJCA=", + "owner": "rydnr", + "repo": "nix-flakes", + "rev": "6369c686e0d7d974e0de93685bd4b16615bb5113", + "type": "github" + }, + "original": { + "dir": "pharo-vm", + "owner": "rydnr", + "ref": "pharo-vm-12.0.1519.2", + "repo": "nix-flakes", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs", + "pharo-vm-12": "pharo-vm-12" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/.nix/flake.nix b/.nix/flake.nix new file mode 100644 index 0000000..b1cfc1b --- /dev/null +++ b/.nix/flake.nix @@ -0,0 +1,122 @@ +{ + description = "Flake for svenvc/neojson"; + + inputs = rec { + flake-utils.url = "github:numtide/flake-utils/v1.0.0"; + nixpkgs.url = "github:NixOS/nixpkgs/release-24.11"; + pharo-vm-12 = { + inputs.nixpkgs.follows = "nixpkgs"; + url = "github:rydnr/nix-flakes/pharo-vm-12.0.1519.2?dir=pharo-vm"; + }; + }; + outputs = inputs: + with inputs; + flake-utils.lib.eachDefaultSystem (system: + let + org = "svenvc"; + repo = "neojson"; + pname = "${repo}"; + tag = "v18"; + baseline = "NeoJSON"; + pkgs = import nixpkgs { inherit system; }; + description = "An elegant and efficient Smalltalk framework to read and write JSON converting to or from Smalltalk objects"; + license = pkgs.lib.licenses.mit; + homepage = "https://github.com/svenvc/neojson"; + maintainers = with pkgs.lib.maintainers; [ ]; + nixpkgsVersion = builtins.readFile "${nixpkgs}/.version"; + nixpkgsRelease = + builtins.replaceStrings [ "\n" ] [ "" ] "nixpkgs-${nixpkgsVersion}"; + shared = import ./shared.nix; + svenvc-neojson-for = { bootstrap-image-name, bootstrap-image-sha256, bootstrap-image-url, pharo-vm }: + let + bootstrap-image = pkgs.fetchurl { + url = bootstrap-image-url; + sha256 = bootstrap-image-sha256; + }; + src = ./../repository; + in pkgs.stdenv.mkDerivation (finalAttrs: { + version = tag; + inherit pname src; + + strictDeps = true; + + buildInputs = with pkgs; [ + ]; + + nativeBuildInputs = with pkgs; [ + pharo-vm + pkgs.unzip + ]; + + unpackPhase = '' + unzip -o ${bootstrap-image} -d image + # cp -r ${src} src + ''; + + configurePhase = '' + runHook preConfigure + + # load baseline + ${pharo-vm}/bin/pharo image/${bootstrap-image-name} eval --save "EpMonitor current disable. NonInteractiveTranscript stdout install. [ Metacello new repository: 'filetree://${src}'; baseline: '${baseline}'; onConflictUseLoaded; load ] ensure: [ EpMonitor current enable ]" + + runHook postConfigure + ''; + + buildPhase = '' + runHook preBuild + + # assemble + ${pharo-vm}/bin/pharo image/${bootstrap-image-name} save "${pname}" + + mkdir dist + mv image/${pname}.* dist/ + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + mkdir -p $out + cp -r ${pharo-vm}/bin $out + cp -r ${pharo-vm}/lib $out + cp -r dist/* $out/ + cp image/*.sources $out/ + mkdir $out/share + pushd ${src} + ${pkgs.zip}/bin/zip -r $out/share/src.zip . + popd + + runHook postInstall + ''; + + meta = { + longDescription = '' + NeoJSON is an elegant and efficient standalone Smalltalk framework to read and write JSON converting to or from Smalltalk objects. + ''; + inherit description homepage license maintainers; + mainProgram = "pharo"; + platforms = pkgs.lib.platforms.linux; + }; + }); + in rec { + defaultPackage = packages.default; + devShells = rec { + default = svenvc-neojson-12; + svenvc-neojson-12 = shared.devShell-for { + package = packages.svenvc-neojson-12; + inherit org pkgs repo tag; + nixpkgs-release = nixpkgsRelease; + }; + }; + packages = rec { + default = svenvc-neojson-12; + svenvc-neojson-12 = svenvc-neojson-for rec { + bootstrap-image-url = pharo-vm-12.resources.${system}.bootstrap-image-url; + bootstrap-image-sha256 = pharo-vm-12.resources.${system}.bootstrap-image-sha256; + bootstrap-image-name = pharo-vm-12.resources.${system}.bootstrap-image-name; + pharo-vm = pharo-vm-12.packages.${system}.pharo-vm; + }; + }; + }); +} diff --git a/.nix/shared.nix b/.nix/shared.nix new file mode 100644 index 0000000..a9e8b21 --- /dev/null +++ b/.nix/shared.nix @@ -0,0 +1,35 @@ +# .nix/shared.nix +# +# This file provides functions used by NeoJSON's Nix flake. +# +# MIT License +# +# Copyright (C) 2012 Sven Van Caekenberghe +# +# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +rec { + shellHook-for = { nixpkgs-release, org, package, repo, tag }: + '' + export PS1="\033[37m[\[\033[01;34m\]${org}/${repo}\033[01;37m|\033[01;33m${tag}[\033[00m\] " + echo -e "\033[36m▗▖  ▗▖▗▞▀▚▖ ▄▄▄ \033[31m ▗▖ ▗▄▄▖ ▗▄▖ ▗▖  ▗▖ \033[32mhttps://github.com/${org}\033[0m" + echo -e "\033[36m▐▛▚▖▐▌▐▛▀▀▘█   █\033[31m ▐▌▐▌   ▐▌ ▐▌▐▛▚▖▐▌ \033[33mhttps://github.com/${org}/${repo}:${tag}\033[0m" + echo -e "\033[36m▐▌ ▝▜▌▝▚▄▄▖▀▄▄▄▀\033[31m ▐▌ ▝▀▚▖▐▌ ▐▌▐▌ ▝▜▌ \033[34mhttps://pharo.org\033[0m" + echo -e "\033[36m▐▌  ▐▌ \033[0m       \033[31m▗▄▄▞▘▗▄▄▞▘▝▚▄▞▘▐▌  ▐▌ \033[35mhttps://github.com/nixos/nixpkgs/tree/${nixpkgs-release}\033[0m" + echo + echo -e "Thank you for using \033[32m${package.pname}\033[0m \033[33m${package.version}\033[0m \033[31m(${org}/${repo}-${tag})\033[0m and for your appreciation of Smalltalk." + ''; + devShell-for = { nixpkgs-release, org, package, pkgs, repo, tag}: + pkgs.mkShell { + shellHook = shellHook-for { + inherit nixpkgs-release org package repo tag; + }; + }; + app-for = { package, entrypoint }: { + type = "app"; + program = "${package}/bin/${entrypoint}.sh"; + }; +} From a09f833549aaf7eb92c795fbdbf86018d987e20e Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Thu, 11 Sep 2025 13:46:08 +0200 Subject: [PATCH 48/90] Add Pharo 13 to build matrix --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 50ce268..e4c7e57 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - smalltalk: [ Pharo64-12, Pharo64-11, Pharo64-10, Pharo64-9.0, Pharo64-8.0, Pharo64-7.0 ] + smalltalk: [ Pharo64-13, Pharo64-12, Pharo64-11, Pharo64-10, Pharo64-9.0, Pharo64-8.0, Pharo64-7.0 ] name: ${{ matrix.smalltalk }} steps: - uses: actions/checkout@v2 From 11e274dd96dc9636cab90929937b7cd09719de7c Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Thu, 11 Sep 2025 14:11:33 +0200 Subject: [PATCH 49/90] Fix NeoJSONReaderTests>>#testFloats by increasing the pi constant's precision --- .../Neo-JSON-Tests/NeoJSONBenchmark.class.st | 15 +++-- .../NeoJSONBenchmarkTests.class.st | 15 +++-- .../NeoJSONExamplesTests.class.st | 15 +++-- .../NeoJSONFloatPrinterTests.class.st | 23 +++---- .../NeoJSONMappingTests.class.st | 13 ++-- .../Neo-JSON-Tests/NeoJSONMockStream.class.st | 29 +++++---- .../NeoJSONObjectTests.class.st | 27 ++++---- .../NeoJSONReaderTests.class.st | 65 ++++++++++--------- .../NeoJSONTestObject1.class.st | 35 +++++----- .../NeoJSONTestObject2.class.st | 43 ++++++------ .../NeoJSONTestObject3.class.st | 23 +++---- .../Neo-JSON-Tests/NeoJSONValidation.class.st | 59 ++++++++--------- .../NeoJSONWriteReadAsciiOnlyTests.class.st | 9 +-- .../NeoJSONWriteReadMockStreamTests.class.st | 9 +-- ...eoJSONWriteReadPrettyPrintedTests.class.st | 17 ++--- .../NeoJSONWriteReadTests.class.st | 29 +++++---- .../NeoJSONWriterTests.class.st | 61 ++++++++--------- repository/Neo-JSON-Tests/package.st | 2 +- 18 files changed, 253 insertions(+), 236 deletions(-) diff --git a/repository/Neo-JSON-Tests/NeoJSONBenchmark.class.st b/repository/Neo-JSON-Tests/NeoJSONBenchmark.class.st index d3f2604..e436ea4 100644 --- a/repository/Neo-JSON-Tests/NeoJSONBenchmark.class.st +++ b/repository/Neo-JSON-Tests/NeoJSONBenchmark.class.st @@ -20,16 +20,17 @@ benchmark := NeoJSONBenchmark new. [benchmark write] timeToRun. " Class { - #name : #NeoJSONBenchmark, - #superclass : #Object, + #name : 'NeoJSONBenchmark', + #superclass : 'Object', #instVars : [ 'objects', 'json' ], - #category : 'Neo-JSON-Tests' + #category : 'Neo-JSON-Tests', + #package : 'Neo-JSON-Tests' } -{ #category : #'initialize-release' } +{ #category : 'initialize-release' } NeoJSONBenchmark >> initialize [ super initialize. objects := Array new: 1000. @@ -47,20 +48,20 @@ NeoJSONBenchmark >> initialize [ ] -{ #category : #public } +{ #category : 'public' } NeoJSONBenchmark >> read [ ^ (NeoJSONReader on: json readStream) next ] -{ #category : #public } +{ #category : 'public' } NeoJSONBenchmark >> write [ ^ String streamContents: [ :stream | (NeoJSONWriter on: stream) nextPut: objects ] ] -{ #category : #public } +{ #category : 'public' } NeoJSONBenchmark >> writePrettyPrintedRead [ | output | output := String streamContents: [ :stream | diff --git a/repository/Neo-JSON-Tests/NeoJSONBenchmarkTests.class.st b/repository/Neo-JSON-Tests/NeoJSONBenchmarkTests.class.st index 059ee56..549e715 100644 --- a/repository/Neo-JSON-Tests/NeoJSONBenchmarkTests.class.st +++ b/repository/Neo-JSON-Tests/NeoJSONBenchmarkTests.class.st @@ -4,12 +4,13 @@ I am NeoJSONBenchmarkTests. This test is obviously dependent on hardware, but the margin is quite high. " Class { - #name : #NeoJSONBenchmarkTests, - #superclass : #TestCase, - #category : 'Neo-JSON-Tests' + #name : 'NeoJSONBenchmarkTests', + #superclass : 'TestCase', + #category : 'Neo-JSON-Tests', + #package : 'Neo-JSON-Tests' } -{ #category : #testing } +{ #category : 'testing' } NeoJSONBenchmarkTests >> testObject2 [ | json | json := NeoJSONWriter toString: NeoJSONTestObject2 new. @@ -18,7 +19,7 @@ NeoJSONBenchmarkTests >> testObject2 [ equals: NeoJSONTestObject2 new ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONBenchmarkTests >> testPrettyPrinted [ | benchmark | benchmark := NeoJSONBenchmark new. @@ -27,14 +28,14 @@ NeoJSONBenchmarkTests >> testPrettyPrinted [ equals: benchmark read ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONBenchmarkTests >> testRead [ | benchmark | benchmark := NeoJSONBenchmark new. benchmark read ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONBenchmarkTests >> testWrite [ | benchmark | benchmark := NeoJSONBenchmark new. diff --git a/repository/Neo-JSON-Tests/NeoJSONExamplesTests.class.st b/repository/Neo-JSON-Tests/NeoJSONExamplesTests.class.st index 2ba78f5..f4f2b6c 100644 --- a/repository/Neo-JSON-Tests/NeoJSONExamplesTests.class.st +++ b/repository/Neo-JSON-Tests/NeoJSONExamplesTests.class.st @@ -2,12 +2,13 @@ NeoJSONExamplesTests runs a couple of examples as tests " Class { - #name : #NeoJSONExamplesTests, - #superclass : #TestCase, - #category : #'Neo-JSON-Tests' + #name : 'NeoJSONExamplesTests', + #superclass : 'TestCase', + #category : 'Neo-JSON-Tests', + #package : 'Neo-JSON-Tests' } -{ #category : #tests } +{ #category : 'tests' } NeoJSONExamplesTests >> testMultiInstances [ "Newline delimited JSON (application/x-ndjson) - https://github.com/ndjson/ndjson-spec" "JSON Lines (application/jsonl) - https://jsonlines.org" @@ -26,7 +27,7 @@ NeoJSONExamplesTests >> testMultiInstances [ self deny: ((NeoJSONReader on: json readStream) next; atEnd) ] -{ #category : #tests } +{ #category : 'tests' } NeoJSONExamplesTests >> testPoints [ | points json result | @@ -61,7 +62,7 @@ NeoJSONExamplesTests >> testPoints [ self assert: result equals: points asOrderedCollection. ] -{ #category : #tests } +{ #category : 'tests' } NeoJSONExamplesTests >> testRectanglePoints [ | rectangle rectangleJson result | @@ -92,7 +93,7 @@ NeoJSONExamplesTests >> testRectanglePoints [ self assert: result equals: rectangle ] -{ #category : #tests } +{ #category : 'tests' } NeoJSONExamplesTests >> testRectanglePointsWithNils [ self assert: diff --git a/repository/Neo-JSON-Tests/NeoJSONFloatPrinterTests.class.st b/repository/Neo-JSON-Tests/NeoJSONFloatPrinterTests.class.st index 2aa0bff..eadef2a 100644 --- a/repository/Neo-JSON-Tests/NeoJSONFloatPrinterTests.class.st +++ b/repository/Neo-JSON-Tests/NeoJSONFloatPrinterTests.class.st @@ -2,21 +2,22 @@ I am NeoJSONFloatPrinterTests, the collection of unit tests for NeoJSONFloatPrinter. " Class { - #name : #NeoJSONFloatPrinterTests, - #superclass : #TestCase, + #name : 'NeoJSONFloatPrinterTests', + #superclass : 'TestCase', #instVars : [ 'printer' ], - #category : #'Neo-JSON-Tests' + #category : 'Neo-JSON-Tests', + #package : 'Neo-JSON-Tests' } -{ #category : #running } +{ #category : 'running' } NeoJSONFloatPrinterTests >> setUp [ super setUp. printer := NeoJSONFloatPrinter new ] -{ #category : #tests } +{ #category : 'tests' } NeoJSONFloatPrinterTests >> testDecimalNotation [ self assert: (printer print: 1.5) equals: '1.5'. self assert: (printer print: -1.5) equals: '-1.5'. @@ -33,7 +34,7 @@ NeoJSONFloatPrinterTests >> testDecimalNotation [ ] -{ #category : #tests } +{ #category : 'tests' } NeoJSONFloatPrinterTests >> testInteger [ self assert: (printer print: 1.0) equals: '1'. self assert: (printer print: 0.0) equals: '0'. @@ -43,7 +44,7 @@ NeoJSONFloatPrinterTests >> testInteger [ ] -{ #category : #tests } +{ #category : 'tests' } NeoJSONFloatPrinterTests >> testLowPrecision [ printer := NeoJSONFloatPrinter lowPrecision. self assert: (printer print: (4/3) asFloat) equals: '1.33'. @@ -57,7 +58,7 @@ NeoJSONFloatPrinterTests >> testLowPrecision [ self assert: (printer print: 9.10938356e-31) equals: '9.11e-31'. ] -{ #category : #tests } +{ #category : 'tests' } NeoJSONFloatPrinterTests >> testScientificNotation [ self assert: (printer print: 1234567.5) equals: '1.23457e6'. "note the rounding" self assert: (printer print: -1234567.5) equals: '-1.23457e6'. "note the rounding" @@ -66,7 +67,7 @@ NeoJSONFloatPrinterTests >> testScientificNotation [ ] -{ #category : #tests } +{ #category : 'tests' } NeoJSONFloatPrinterTests >> testScientificOnly [ printer := NeoJSONFloatPrinter scientificOnly. self assert: (printer print: (4/3) asFloat) equals: '1.33333e0'. @@ -79,7 +80,7 @@ NeoJSONFloatPrinterTests >> testScientificOnly [ self assert: (printer print: 9.10938356e-31) equals: '9.10938e-31'. ] -{ #category : #tests } +{ #category : 'tests' } NeoJSONFloatPrinterTests >> testSpecialValues [ self assert: (printer print: Float zero) equals: '0'. self assert: (printer print: Float nan) equals: 'NaN'. @@ -87,7 +88,7 @@ NeoJSONFloatPrinterTests >> testSpecialValues [ self assert: (printer print: Float infinity negated) equals: '-Inf'. ] -{ #category : #tests } +{ #category : 'tests' } NeoJSONFloatPrinterTests >> testWellKnownConstants [ self assert: (printer print: Float pi) equals: '3.14159'. self assert: (printer print: Float e) equals: '2.71828'. diff --git a/repository/Neo-JSON-Tests/NeoJSONMappingTests.class.st b/repository/Neo-JSON-Tests/NeoJSONMappingTests.class.st index fa55266..93488eb 100644 --- a/repository/Neo-JSON-Tests/NeoJSONMappingTests.class.st +++ b/repository/Neo-JSON-Tests/NeoJSONMappingTests.class.st @@ -2,12 +2,13 @@ I am NeoJSONMappingTests, testing more exotic kinds of mapping constructs. " Class { - #name : #NeoJSONMappingTests, - #superclass : #TestCase, - #category : 'Neo-JSON-Tests' + #name : 'NeoJSONMappingTests', + #superclass : 'TestCase', + #category : 'Neo-JSON-Tests', + #package : 'Neo-JSON-Tests' } -{ #category : #testing } +{ #category : 'testing' } NeoJSONMappingTests >> testDynamicTyping [ | data customMapping json result | data := Array with: 'foo'->1 with: #('foo' 2). @@ -34,7 +35,7 @@ NeoJSONMappingTests >> testDynamicTyping [ self assert: result equals: data ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONMappingTests >> testSymbolOrStringInstVarMapping [ | data out1 out2 result1 result2 | data := Array with: 1@2 with: 3@4. @@ -56,7 +57,7 @@ NeoJSONMappingTests >> testSymbolOrStringInstVarMapping [ self assert: result2 equals: data ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONMappingTests >> testVirtualTransferObject [ | data customMapping extraJson json result | data := NeoJSONObject new data: (Array with: 1@1 with: 2@2). diff --git a/repository/Neo-JSON-Tests/NeoJSONMockStream.class.st b/repository/Neo-JSON-Tests/NeoJSONMockStream.class.st index e0d871c..7b6b18f 100644 --- a/repository/Neo-JSON-Tests/NeoJSONMockStream.class.st +++ b/repository/Neo-JSON-Tests/NeoJSONMockStream.class.st @@ -3,67 +3,68 @@ I am NeoJSONMockStream. I wrap another stream to validate the limited API used. " Class { - #name : #NeoJSONMockStream, - #superclass : #Object, + #name : 'NeoJSONMockStream', + #superclass : 'Object', #instVars : [ 'stream' ], - #category : 'Neo-JSON-Tests' + #category : 'Neo-JSON-Tests', + #package : 'Neo-JSON-Tests' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } NeoJSONMockStream class >> on: stream [ ^ self new stream: stream; yourself ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONMockStream >> atEnd [ ^ stream atEnd ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONMockStream >> close [ ^ stream close ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONMockStream >> collectionSpecies [ ^ stream collectionSpecies ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONMockStream >> next [ ^ stream next ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONMockStream >> nextPut: character [ ^ stream nextPut: character ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONMockStream >> nextPutAll: string [ ^ stream nextPutAll: string ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONMockStream >> peek [ ^ stream peek ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONMockStream >> peekFor: char [ ^ stream peekFor: char ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONMockStream >> space [ ^ stream space ] -{ #category : #'initialize-release' } +{ #category : 'initialize-release' } NeoJSONMockStream >> stream: anObject [ stream := anObject ] diff --git a/repository/Neo-JSON-Tests/NeoJSONObjectTests.class.st b/repository/Neo-JSON-Tests/NeoJSONObjectTests.class.st index 57a0dcc..db8c0d0 100644 --- a/repository/Neo-JSON-Tests/NeoJSONObjectTests.class.st +++ b/repository/Neo-JSON-Tests/NeoJSONObjectTests.class.st @@ -3,12 +3,13 @@ I am NeoJSONObjectTests, I hold unit tests for NeoJSONObject. " Class { - #name : #NeoJSONObjectTests, - #superclass : #TestCase, - #category : #'Neo-JSON-Tests' + #name : 'NeoJSONObjectTests', + #superclass : 'TestCase', + #category : 'Neo-JSON-Tests', + #package : 'Neo-JSON-Tests' } -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONObjectTests >> exampleJSONSchema [ ^ NeoJSONObject fromString: '{ "$id" : "https://example.com/schemas/address", @@ -25,7 +26,7 @@ NeoJSONObjectTests >> exampleJSONSchema [ }' ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONObjectTests >> testArray [ | jsonArray array | jsonArray := '[1,2,3]'. @@ -40,7 +41,7 @@ NeoJSONObjectTests >> testArray [ self assertCollection: array hasSameElements: #(1 2 3) ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONObjectTests >> testAtAt [ | object | object := NeoJSONObject new. @@ -55,7 +56,7 @@ NeoJSONObjectTests >> testAtAt [ self assert: (object at: #foo at: #foo) isNil ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONObjectTests >> testAtPath [ | object | object := NeoJSONObject newFrom: (Array with: #one -> ( NeoJSONObject newFrom: (Array with: #two -> ( NeoJSONObject newFrom: (Array with: #three -> 42) ) ) )). @@ -75,7 +76,7 @@ NeoJSONObjectTests >> testAtPath [ ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONObjectTests >> testAtPathPut [ | object | object := NeoJSONObject new. @@ -98,7 +99,7 @@ NeoJSONObjectTests >> testAtPathPut [ ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONObjectTests >> testCRUD [ | object | object := NeoJSONObject new. @@ -118,7 +119,7 @@ NeoJSONObjectTests >> testCRUD [ self assert: object isEmpty ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONObjectTests >> testFindPath [ | json path | json := self exampleJSONSchema. @@ -142,7 +143,7 @@ NeoJSONObjectTests >> testFindPath [ equals: #(()) ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONObjectTests >> testFindPaths [ | json paths | json := self exampleJSONSchema. @@ -166,7 +167,7 @@ NeoJSONObjectTests >> testFindPaths [ self assert: (json atPath: each) notNil ] ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONObjectTests >> testJSON [ | data json object | data := NeoJSONObject newFrom: (Array with: #foo->1 with: #bar->2 with: #str->'Str!' with: #bool->true with: #flt->1.5). @@ -178,7 +179,7 @@ NeoJSONObjectTests >> testJSON [ self assert: (NeoJSONObject fromString: json) equals: object ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONObjectTests >> testPathAccess [ | data | data := NeoJSONObject fromString: '{"foo":1,"bar":2,"array":[{"a":1},{"b":2}]}'. diff --git a/repository/Neo-JSON-Tests/NeoJSONReaderTests.class.st b/repository/Neo-JSON-Tests/NeoJSONReaderTests.class.st index 97fc6e2..3c472c4 100644 --- a/repository/Neo-JSON-Tests/NeoJSONReaderTests.class.st +++ b/repository/Neo-JSON-Tests/NeoJSONReaderTests.class.st @@ -2,12 +2,13 @@ I am NeoJSONReaderTests, a test suite for NeoJSONReader. " Class { - #name : #NeoJSONReaderTests, - #superclass : #TestCase, - #category : #'Neo-JSON-Tests' + #name : 'NeoJSONReaderTests', + #superclass : 'TestCase', + #category : 'Neo-JSON-Tests', + #package : 'Neo-JSON-Tests' } -{ #category : #testing } +{ #category : 'testing' } NeoJSONReaderTests >> testAllowNil [ self should: [ @@ -30,7 +31,7 @@ NeoJSONReaderTests >> testAllowNil [ equals: (Array with: 1 @ 2 with: nil with: 3 @ -1). ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONReaderTests >> testArrayOfPoints [ | reader | reader := [ :string | @@ -45,7 +46,7 @@ NeoJSONReaderTests >> testArrayOfPoints [ self assert: (reader value: '[ { } ]') equals: (Array with: Point new) ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONReaderTests >> testArrayOfPointsUsingNextListAs [ | reader | reader := [ :string | @@ -57,7 +58,7 @@ NeoJSONReaderTests >> testArrayOfPointsUsingNextListAs [ self assert: (reader value: '[ { } ]') equals: (Array with: Point new) ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONReaderTests >> testAssociation [ | reader | reader := [ :string | @@ -69,7 +70,7 @@ NeoJSONReaderTests >> testAssociation [ self assert: (reader value: '{}') equals: Association new ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONReaderTests >> testBooleans [ self assert: (NeoJSONReader on: 'true' readStream) next equals: true. self assert: (NeoJSONReader on: 'false' readStream) next equals: false. @@ -77,7 +78,7 @@ NeoJSONReaderTests >> testBooleans [ self should: [ (NeoJSONReader on: 'falsE' readStream) next ] raise: NeoJSONParseError. ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONReaderTests >> testByteArray [ | reader | reader := [ :string | @@ -89,7 +90,7 @@ NeoJSONReaderTests >> testByteArray [ self assert: (reader value: '[ ]') equals: ByteArray new ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONReaderTests >> testDate [ | reader | reader := [ :input | @@ -100,7 +101,7 @@ NeoJSONReaderTests >> testDate [ self assert: (reader value: ' "2012-06-08" ') equals: (Date fromString: '2012-06-08') ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONReaderTests >> testDateAndTime [ | reader | reader := [ :input | @@ -113,7 +114,7 @@ NeoJSONReaderTests >> testDateAndTime [ equals: (DateAndTime year: 2012 month: 2 day: 14 hour: 16 minute: 40 second: 18 offset: 1 hour) ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONReaderTests >> testFloats [ | reader | reader := [ :string | @@ -131,7 +132,7 @@ NeoJSONReaderTests >> testFloats [ self assert: ((reader value: '-123e-6') closeTo: -123e-6). self assert: ((reader value: '-123E6') closeTo: -123e6). self assert: ((reader value: '-123E-6') closeTo: -123e-6). - self assert: ((reader value: '3.14159') closeTo: Float pi). + self assert: ((reader value: '3.141592653589793') closeTo: Float pi). self assert: ((reader value: '0.123e6') closeTo: 0.123e6). self assert: ((reader value: '0.123e-6') closeTo: 0.123e-6). self assert: ((reader value: '-0.123E6') closeTo: -0.123e6). @@ -139,7 +140,7 @@ NeoJSONReaderTests >> testFloats [ ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONReaderTests >> testIntegers [ | reader | reader := [ :string | @@ -157,7 +158,7 @@ NeoJSONReaderTests >> testIntegers [ ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONReaderTests >> testLists [ | reader | reader := [ :string | @@ -172,7 +173,7 @@ NeoJSONReaderTests >> testLists [ self should: [ reader value: '[}' ] raise: NeoJSONParseError ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONReaderTests >> testMaps [ | reader | reader := [ :string | @@ -189,7 +190,7 @@ NeoJSONReaderTests >> testMaps [ self should: [ reader value: '{]' ] raise: NeoJSONParseError ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONReaderTests >> testNextStringAsHex [ | string | string := (NeoJSONReader on: '"466F6F2062617221"' readStream) @@ -202,7 +203,7 @@ NeoJSONReaderTests >> testNextStringAsHex [ self assert: string equals: 'Foo bar!' ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONReaderTests >> testNonBMPCharacterDecoding [ "Characters not in the Basic Multilingual Plane are encoded as a UTF-16 surrogate pair" @@ -215,14 +216,14 @@ NeoJSONReaderTests >> testNonBMPCharacterDecoding [ self should: [ NeoJSONReader fromString: '"\udbff\ue000"' ] raise: NeoJSONParseError ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONReaderTests >> testNull [ self assert: (NeoJSONReader on: 'null' readStream) next equals: nil. self assert: (NeoJSONReader on: ' null ' readStream) next equals: nil. self should: [ (NeoJSONReader on: ' nil ' readStream) next ] raise: NeoJSONParseError. ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONReaderTests >> testOrderedCollection [ | json list | json := '[ 1, 2, 3 ]'. @@ -237,7 +238,7 @@ NeoJSONReaderTests >> testOrderedCollection [ equals: OrderedCollection ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONReaderTests >> testOrderedCollectionOfPoints [ | reader | reader := [ :string | @@ -252,7 +253,7 @@ NeoJSONReaderTests >> testOrderedCollectionOfPoints [ self assert: (reader value: '[ { } ]') equals: (OrderedCollection with: Point new) ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONReaderTests >> testParseErrors [ self should: [ NeoJSONReader fromString: 'zero' ] raise: NeoJSONParseError. self should: [ NeoJSONReader fromString: '#' ] raise: NeoJSONParseError. @@ -263,7 +264,7 @@ NeoJSONReaderTests >> testParseErrors [ self should: [ (NeoJSONReader on: '[]"extra"' readStream) next; failIfNotAtEnd ] raise: NeoJSONParseError. ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONReaderTests >> testPoint [ | reader | reader := [ :string | @@ -271,7 +272,7 @@ NeoJSONReaderTests >> testPoint [ self should: [ reader value: '{"x":1,"y":2}' ] raise: NeoJSONMappingNotFound ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONReaderTests >> testPoint1 [ | reader | reader := [ :string | @@ -284,7 +285,7 @@ NeoJSONReaderTests >> testPoint1 [ self assert: (reader value: '{}') equals: Point new ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONReaderTests >> testPoint2 [ | reader | reader := [ :string | @@ -295,7 +296,7 @@ NeoJSONReaderTests >> testPoint2 [ self assert: (reader value: '{}') equals: Point new ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONReaderTests >> testPoint3 [ | reader | reader := [ :string | @@ -307,7 +308,7 @@ NeoJSONReaderTests >> testPoint3 [ self assert: (reader value: '{}') equals: Point new ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONReaderTests >> testPointUsingAsString [ | point | point := (NeoJSONReader on: '{"x":"1","y":"2"}' readStream) @@ -332,7 +333,7 @@ NeoJSONReaderTests >> testPointUsingAsString [ self assert: point equals: 1 @ 2 ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONReaderTests >> testPropertyNamesAsSymbols [ | json map | json := '{ "x" : true, "y" : false, "key-1" : 1 }'. @@ -345,7 +346,7 @@ NeoJSONReaderTests >> testPropertyNamesAsSymbols [ self assert: (map keys allSatisfy: [ :each | each isSymbol ]) ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONReaderTests >> testSmallDictionary [ | json map smallDictionaryClass | json := '{ "x" : true, "y" : false, "key-1" : 1 }'. @@ -361,7 +362,7 @@ NeoJSONReaderTests >> testSmallDictionary [ equals: smallDictionaryClass ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONReaderTests >> testStrings [ | reader | reader := [ :string | @@ -391,7 +392,7 @@ NeoJSONReaderTests >> testStrings [ ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONReaderTests >> testSymbol [ | reader | reader := [ :input | @@ -403,7 +404,7 @@ NeoJSONReaderTests >> testSymbol [ self assert: (reader value: ' "FOO-1" ') equals: #'FOO-1' ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONReaderTests >> testTime [ | reader | reader := [ :input | diff --git a/repository/Neo-JSON-Tests/NeoJSONTestObject1.class.st b/repository/Neo-JSON-Tests/NeoJSONTestObject1.class.st index 33c5716..dfd98dc 100644 --- a/repository/Neo-JSON-Tests/NeoJSONTestObject1.class.st +++ b/repository/Neo-JSON-Tests/NeoJSONTestObject1.class.st @@ -20,8 +20,8 @@ My JSON representation is like this: " Class { - #name : #NeoJSONTestObject1, - #superclass : #Object, + #name : 'NeoJSONTestObject1', + #superclass : 'Object', #instVars : [ 'id', 'name', @@ -29,10 +29,11 @@ Class { 'points', 'bytes' ], - #category : 'Neo-JSON-Tests' + #category : 'Neo-JSON-Tests', + #package : 'Neo-JSON-Tests' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } NeoJSONTestObject1 class >> example1 [ ^ self new id: 123; @@ -43,7 +44,7 @@ NeoJSONTestObject1 class >> example1 [ yourself ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONTestObject1 class >> neoJsonMapping: mapper [ mapper for: self do: [ :mapping | mapping mapInstVars: #(id name). @@ -60,7 +61,7 @@ NeoJSONTestObject1 class >> neoJsonMapping: mapper [ mapping listOfType: ByteArray ] ] -{ #category : #comparing } +{ #category : 'comparing' } NeoJSONTestObject1 >> = anObject [ self == anObject ifTrue: [ ^ true ]. @@ -76,57 +77,57 @@ NeoJSONTestObject1 >> = anObject [ and: [ bytes = anObject bytes ] ] ] ] ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONTestObject1 >> bytes [ ^ bytes ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONTestObject1 >> bytes: byteArray [ bytes := byteArray ] -{ #category : #comparing } +{ #category : 'comparing' } NeoJSONTestObject1 >> hash [ ^ id hash bitXor: (name hash bitXor: (timestamp hash bitXor: (points hash bitXor: bytes hash))) ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONTestObject1 >> id [ ^ id ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONTestObject1 >> id: integer [ id := integer ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONTestObject1 >> name [ ^ name ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONTestObject1 >> name: string [ name := string ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONTestObject1 >> points [ ^ points ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONTestObject1 >> points: arrayOfPoints [ points := arrayOfPoints ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONTestObject1 >> timestamp [ ^ timestamp ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONTestObject1 >> timestamp: dateAndTime [ timestamp := dateAndTime ] diff --git a/repository/Neo-JSON-Tests/NeoJSONTestObject2.class.st b/repository/Neo-JSON-Tests/NeoJSONTestObject2.class.st index 56da027..d52e774 100644 --- a/repository/Neo-JSON-Tests/NeoJSONTestObject2.class.st +++ b/repository/Neo-JSON-Tests/NeoJSONTestObject2.class.st @@ -10,39 +10,40 @@ Instance Variables Used for benchmarking and other tests. " Class { - #name : #NeoJSONTestObject2, - #superclass : #Object, + #name : 'NeoJSONTestObject2', + #superclass : 'Object', #instVars : [ 'id', 'width', 'height', 'data' ], - #category : 'Neo-JSON-Tests' + #category : 'Neo-JSON-Tests', + #package : 'Neo-JSON-Tests' } -{ #category : #testing } +{ #category : 'testing' } NeoJSONTestObject2 class >> benchmark10k [ "self benchmark10k" self benchmark: 10000 ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONTestObject2 class >> benchmark10kAsDictionary [ "self benchmark10kAsDictionary" self benchmarkAsDictionary: 10000 ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONTestObject2 class >> benchmark200k [ "self benchmark200k" self benchmark: 200000 ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONTestObject2 class >> benchmark: count [ "self benchmark: 1000" @@ -60,7 +61,7 @@ NeoJSONTestObject2 class >> benchmark: count [ show: [ NeoJSONReader fromString: json ] timeToRun. ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONTestObject2 class >> benchmarkAsDictionary: count [ "self benchmarkAsDictionary: 1000" @@ -78,7 +79,7 @@ NeoJSONTestObject2 class >> benchmarkAsDictionary: count [ show: [ NeoJSONReader fromString: json ] timeToRun. ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } NeoJSONTestObject2 class >> example1 [ ^ self new id: 13; @@ -88,7 +89,7 @@ NeoJSONTestObject2 class >> example1 [ yourself ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONTestObject2 class >> neoJsonMapping: mapper [ "For inheritance mapping to work, the schema/classname must be self, but the instance variables have to be enumerated manually per class" @@ -97,7 +98,7 @@ NeoJSONTestObject2 class >> neoJsonMapping: mapper [ mapping mapInstVars: #(id width height data) ] ] -{ #category : #comparing } +{ #category : 'comparing' } NeoJSONTestObject2 >> = anObject [ self == anObject ifTrue: [ ^ true ]. @@ -112,7 +113,7 @@ NeoJSONTestObject2 >> = anObject [ data = anObject data ] ] ] ] -{ #category : #converting } +{ #category : 'converting' } NeoJSONTestObject2 >> asDictionary [ ^ Dictionary new at: #id put: id; @@ -122,47 +123,47 @@ NeoJSONTestObject2 >> asDictionary [ yourself ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONTestObject2 >> data [ ^ data ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONTestObject2 >> data: anObject [ data := anObject ] -{ #category : #comparing } +{ #category : 'comparing' } NeoJSONTestObject2 >> hash [ ^ id hash bitXor: (width hash bitXor: (height hash bitXor: data hash)) ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONTestObject2 >> height [ ^ height ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONTestObject2 >> height: anObject [ height := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONTestObject2 >> id [ ^ id ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONTestObject2 >> id: anObject [ id := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONTestObject2 >> width [ ^ width ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONTestObject2 >> width: anObject [ width := anObject ] diff --git a/repository/Neo-JSON-Tests/NeoJSONTestObject3.class.st b/repository/Neo-JSON-Tests/NeoJSONTestObject3.class.st index 505714f..b48fa2e 100644 --- a/repository/Neo-JSON-Tests/NeoJSONTestObject3.class.st +++ b/repository/Neo-JSON-Tests/NeoJSONTestObject3.class.st @@ -9,16 +9,17 @@ I am used for inheritance testing. " Class { - #name : #NeoJSONTestObject3, - #superclass : #NeoJSONTestObject2, + #name : 'NeoJSONTestObject3', + #superclass : 'NeoJSONTestObject2', #instVars : [ 'color', 'transparent' ], - #category : 'Neo-JSON-Tests' + #category : 'Neo-JSON-Tests', + #package : 'Neo-JSON-Tests' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } NeoJSONTestObject3 class >> example1 [ ^ super example1 data: (String new: 8 withAll: $a); @@ -27,7 +28,7 @@ NeoJSONTestObject3 class >> example1 [ yourself ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONTestObject3 class >> neoJsonMapping: mapper [ "For inheritance mapping to work, the schema/classname must be self, but the instance variables have to be enumerated manually per class" @@ -37,14 +38,14 @@ NeoJSONTestObject3 class >> neoJsonMapping: mapper [ mapping mapInstVars: #(color transparent) ] ] -{ #category : #comparing } +{ #category : 'comparing' } NeoJSONTestObject3 >> = anObject [ ^ super = anObject and: [ color = anObject color and: [ transparent = anObject transparent ] ] ] -{ #category : #converting } +{ #category : 'converting' } NeoJSONTestObject3 >> asDictionary [ ^ super asDictionary at: #color put: color; @@ -52,22 +53,22 @@ NeoJSONTestObject3 >> asDictionary [ yourself ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONTestObject3 >> color [ ^ color ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONTestObject3 >> color: anObject [ color := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONTestObject3 >> transparent [ ^ transparent ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONTestObject3 >> transparent: anObject [ transparent := anObject ] diff --git a/repository/Neo-JSON-Tests/NeoJSONValidation.class.st b/repository/Neo-JSON-Tests/NeoJSONValidation.class.st index 385cf97..1d3a8c5 100644 --- a/repository/Neo-JSON-Tests/NeoJSONValidation.class.st +++ b/repository/Neo-JSON-Tests/NeoJSONValidation.class.st @@ -28,16 +28,17 @@ This can only be run with the correct setup (checkout/config). Logging goes to a file, neo-json-validation.log " Class { - #name : #NeoJSONValidation, - #superclass : #Object, + #name : 'NeoJSONValidation', + #superclass : 'Object', #instVars : [ 'gitDirectory', 'logStream' ], - #category : 'Neo-JSON-Tests' + #category : 'Neo-JSON-Tests', + #package : 'Neo-JSON-Tests' } -{ #category : #private } +{ #category : 'private' } NeoJSONValidation >> closeLog [ logStream ifNotNil: [ logStream close. @@ -47,7 +48,7 @@ NeoJSONValidation >> closeLog [ ifFalse: [ 'log file is empty' ] ] -{ #category : #private } +{ #category : 'private' } NeoJSONValidation >> ensureLog [ logStream ifNil: [ logStream := self logFile ensureDelete; writeStream. @@ -55,94 +56,94 @@ NeoJSONValidation >> ensureLog [ ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONValidation >> gitDirectory [ ^ gitDirectory ifNil: [ gitDirectory := FileLocator home / #Develop / #git ] ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONValidation >> gitDirectory: fileReference [ gitDirectory := fileReference ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONValidation >> jsonTestSuiteDirectory [ ^ self gitDirectory / #JSONTestSuite ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONValidation >> jsonTestSuiteTestParsingDirectory [ ^ self jsonTestSuiteDirectory / 'test_parsing' ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONValidation >> jsonTestSuiteTestParsingFailFiles [ ^ self jsonTestSuiteTestParsingDirectory childrenMatching: 'n_*.json' ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONValidation >> jsonTestSuiteTestParsingInfoFiles [ ^ self jsonTestSuiteTestParsingDirectory childrenMatching: 'i_*.json' ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONValidation >> jsonTestSuiteTestParsingPassFiles [ ^ self jsonTestSuiteTestParsingDirectory childrenMatching: 'y_*.json' ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONValidation >> jsonTestSuiteTestTransformDirectory [ ^ self jsonTestSuiteDirectory / 'test_transform' ] -{ #category : #private } +{ #category : 'private' } NeoJSONValidation >> log: message [ self ensureLog. logStream nextPutAll: message; lf; flush ] -{ #category : #private } +{ #category : 'private' } NeoJSONValidation >> logFile [ ^ 'neo-json-validation.log' asFileReference ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONValidation >> nativeJsonBenchmarkDataDirectory [ ^ self nativeJsonBenchmarkDirectory / #data ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONValidation >> nativeJsonBenchmarkDirectory [ ^ self gitDirectory / 'nativejson-benchmark' ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONValidation >> nativeJsonBenchmarkJsonCheckerDirectory [ ^ self nativeJsonBenchmarkDataDirectory / #jsonchecker ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONValidation >> nativeJsonBenchmarkJsonCheckerFailFiles [ ^ self nativeJsonBenchmarkJsonCheckerDirectory childrenMatching: 'fail*.json' ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONValidation >> nativeJsonBenchmarkJsonCheckerPassFiles [ ^ self nativeJsonBenchmarkJsonCheckerDirectory childrenMatching: 'pass*.json' ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONValidation >> nativeJsonBenchmarkRoundTripDirectory [ ^ self nativeJsonBenchmarkDataDirectory / #roundtrip ] -{ #category : #accessing } +{ #category : 'accessing' } NeoJSONValidation >> nativeJsonBenchmarkRoundTripFiles [ ^ self nativeJsonBenchmarkRoundTripDirectory children ] -{ #category : #running } +{ #category : 'running' } NeoJSONValidation >> runJsonTestSuiteTestParsingFailures [ ^ self validateFiles: self jsonTestSuiteTestParsingFailFiles @@ -155,7 +156,7 @@ NeoJSONValidation >> runJsonTestSuiteTestParsingFailures [ success ] ] -{ #category : #running } +{ #category : 'running' } NeoJSONValidation >> runJsonTestSuiteTestParsingInfo [ ^ self validateFiles: self jsonTestSuiteTestParsingInfoFiles @@ -168,7 +169,7 @@ NeoJSONValidation >> runJsonTestSuiteTestParsingInfo [ success ] ] -{ #category : #running } +{ #category : 'running' } NeoJSONValidation >> runJsonTestSuiteTestParsingPasses [ ^ self validateFiles: self jsonTestSuiteTestParsingPassFiles @@ -181,7 +182,7 @@ NeoJSONValidation >> runJsonTestSuiteTestParsingPasses [ success ] ] -{ #category : #running } +{ #category : 'running' } NeoJSONValidation >> runNativeJsonBenchmarkJsonCheckerFailures [ ^ self validateFiles: self nativeJsonBenchmarkJsonCheckerFailFiles @@ -194,7 +195,7 @@ NeoJSONValidation >> runNativeJsonBenchmarkJsonCheckerFailures [ success ] ] -{ #category : #running } +{ #category : 'running' } NeoJSONValidation >> runNativeJsonBenchmarkJsonCheckerPasses [ ^ self validateFiles: self nativeJsonBenchmarkJsonCheckerPassFiles @@ -207,7 +208,7 @@ NeoJSONValidation >> runNativeJsonBenchmarkJsonCheckerPasses [ success ] ] -{ #category : #running } +{ #category : 'running' } NeoJSONValidation >> runNativeJsonBenchmarkRoundTrip [ ^ self validateFiles: self nativeJsonBenchmarkRoundTripFiles @@ -218,7 +219,7 @@ NeoJSONValidation >> runNativeJsonBenchmarkRoundTrip [ json = file contents ] ] -{ #category : #private } +{ #category : 'private' } NeoJSONValidation >> validateFiles: files usingTest: block [ | total succeeded failed | total := succeeded := failed := 0. diff --git a/repository/Neo-JSON-Tests/NeoJSONWriteReadAsciiOnlyTests.class.st b/repository/Neo-JSON-Tests/NeoJSONWriteReadAsciiOnlyTests.class.st index 20a5172..a4e520c 100644 --- a/repository/Neo-JSON-Tests/NeoJSONWriteReadAsciiOnlyTests.class.st +++ b/repository/Neo-JSON-Tests/NeoJSONWriteReadAsciiOnlyTests.class.st @@ -2,12 +2,13 @@ I am NeoJSONWriteReadAsciiOnlyTests. " Class { - #name : #NeoJSONWriteReadAsciiOnlyTests, - #superclass : #NeoJSONWriteReadTests, - #category : 'Neo-JSON-Tests' + #name : 'NeoJSONWriteReadAsciiOnlyTests', + #superclass : 'NeoJSONWriteReadTests', + #category : 'Neo-JSON-Tests', + #package : 'Neo-JSON-Tests' } -{ #category : #private } +{ #category : 'private' } NeoJSONWriteReadAsciiOnlyTests >> writeRead: object [ | json | json := String streamContents: [ :stream | diff --git a/repository/Neo-JSON-Tests/NeoJSONWriteReadMockStreamTests.class.st b/repository/Neo-JSON-Tests/NeoJSONWriteReadMockStreamTests.class.st index 1c55194..70e4d12 100644 --- a/repository/Neo-JSON-Tests/NeoJSONWriteReadMockStreamTests.class.st +++ b/repository/Neo-JSON-Tests/NeoJSONWriteReadMockStreamTests.class.st @@ -2,12 +2,13 @@ I am NeoJSONWriteReadMockStreamTests. " Class { - #name : #NeoJSONWriteReadMockStreamTests, - #superclass : #NeoJSONWriteReadTests, - #category : 'Neo-JSON-Tests' + #name : 'NeoJSONWriteReadMockStreamTests', + #superclass : 'NeoJSONWriteReadTests', + #category : 'Neo-JSON-Tests', + #package : 'Neo-JSON-Tests' } -{ #category : #private } +{ #category : 'private' } NeoJSONWriteReadMockStreamTests >> writeRead: object [ | json | json := String streamContents: [ :stream | diff --git a/repository/Neo-JSON-Tests/NeoJSONWriteReadPrettyPrintedTests.class.st b/repository/Neo-JSON-Tests/NeoJSONWriteReadPrettyPrintedTests.class.st index 8aa0f7d..2a9098c 100644 --- a/repository/Neo-JSON-Tests/NeoJSONWriteReadPrettyPrintedTests.class.st +++ b/repository/Neo-JSON-Tests/NeoJSONWriteReadPrettyPrintedTests.class.st @@ -2,12 +2,13 @@ I am NeoJSONWriteReadPrettyPrintedTests. " Class { - #name : #NeoJSONWriteReadPrettyPrintedTests, - #superclass : #NeoJSONWriteReadTests, - #category : 'Neo-JSON-Tests' + #name : 'NeoJSONWriteReadPrettyPrintedTests', + #superclass : 'NeoJSONWriteReadTests', + #category : 'Neo-JSON-Tests', + #package : 'Neo-JSON-Tests' } -{ #category : #testing } +{ #category : 'testing' } NeoJSONWriteReadPrettyPrintedTests >> testDictionaryOfObject2 [ | data json reader | data := Dictionary new. @@ -23,7 +24,7 @@ NeoJSONWriteReadPrettyPrintedTests >> testDictionaryOfObject2 [ equals: data ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONWriteReadPrettyPrintedTests >> testObject1 [ | json | json := NeoJSONWriter toStringPretty: NeoJSONTestObject1 example1. @@ -32,7 +33,7 @@ NeoJSONWriteReadPrettyPrintedTests >> testObject1 [ equals: NeoJSONTestObject1 example1 ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONWriteReadPrettyPrintedTests >> testObject2 [ | json | json := NeoJSONWriter toStringPretty: NeoJSONTestObject2 example1. @@ -41,7 +42,7 @@ NeoJSONWriteReadPrettyPrintedTests >> testObject2 [ equals: NeoJSONTestObject2 example1 ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONWriteReadPrettyPrintedTests >> testObject3 [ | json | json := NeoJSONWriter toStringPretty: NeoJSONTestObject3 example1. @@ -50,7 +51,7 @@ NeoJSONWriteReadPrettyPrintedTests >> testObject3 [ equals: NeoJSONTestObject3 example1 ] -{ #category : #private } +{ #category : 'private' } NeoJSONWriteReadPrettyPrintedTests >> writeRead: object [ | json | json := String streamContents: [ :stream | diff --git a/repository/Neo-JSON-Tests/NeoJSONWriteReadTests.class.st b/repository/Neo-JSON-Tests/NeoJSONWriteReadTests.class.st index 16d515b..5d26ccb 100644 --- a/repository/Neo-JSON-Tests/NeoJSONWriteReadTests.class.st +++ b/repository/Neo-JSON-Tests/NeoJSONWriteReadTests.class.st @@ -2,12 +2,13 @@ I am NeoJSONWriteReadTests. " Class { - #name : #NeoJSONWriteReadTests, - #superclass : #TestCase, - #category : 'Neo-JSON-Tests' + #name : 'NeoJSONWriteReadTests', + #superclass : 'TestCase', + #category : 'Neo-JSON-Tests', + #package : 'Neo-JSON-Tests' } -{ #category : #testing } +{ #category : 'testing' } NeoJSONWriteReadTests >> testDictionaryOfObject2 [ | data json reader | data := Dictionary new. @@ -23,7 +24,7 @@ NeoJSONWriteReadTests >> testDictionaryOfObject2 [ equals: data ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONWriteReadTests >> testFloats [ | objects | objects := OrderedCollection new add: Float pi; add: 1.0; add: -1.0; add: 0.0; add: 1.5e6; add: -1.5e6; add: 1.5e-6; add: -1.5e-6; yourself. @@ -32,7 +33,7 @@ NeoJSONWriteReadTests >> testFloats [ do: [ :first :second | self assert: (first closeTo: second) ] ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONWriteReadTests >> testIntegers [ | objects | objects := Array with: 1 with: -1 with: 0 with: 123467890 with: -1234567890. @@ -41,7 +42,7 @@ NeoJSONWriteReadTests >> testIntegers [ equals: objects ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONWriteReadTests >> testLists [ | objects | objects := Array with: #(1 2 3) with: #() with: #( 'foo' 'bar'). @@ -50,7 +51,7 @@ NeoJSONWriteReadTests >> testLists [ equals: objects ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONWriteReadTests >> testMaps [ | objects | objects := Array @@ -62,7 +63,7 @@ NeoJSONWriteReadTests >> testMaps [ equals: objects ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONWriteReadTests >> testObject1 [ | json | json := NeoJSONWriter toString: NeoJSONTestObject1 example1. @@ -71,7 +72,7 @@ NeoJSONWriteReadTests >> testObject1 [ equals: NeoJSONTestObject1 example1 ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONWriteReadTests >> testObject2 [ | json | json := NeoJSONWriter toString: NeoJSONTestObject2 example1. @@ -80,7 +81,7 @@ NeoJSONWriteReadTests >> testObject2 [ equals: NeoJSONTestObject2 example1 ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONWriteReadTests >> testObject3 [ | json | json := NeoJSONWriter toString: NeoJSONTestObject3 example1. @@ -89,7 +90,7 @@ NeoJSONWriteReadTests >> testObject3 [ equals: NeoJSONTestObject3 example1 ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONWriteReadTests >> testSpecials [ | objects | objects := Array with: true with: false with: nil. @@ -98,7 +99,7 @@ NeoJSONWriteReadTests >> testSpecials [ equals: objects ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONWriteReadTests >> testStrings [ | objects | objects := OrderedCollection new @@ -112,7 +113,7 @@ NeoJSONWriteReadTests >> testStrings [ equals: objects ] -{ #category : #private } +{ #category : 'private' } NeoJSONWriteReadTests >> writeRead: object [ | json | json := String streamContents: [ :stream | diff --git a/repository/Neo-JSON-Tests/NeoJSONWriterTests.class.st b/repository/Neo-JSON-Tests/NeoJSONWriterTests.class.st index 94119e7..64fa0b0 100644 --- a/repository/Neo-JSON-Tests/NeoJSONWriterTests.class.st +++ b/repository/Neo-JSON-Tests/NeoJSONWriterTests.class.st @@ -2,12 +2,13 @@ I am NeoJSONWriterTests, a test suite for NeoJSONWriter. " Class { - #name : #NeoJSONWriterTests, - #superclass : #TestCase, - #category : 'Neo-JSON-Tests' + #name : 'NeoJSONWriterTests', + #superclass : 'TestCase', + #category : 'Neo-JSON-Tests', + #package : 'Neo-JSON-Tests' } -{ #category : #testing } +{ #category : 'testing' } NeoJSONWriterTests >> testAsciiOnlyStrings [ | writer | writer := [ :object | @@ -35,7 +36,7 @@ NeoJSONWriterTests >> testAsciiOnlyStrings [ ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONWriterTests >> testAssociation [ | writer | writer := [ :object | @@ -48,7 +49,7 @@ NeoJSONWriterTests >> testAssociation [ self assert: (writer value: Association new) equals: '{}' ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONWriterTests >> testBooleans [ | writer | writer := [ :object | @@ -58,7 +59,7 @@ NeoJSONWriterTests >> testBooleans [ self assert: (writer value: false) equals: 'false'. ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONWriterTests >> testByteArray [ | writer | writer := [ :object | @@ -69,7 +70,7 @@ NeoJSONWriterTests >> testByteArray [ ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONWriterTests >> testDate [ | writer | writer := [ :object | @@ -81,7 +82,7 @@ NeoJSONWriterTests >> testDate [ self assert: (writer value: (Date fromString: '2012-06-08')) equals: '"2012-06-08"' ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONWriterTests >> testDateAndTime [ | writer | writer := [ :object | @@ -95,7 +96,7 @@ NeoJSONWriterTests >> testDateAndTime [ equals: '"2012-02-14T16:40:18+01:00"' ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONWriterTests >> testFloatPrinter [ | writer | writer := [ :object | @@ -115,7 +116,7 @@ NeoJSONWriterTests >> testFloatPrinter [ self assert: (writer value: (1/3) asFloat) equals: '0.33333'. ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONWriterTests >> testFloats [ | writer | writer := [ :object | @@ -126,7 +127,7 @@ NeoJSONWriterTests >> testFloats [ self assert: (writer value: 0.0) equals: '0.0'. ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONWriterTests >> testIntegers [ | writer | writer := [ :object | @@ -137,7 +138,7 @@ NeoJSONWriterTests >> testIntegers [ self assert: (writer value: 0) equals: '0'. ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONWriterTests >> testLists [ | writer | writer := [ :object | @@ -148,7 +149,7 @@ NeoJSONWriterTests >> testLists [ ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONWriterTests >> testListsExtra [ | writer | writer := [ :object | @@ -161,7 +162,7 @@ NeoJSONWriterTests >> testListsExtra [ ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONWriterTests >> testMapKeysMustBeStrings [ self should: [ NeoJSONWriter toString: { 1->#a } asDictionary ] raise: Error. self should: [ NeoJSONWriter toString: { true->#a } asDictionary ] raise: Error. @@ -171,7 +172,7 @@ NeoJSONWriterTests >> testMapKeysMustBeStrings [ self should: [ NeoJSONWriter toString: { Float pi->#a } asDictionary ] raise: Error. ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONWriterTests >> testMaps [ | writer | writer := [ :object | @@ -183,7 +184,7 @@ NeoJSONWriterTests >> testMaps [ ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONWriterTests >> testMapsExtra [ | writer | writer := [ :object | @@ -200,7 +201,7 @@ NeoJSONWriterTests >> testMapsExtra [ ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONWriterTests >> testNextPutStringAsHex [ | output | output := String @@ -215,7 +216,7 @@ NeoJSONWriterTests >> testNextPutStringAsHex [ self assert: output equals: '"466F6F2062617221"' ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONWriterTests >> testNonBMPCharacterEncoding [ "Characters not in the Basic Multilingual Plane are encoded as a UTF-16 surrogate pair" @@ -226,7 +227,7 @@ NeoJSONWriterTests >> testNonBMPCharacterEncoding [ self assert: json equals: '"\uD834\uDD1E"' ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONWriterTests >> testNull [ | writer | writer := [ :object | @@ -235,7 +236,7 @@ NeoJSONWriterTests >> testNull [ self assert: (writer value: nil) equals: 'null' ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONWriterTests >> testPoint [ | writer | writer := [ :object | @@ -244,7 +245,7 @@ NeoJSONWriterTests >> testPoint [ self should: [ writer value: 1@2 ] raise: NeoJSONMappingNotFound ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONWriterTests >> testPoint1 [ | writer | writer := [ :object | @@ -258,7 +259,7 @@ NeoJSONWriterTests >> testPoint1 [ self assert: (writer value: Point new) equals: '{}' ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONWriterTests >> testPoint2 [ | writer | writer := [ :object | @@ -270,7 +271,7 @@ NeoJSONWriterTests >> testPoint2 [ self assert: (writer value: Point new) equals: '{}' ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONWriterTests >> testPoint3 [ | writer | writer := [ :object | @@ -283,7 +284,7 @@ NeoJSONWriterTests >> testPoint3 [ self assert: (writer value: Point new) equals: '{}' ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONWriterTests >> testPointUsingAsString [ | output | output := String @@ -310,7 +311,7 @@ NeoJSONWriterTests >> testPointUsingAsString [ self assert: output equals: '{"x":"1","y":"2"}' ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONWriterTests >> testPointWriteNil [ | writer | writer := [ :object | @@ -323,7 +324,7 @@ NeoJSONWriterTests >> testPointWriteNil [ self assert: (writer value: Point new) equals: '{"x":null,"y":null}' ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONWriterTests >> testPreservePropertyOrder [ | writer testObject | (testObject := NeoJSONTestObject2 new) @@ -352,7 +353,7 @@ NeoJSONWriterTests >> testPreservePropertyOrder [ ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONWriterTests >> testStrings [ | writer | writer := [ :object | @@ -378,7 +379,7 @@ NeoJSONWriterTests >> testStrings [ ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONWriterTests >> testSymbol [ | writer | writer := [ :object | @@ -389,7 +390,7 @@ NeoJSONWriterTests >> testSymbol [ ] -{ #category : #testing } +{ #category : 'testing' } NeoJSONWriterTests >> testTime [ | writer | writer := [ :object | diff --git a/repository/Neo-JSON-Tests/package.st b/repository/Neo-JSON-Tests/package.st index cac63e2..3e79cf3 100644 --- a/repository/Neo-JSON-Tests/package.st +++ b/repository/Neo-JSON-Tests/package.st @@ -1 +1 @@ -Package { #name : #'Neo-JSON-Tests' } +Package { #name : 'Neo-JSON-Tests' } From 1e3c4f8c7538306b28127946658cd791c24628ef Mon Sep 17 00:00:00 2001 From: Patrik Date: Tue, 30 Sep 2025 14:55:59 +0000 Subject: [PATCH 50/90] Converting tonel -> filetree format to be loadable by GS --- filetree/.filetree | 3 ++ filetree/BaselineOfNeoJSON.package/.filetree | 4 ++ .../BaselineOfNeoJSON.class/README.md | 2 + .../instance/baseline..st | 20 +++++++++ .../BaselineOfNeoJSON.class/properties.json | 14 ++++++ .../BaselineOfNeoJSON.package/properties.json | 2 + .../ConfigurationOfNeoJSON.package/.filetree | 4 ++ .../ConfigurationOfNeoJSON.class/README.md | 3 ++ .../class/DevelopmentSupport.st | 5 +++ .../class/baseConfigurationClassIfAbsent..st | 8 ++++ .../class/catalogContactInfo.st | 3 ++ .../class/catalogDescription.st | 3 ++ .../class/catalogKeywords.st | 3 ++ .../class/ensureMetacello.st | 4 ++ .../class/ensureMetacelloBaseConfiguration.st | 14 ++++++ .../class/isMetacelloConfig.st | 5 +++ .../class/load.st | 8 ++++ .../class/loadBleedingEdge.st | 8 ++++ .../class/loadDevelopment.st | 8 ++++ .../class/project.st | 4 ++ .../class/validate.st | 12 +++++ .../instance/baseline1..st | 13 ++++++ .../instance/baseline2..st | 20 +++++++++ .../instance/baseline3..st | 44 +++++++++++++++++++ .../instance/bleedingEdge..st | 3 ++ .../instance/development..st | 3 ++ .../instance/project.st | 11 +++++ .../instance/stable..st | 7 +++ .../instance/version1..st | 9 ++++ .../instance/version10..st | 9 ++++ .../instance/version11..st | 9 ++++ .../instance/version12..st | 9 ++++ .../instance/version13..st | 9 ++++ .../instance/version14..st | 9 ++++ .../instance/version15..st | 9 ++++ .../instance/version16..st | 9 ++++ .../instance/version17..st | 9 ++++ .../instance/version2..st | 9 ++++ .../instance/version3..st | 9 ++++ .../instance/version30..st | 7 +++ .../instance/version4..st | 9 ++++ .../instance/version5..st | 9 ++++ .../instance/version6..st | 9 ++++ .../instance/version7..st | 9 ++++ .../instance/version8..st | 9 ++++ .../instance/version9..st | 9 ++++ .../properties.json | 14 ++++++ .../properties.json | 2 + filetree/Neo-JSON-Core.package/.filetree | 4 ++ .../Boolean.extension/instance/neoJsonOn..st | 3 ++ .../Boolean.extension/properties.json | 2 + .../instance/neoJsonOn..st | 3 ++ .../Collection.extension/properties.json | 2 + .../instance/neoJsonOn..st | 3 ++ .../Dictionary.extension/properties.json | 2 + .../Integer.extension/instance/neoJsonOn..st | 3 ++ .../Integer.extension/properties.json | 2 + .../NeoJSONArray.class/README.md | 9 ++++ .../class/exampleNumbers.st | 19 ++++++++ .../NeoJSONArray.class/class/exampleSimple.st | 4 ++ .../NeoJSONArray.class/instance/at.add..st | 5 +++ .../NeoJSONArray.class/instance/atPath..st | 10 +++++ .../instance/atPath.add..st | 14 ++++++ .../instance/atPath.put..st | 13 ++++++ .../NeoJSONArray.class/instance/findPath..st | 12 +++++ .../NeoJSONArray.class/instance/findPaths..st | 13 ++++++ .../NeoJSONArray.class/instance/printOn..st | 10 +++++ .../NeoJSONArray.class/instance/removeKey..st | 5 +++ .../NeoJSONArray.class/properties.json | 14 ++++++ .../NeoJSONCustomMapping.class/README.md | 3 ++ .../instance/decoder..st | 8 ++++ .../instance/encoder..st | 8 ++++ .../instance/identifier.st | 3 ++ .../instance/listOfElementSchema..st | 15 +++++++ .../instance/listOfType..st | 15 +++++++ .../instance/listOfType.andElementSchema..st | 15 +++++++ .../instance/mapWithValueSchema..st | 16 +++++++ .../instance/readFrom..st | 5 +++ .../instance/reader..st | 7 +++ .../instance/schemaName..st | 3 ++ .../instance/writeObject.on..st | 5 +++ .../instance/writer..st | 7 +++ .../properties.json | 16 +++++++ .../NeoJSONFloatPrinter.class/README.md | 22 ++++++++++ .../class/lowPrecision.st | 7 +++ .../class/scientificOnly.st | 6 +++ .../instance/decimalPoint.st | 3 ++ .../instance/exponent.st | 3 ++ .../instance/infinite.st | 3 ++ .../instance/initialize.st | 7 +++ .../instance/lower..st | 3 ++ .../NeoJSONFloatPrinter.class/instance/nan.st | 3 ++ .../instance/precision..st | 4 ++ .../instance/print..st | 4 ++ .../instance/print.decimalOn..st | 7 +++ .../instance/print.fractionOn..st | 13 ++++++ .../instance/print.on..st | 12 +++++ .../instance/print.scientificOn..st | 9 ++++ .../instance/print.signOn..st | 4 ++ .../instance/print.specialOn..st | 12 +++++ .../instance/printFloat.on..st | 3 ++ .../instance/upper..st | 3 ++ .../NeoJSONFloatPrinter.class/properties.json | 17 +++++++ .../NeoJSONMapper.class/README.md | 28 ++++++++++++ .../instance/customMappingFor..st | 8 ++++ .../instance/for.customDo..st | 9 ++++ .../NeoJSONMapper.class/instance/for.do..st | 9 ++++ .../instance/mapAllInstVarsFor..st | 8 ++++ .../instance/mapInstVarsFor..st | 8 ++++ .../instance/mappingFor..st | 5 +++ .../instance/mappingFor.ifAbsent..st | 7 +++ .../NeoJSONMapper.class/instance/mappings.st | 4 ++ .../instance/objectMappingFor..st | 8 ++++ .../instance/resolveMappingFor..st | 5 +++ .../NeoJSONMapper.class/properties.json | 14 ++++++ .../NeoJSONMapping.class/README.md | 1 + .../instance/identifier.st | 3 ++ .../NeoJSONMapping.class/instance/printOn..st | 4 ++ .../instance/readFrom..st | 3 ++ .../instance/writeObject.on..st | 3 ++ .../NeoJSONMapping.class/properties.json | 14 ++++++ .../NeoJSONMappingNotFound.class/README.md | 3 ++ .../class/signalFor..st | 7 +++ .../class/signalFor.in..st | 8 ++++ .../instance/collection..st | 5 +++ .../instance/collection.st | 5 +++ .../instance/messageText.st | 5 +++ .../instance/object..st | 5 +++ .../instance/object.st | 5 +++ .../instance/standardMessageText.st | 7 +++ .../properties.json | 15 +++++++ .../NeoJSONObject.class/README.md | 39 ++++++++++++++++ .../class/exampleCoordinates.st | 6 +++ .../class/exampleCoordinatesParsing.st | 7 +++ .../class/exampleCoordinatesWriting.st | 4 ++ .../class/exampleMagnitudeClassHierarchy.st | 17 +++++++ .../class/exampleNested.st | 4 ++ .../class/exampleNestedRoundtrip.st | 8 ++++ .../class/exampleSimple.st | 6 +++ .../class/exampleSimpleJSON.st | 4 ++ .../class/exampleSimpleParsing.st | 7 +++ .../class/exampleSimpleUsage.st | 10 +++++ .../class/exampleSimpleWriting.st | 7 +++ .../NeoJSONObject.class/class/fromStream..st | 9 ++++ .../NeoJSONObject.class/class/fromString..st | 5 +++ .../NeoJSONObject.class/class/readFrom..st | 5 +++ .../NeoJSONObject.class/instance/at..st | 6 +++ .../NeoJSONObject.class/instance/at.add..st | 3 ++ .../NeoJSONObject.class/instance/at.at..st | 6 +++ .../instance/at.at.put..st | 5 +++ .../instance/at.ifPresent.ifAbsentPut..st | 13 ++++++ .../NeoJSONObject.class/instance/atPath..st | 10 +++++ .../instance/atPath.add..st | 14 ++++++ .../instance/atPath.put..st | 13 ++++++ .../instance/doesNotUnderstand..st | 12 +++++ .../NeoJSONObject.class/instance/findPath..st | 12 +++++ .../instance/findPaths..st | 13 ++++++ .../NeoJSONObject.class/instance/name.st | 5 +++ .../NeoJSONObject.class/instance/printOn..st | 10 +++++ .../instance/removeAtPath..st | 11 +++++ .../NeoJSONObject.class/instance/value.st | 5 +++ .../NeoJSONObject.class/properties.json | 14 ++++++ .../NeoJSONObjectMapping.class/README.md | 10 +++++ .../instance/allowNil.st | 5 +++ .../instance/identifier.st | 3 ++ .../instance/initialize.st | 5 +++ .../instance/mapAccessor..st | 3 ++ .../instance/mapAccessor.mutator.to..st | 6 +++ .../instance/mapAccessor.to..st | 6 +++ .../instance/mapAccessors..st | 3 ++ .../instance/mapAllInstVars.st | 3 ++ .../instance/mapInstVar..st | 3 ++ .../instance/mapInstVar.to..st | 15 +++++++ .../instance/mapInstVars..st | 3 ++ .../instance/mapInstVars.st | 3 ++ .../instance/mapProperty.getter.setter..st | 11 +++++ .../instance/propertyNamed.ifAbsent..st | 5 +++ .../instance/readFrom..st | 15 +++++++ .../instance/subjectClass..st | 3 ++ .../instance/writeObject.on..st | 5 +++ .../properties.json | 16 +++++++ .../NeoJSONParseError.class/README.md | 4 ++ .../NeoJSONParseError.class/properties.json | 14 ++++++ .../NeoJSONPropertyMapping.class/README.md | 7 +++ .../instance/getter..st | 3 ++ .../instance/printOn..st | 4 ++ .../instance/propertyName..st | 3 ++ .../instance/propertyName.st | 3 ++ .../instance/readObject.from..st | 5 +++ .../instance/setter..st | 3 ++ .../instance/valueSchema..st | 3 ++ .../instance/writeObject.on..st | 6 +++ .../properties.json | 17 +++++++ .../NeoJSONReader.class/README.md | 29 ++++++++++++ .../class/exampleCoordinatesCustomParsing.st | 9 ++++ .../class/exampleCoordinatesGenericParsing.st | 4 ++ .../class/exampleCoordinatesJSON.st | 4 ++ .../NeoJSONReader.class/class/fromString..st | 3 ++ .../class/fromString.as..st | 3 ++ .../NeoJSONReader.class/class/on..st | 8 ++++ .../NeoJSONReader.class/instance/atEnd.st | 3 ++ .../NeoJSONReader.class/instance/close.st | 5 +++ .../instance/consumeWhitespace.st | 7 +++ .../NeoJSONReader.class/instance/error..st | 3 ++ .../instance/expectChar..st | 7 +++ .../instance/failIfNotAtEnd.st | 4 ++ .../instance/initialize.st | 4 ++ .../instance/listClass..st | 3 ++ .../NeoJSONReader.class/instance/listClass.st | 5 +++ .../NeoJSONReader.class/instance/mapClass..st | 3 ++ .../NeoJSONReader.class/instance/mapClass.st | 5 +++ .../NeoJSONReader.class/instance/match.do..st | 9 ++++ .../instance/matchChar..st | 11 +++++ .../NeoJSONReader.class/instance/next.st | 8 ++++ .../NeoJSONReader.class/instance/nextAs..st | 11 +++++ .../instance/nextListAs..st | 8 ++++ .../NeoJSONReader.class/instance/on..st | 6 +++ .../instance/parseCharacter.st | 14 ++++++ .../instance/parseCharacterHex.st | 16 +++++++ .../instance/parseCharacterHex4Value.st | 7 +++ .../instance/parseCharacterHexDigit.st | 13 ++++++ .../instance/parseConstantDo..st | 15 +++++++ .../NeoJSONReader.class/instance/parseList.st | 8 ++++ .../instance/parseListDo..st | 13 ++++++ .../instance/parseListElementsDo..st | 4 ++ .../NeoJSONReader.class/instance/parseMap.st | 7 +++ .../instance/parseMapDo..st | 12 +++++ .../instance/parseMapKeysAndValuesDo..st | 4 ++ .../instance/parseMapKeysDo..st | 6 +++ .../instance/parseNumber.st | 15 +++++++ .../instance/parseNumberExponent.st | 16 +++++++ .../instance/parseNumberFraction.st | 10 +++++ .../instance/parseNumberInteger.st | 9 ++++ .../instance/parsePropertyName.st | 11 +++++ .../instance/parseString.st | 10 +++++ .../parseTrailingSurrogateHexEscape.st | 5 +++ .../instance/parseValue.st | 15 +++++++ .../instance/propertyNamesAsSymbols..st | 3 ++ .../instance/stringStreamClass.st | 8 ++++ .../instance/stringStreamContents..st | 10 +++++ .../instance/unescapeChar..st | 15 +++++++ .../NeoJSONReader.class/instance/upToEnd.st | 8 ++++ .../NeoJSONReader.class/properties.json | 18 ++++++++ .../NeoJSONStreamingWriter.class/README.md | 4 ++ .../NeoJSONStreamingWriter.class/class/on..st | 5 +++ .../instance/initialize.st | 4 ++ .../instance/on..st | 3 ++ .../instance/wasUsed.st | 3 ++ .../instance/writeElement..st | 9 ++++ .../instance/writeElement.as..st | 9 ++++ .../instance/writeKey.value..st | 9 ++++ .../instance/writeKey.value.as..st | 9 ++++ .../instance/writeNil.st | 3 ++ .../properties.json | 15 +++++++ .../NeoJSONWriter.class/README.md | 22 ++++++++++ .../class/exampleCoordinates.st | 4 ++ .../class/exampleCoordinatesCustomWriting.st | 8 ++++ .../class/exampleCoordinatesGeneric.st | 4 ++ .../class/exampleCoordinatesGenericWriting.st | 4 ++ .../NeoJSONWriter.class/class/on..st | 8 ++++ .../NeoJSONWriter.class/class/toString..st | 4 ++ .../class/toStringPretty..st | 6 +++ .../instance/asciiOnly..st | 5 +++ .../NeoJSONWriter.class/instance/close.st | 7 +++ .../instance/doesCodePointNeedEscaping..st | 5 +++ .../instance/encodeChar..st | 7 +++ .../instance/encodeKey..st | 7 +++ .../instance/encodeKey.value..st | 4 ++ .../instance/encodeKey.value.as..st | 4 ++ .../instance/escapeChar..st | 19 ++++++++ .../instance/escapeUnicode..st | 15 +++++++ .../instance/escapeUnicode4..st | 4 ++ .../instance/floatPrinter..st | 6 +++ .../instance/indentedDo..st | 5 +++ .../instance/initialize.st | 9 ++++ .../instance/listElementSeparator.st | 4 ++ .../instance/mapElementSeparator.st | 4 ++ .../NeoJSONWriter.class/instance/newLine..st | 5 +++ .../NeoJSONWriter.class/instance/newline.st | 6 +++ .../instance/newlineIndent.st | 6 +++ .../NeoJSONWriter.class/instance/nextPut..st | 5 +++ .../instance/nextPut.as..st | 9 ++++ .../instance/nextPutAll..st | 9 ++++ .../NeoJSONWriter.class/instance/on..st | 6 +++ .../instance/prettyPrint..st | 5 +++ .../instance/prettyPrintSpace.st | 4 ++ .../instance/printFloat.on..st | 5 +++ .../instance/writeBoolean..st | 3 ++ .../instance/writeFloat..st | 3 ++ .../instance/writeInteger..st | 4 ++ .../instance/writeList..st | 5 +++ .../instance/writeListStreamingDo..st | 5 +++ .../NeoJSONWriter.class/instance/writeMap..st | 5 +++ .../instance/writeMapStreamingDo..st | 5 +++ .../NeoJSONWriter.class/instance/writeNil..st | 5 +++ .../NeoJSONWriter.class/instance/writeNil.st | 5 +++ .../NeoJSONWriter.class/instance/writeNull.st | 3 ++ .../instance/writeObject..st | 7 +++ .../instance/writeStreamingDo..st | 9 ++++ .../instance/writeString..st | 6 +++ .../NeoJSONWriter.class/properties.json | 20 +++++++++ .../Number.extension/instance/neoJsonOn..st | 3 ++ .../Number.extension/properties.json | 2 + .../Object.extension/instance/neoJsonOn..st | 3 ++ .../Object.extension/properties.json | 2 + .../String.extension/instance/neoJsonOn..st | 3 ++ .../String.extension/properties.json | 2 + .../instance/neoJsonOn..st | 3 ++ .../UndefinedObject.extension/properties.json | 2 + .../Neo-JSON-Core.package/properties.json | 2 + .../Neo-JSON-Pharo-Core.package/.filetree | 4 ++ .../instance/neoJsonOn..st | 3 ++ .../properties.json | 2 + .../instance/neoJsonOn..st | 3 ++ .../SmallDictionary.extension/properties.json | 2 + .../properties.json | 2 + .../Neo-JSON-Pharo-Examples.package/.filetree | 4 ++ .../Attachment.class/README.md | 0 .../Attachment.class/instance/fileName..st | 3 ++ .../Attachment.class/instance/url..st | 3 ++ .../Attachment.class/properties.json | 15 +++++++ .../BittrexResponse.class/README.md | 0 .../BittrexResponse.class/properties.json | 16 +++++++ .../Market.class/README.md | 0 .../Market.class/properties.json | 24 ++++++++++ .../NeoJSONPharoExamples.class/README.md | 0 .../testAccessingTheNewYorkPublicLibrary.st | 13 ++++++ .../instance/testAttachmentsExample.st | 31 +++++++++++++ .../testBittrexLitecoinAsDictionary.st | 10 +++++ .../testBittrexLitecoinAsDomainObjects.st | 16 +++++++ .../instance/testDoomtownDBCards.st | 4 ++ .../instance/testFeed.st | 12 +++++ .../instance/testGetWorldCapitals.st | 4 ++ .../instance/testGoogleMapsAPI.st | 7 +++ .../instance/testParsingUserAgentStrings.st | 9 ++++ .../instance/testStackOverflowInfo.st | 6 +++ .../properties.json | 14 ++++++ .../properties.json | 2 + .../Neo-JSON-Pharo-Tests.package/.filetree | 4 ++ .../properties.json | 2 + filetree/Neo-JSON-Tests.package/.filetree | 4 ++ .../NeoJSONBenchmark.class/README.md | 19 ++++++++ .../instance/initialize.st | 16 +++++++ .../NeoJSONBenchmark.class/instance/read.st | 3 ++ .../NeoJSONBenchmark.class/instance/write.st | 4 ++ .../instance/writePrettyPrintedRead.st | 9 ++++ .../NeoJSONBenchmark.class/properties.json | 15 +++++++ .../NeoJSONBenchmarkTests.class/README.md | 3 ++ .../instance/testObject2.st | 7 +++ .../instance/testPrettyPrinted.st | 7 +++ .../instance/testRead.st | 5 +++ .../instance/testWrite.st | 5 +++ .../properties.json | 14 ++++++ .../NeoJSONExamplesTests.class/README.md | 1 + .../instance/testMultiInstances.st | 17 +++++++ .../instance/testPoints.st | 33 ++++++++++++++ .../instance/testRectanglePoints.st | 29 ++++++++++++ .../instance/testRectanglePointsWithNils.st | 23 ++++++++++ .../properties.json | 14 ++++++ .../NeoJSONFloatPrinterTests.class/README.md | 1 + .../instance/setUp.st | 4 ++ .../instance/testDecimalNotation.st | 14 ++++++ .../instance/testInteger.st | 8 ++++ .../instance/testLowPrecision.st | 12 +++++ .../instance/testScientificNotation.st | 6 +++ .../instance/testScientificOnly.st | 11 +++++ .../instance/testSpecialValues.st | 6 +++ .../instance/testWellKnownConstants.st | 16 +++++++ .../properties.json | 14 ++++++ .../NeoJSONMappingTests.class/README.md | 1 + .../instance/testDynamicTyping.st | 25 +++++++++++ .../testSymbolOrStringInstVarMapping.st | 20 +++++++++ .../instance/testVirtualTransferObject.st | 27 ++++++++++++ .../NeoJSONMappingTests.class/properties.json | 14 ++++++ .../NeoJSONMockStream.class/README.md | 2 + .../NeoJSONMockStream.class/class/on..st | 5 +++ .../NeoJSONMockStream.class/instance/atEnd.st | 3 ++ .../NeoJSONMockStream.class/instance/close.st | 3 ++ .../instance/collectionSpecies.st | 3 ++ .../NeoJSONMockStream.class/instance/next.st | 3 ++ .../instance/nextPut..st | 3 ++ .../instance/nextPutAll..st | 3 ++ .../NeoJSONMockStream.class/instance/peek.st | 3 ++ .../instance/peekFor..st | 3 ++ .../NeoJSONMockStream.class/instance/space.st | 3 ++ .../instance/stream..st | 3 ++ .../NeoJSONMockStream.class/properties.json | 14 ++++++ .../NeoJSONObjectTests.class/README.md | 1 + .../instance/exampleJSONSchema.st | 15 +++++++ .../instance/testArray.st | 13 ++++++ .../instance/testAtAt.st | 13 ++++++ .../instance/testAtPath.st | 17 +++++++ .../instance/testAtPathPut.st | 20 +++++++++ .../instance/testCRUD.st | 18 ++++++++ .../instance/testFindPath.st | 22 ++++++++++ .../instance/testFindPaths.st | 22 ++++++++++ .../instance/testJSON.st | 10 +++++ .../instance/testPathAccess.st | 20 +++++++++ .../NeoJSONObjectTests.class/properties.json | 14 ++++++ .../NeoJSONReaderTests.class/README.md | 1 + .../instance/testAllowNil.st | 21 +++++++++ .../instance/testArrayOfPoints.st | 13 ++++++ .../testArrayOfPointsUsingNextListAs.st | 10 +++++ .../instance/testAssociation.st | 10 +++++ .../instance/testBooleans.st | 6 +++ .../instance/testByteArray.st | 10 +++++ .../instance/testDate.st | 9 ++++ .../instance/testDateAndTime.st | 11 +++++ .../instance/testFloats.st | 23 ++++++++++ .../instance/testIntegers.st | 15 +++++++ .../instance/testLists.st | 13 ++++++ .../instance/testMaps.st | 15 +++++++ .../instance/testNextStringAsHex.st | 11 +++++ .../instance/testNonBMPCharacterDecoding.st | 11 +++++ .../instance/testNull.st | 5 +++ .../instance/testOrderedCollection.st | 13 ++++++ .../instance/testOrderedCollectionOfPoints.st | 13 ++++++ .../instance/testParseErrors.st | 9 ++++ .../instance/testPoint.st | 6 +++ .../instance/testPoint1.st | 11 +++++ .../instance/testPoint2.st | 9 ++++ .../instance/testPoint3.st | 10 +++++ .../instance/testPointUsingAsString.st | 23 ++++++++++ .../instance/testPropertyNamesAsSymbols.st | 11 +++++ .../instance/testSmallDictionary.st | 14 ++++++ .../instance/testStrings.st | 27 ++++++++++++ .../instance/testSymbol.st | 10 +++++ .../instance/testTime.st | 9 ++++ .../NeoJSONReaderTests.class/properties.json | 14 ++++++ .../NeoJSONTestObject1.class/README.md | 18 ++++++++ .../class/example1.st | 9 ++++ .../class/neoJsonMapping..st | 15 +++++++ .../instance/^equals.st | 14 ++++++ .../instance/bytes..st | 3 ++ .../instance/bytes.st | 3 ++ .../NeoJSONTestObject1.class/instance/hash.st | 3 ++ .../NeoJSONTestObject1.class/instance/id..st | 3 ++ .../NeoJSONTestObject1.class/instance/id.st | 3 ++ .../instance/name..st | 3 ++ .../NeoJSONTestObject1.class/instance/name.st | 3 ++ .../instance/points..st | 3 ++ .../instance/points.st | 3 ++ .../instance/timestamp..st | 3 ++ .../instance/timestamp.st | 3 ++ .../NeoJSONTestObject1.class/properties.json | 18 ++++++++ .../NeoJSONTestObject2.class/README.md | 9 ++++ .../class/benchmark..st | 16 +++++++ .../class/benchmark10k.st | 5 +++ .../class/benchmark10kAsDictionary.st | 5 +++ .../class/benchmark200k.st | 5 +++ .../class/benchmarkAsDictionary..st | 16 +++++++ .../class/example1.st | 8 ++++ .../class/neoJsonMapping..st | 7 +++ .../instance/^equals.st | 13 ++++++ .../instance/asDictionary.st | 8 ++++ .../instance/data..st | 3 ++ .../NeoJSONTestObject2.class/instance/data.st | 3 ++ .../NeoJSONTestObject2.class/instance/hash.st | 3 ++ .../instance/height..st | 3 ++ .../instance/height.st | 3 ++ .../NeoJSONTestObject2.class/instance/id..st | 3 ++ .../NeoJSONTestObject2.class/instance/id.st | 3 ++ .../instance/width..st | 3 ++ .../instance/width.st | 3 ++ .../NeoJSONTestObject2.class/properties.json | 17 +++++++ .../NeoJSONTestObject3.class/README.md | 7 +++ .../class/example1.st | 7 +++ .../class/neoJsonMapping..st | 8 ++++ .../instance/^equals.st | 5 +++ .../instance/asDictionary.st | 6 +++ .../instance/color..st | 3 ++ .../instance/color.st | 3 ++ .../instance/transparent..st | 3 ++ .../instance/transparent.st | 3 ++ .../NeoJSONTestObject3.class/properties.json | 15 +++++++ .../NeoJSONValidation.class/README.md | 27 ++++++++++++ .../instance/closeLog.st | 8 ++++ .../instance/ensureLog.st | 6 +++ .../instance/gitDirectory..st | 3 ++ .../instance/gitDirectory.st | 3 ++ .../instance/jsonTestSuiteDirectory.st | 3 ++ .../jsonTestSuiteTestParsingDirectory.st | 3 ++ .../jsonTestSuiteTestParsingFailFiles.st | 3 ++ .../jsonTestSuiteTestParsingInfoFiles.st | 3 ++ .../jsonTestSuiteTestParsingPassFiles.st | 3 ++ .../jsonTestSuiteTestTransformDirectory.st | 3 ++ .../NeoJSONValidation.class/instance/log..st | 4 ++ .../instance/logFile.st | 3 ++ .../nativeJsonBenchmarkDataDirectory.st | 3 ++ .../instance/nativeJsonBenchmarkDirectory.st | 3 ++ ...nativeJsonBenchmarkJsonCheckerDirectory.st | 3 ++ ...nativeJsonBenchmarkJsonCheckerFailFiles.st | 3 ++ ...nativeJsonBenchmarkJsonCheckerPassFiles.st | 3 ++ .../nativeJsonBenchmarkRoundTripDirectory.st | 3 ++ .../nativeJsonBenchmarkRoundTripFiles.st | 3 ++ .../runJsonTestSuiteTestParsingFailures.st | 11 +++++ .../runJsonTestSuiteTestParsingInfo.st | 11 +++++ .../runJsonTestSuiteTestParsingPasses.st | 11 +++++ ...nNativeJsonBenchmarkJsonCheckerFailures.st | 11 +++++ ...runNativeJsonBenchmarkJsonCheckerPasses.st | 11 +++++ .../runNativeJsonBenchmarkRoundTrip.st | 9 ++++ .../instance/validateFiles.usingTest..st | 18 ++++++++ .../NeoJSONValidation.class/properties.json | 15 +++++++ .../README.md | 1 + .../instance/writeRead..st | 6 +++ .../properties.json | 14 ++++++ .../README.md | 1 + .../instance/writeRead..st | 8 ++++ .../properties.json | 14 ++++++ .../README.md | 1 + .../instance/testDictionaryOfObject2.st | 14 ++++++ .../instance/testObject1.st | 7 +++ .../instance/testObject2.st | 7 +++ .../instance/testObject3.st | 7 +++ .../instance/writeRead..st | 8 ++++ .../properties.json | 14 ++++++ .../NeoJSONWriteReadTests.class/README.md | 1 + .../instance/testDictionaryOfObject2.st | 14 ++++++ .../instance/testFloats.st | 7 +++ .../instance/testIntegers.st | 7 +++ .../instance/testLists.st | 7 +++ .../instance/testMaps.st | 10 +++++ .../instance/testObject1.st | 7 +++ .../instance/testObject2.st | 7 +++ .../instance/testObject3.st | 7 +++ .../instance/testSpecials.st | 7 +++ .../instance/testStrings.st | 12 +++++ .../instance/writeRead..st | 6 +++ .../properties.json | 14 ++++++ .../NeoJSONWriterTests.class/README.md | 1 + .../instance/testAsciiOnlyStrings.st | 25 +++++++++++ .../instance/testAssociation.st | 11 +++++ .../instance/testBooleans.st | 8 ++++ .../instance/testByteArray.st | 8 ++++ .../instance/testDate.st | 10 +++++ .../instance/testDateAndTime.st | 12 +++++ .../instance/testFloatPrinter.st | 18 ++++++++ .../instance/testFloats.st | 9 ++++ .../instance/testIntegers.st | 9 ++++ .../instance/testLists.st | 8 ++++ .../instance/testListsExtra.st | 10 +++++ .../instance/testMapKeysMustBeStrings.st | 8 ++++ .../instance/testMaps.st | 9 ++++ .../instance/testMapsExtra.st | 14 ++++++ .../instance/testNextPutStringAsHex.st | 13 ++++++ .../instance/testNonBMPCharacterEncoding.st | 9 ++++ .../instance/testNull.st | 7 +++ .../instance/testPoint.st | 7 +++ .../instance/testPoint1.st | 12 +++++ .../instance/testPoint2.st | 10 +++++ .../instance/testPoint3.st | 11 +++++ .../instance/testPointUsingAsString.st | 25 +++++++++++ .../instance/testPointWriteNil.st | 11 +++++ .../instance/testPreservePropertyOrder.st | 26 +++++++++++ .../instance/testStrings.st | 23 ++++++++++ .../instance/testSymbol.st | 8 ++++ .../instance/testTime.st | 10 +++++ .../NeoJSONWriterTests.class/properties.json | 14 ++++++ .../Neo-JSON-Tests.package/properties.json | 2 + filetree/properties.st | 4 ++ repository/.properties | 3 +- t2f2t/components/Core.ston | 8 ++++ t2f2t/filetree.ston | 11 +++++ t2f2t/projects/README.md | 0 t2f2t/specs/filetree.ston | 10 +++++ t2f2t/specs/tonel.ston | 10 +++++ t2f2t/tonel.ston | 11 +++++ 567 files changed, 4693 insertions(+), 1 deletion(-) create mode 100644 filetree/.filetree create mode 100644 filetree/BaselineOfNeoJSON.package/.filetree create mode 100644 filetree/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/README.md create mode 100644 filetree/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/instance/baseline..st create mode 100644 filetree/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/properties.json create mode 100644 filetree/BaselineOfNeoJSON.package/properties.json create mode 100644 filetree/ConfigurationOfNeoJSON.package/.filetree create mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/README.md create mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/DevelopmentSupport.st create mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/baseConfigurationClassIfAbsent..st create mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogContactInfo.st create mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogDescription.st create mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogKeywords.st create mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/ensureMetacello.st create mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/ensureMetacelloBaseConfiguration.st create mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/isMetacelloConfig.st create mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/load.st create mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/loadBleedingEdge.st create mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/loadDevelopment.st create mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/project.st create mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/validate.st create mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline1..st create mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline2..st create mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline3..st create mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/bleedingEdge..st create mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/development..st create mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/project.st create mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/stable..st create mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version1..st create mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version10..st create mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version11..st create mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version12..st create mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version13..st create mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version14..st create mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version15..st create mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version16..st create mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version17..st create mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version2..st create mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version3..st create mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version30..st create mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version4..st create mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version5..st create mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version6..st create mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version7..st create mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version8..st create mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version9..st create mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/properties.json create mode 100644 filetree/ConfigurationOfNeoJSON.package/properties.json create mode 100644 filetree/Neo-JSON-Core.package/.filetree create mode 100644 filetree/Neo-JSON-Core.package/Boolean.extension/instance/neoJsonOn..st create mode 100644 filetree/Neo-JSON-Core.package/Boolean.extension/properties.json create mode 100644 filetree/Neo-JSON-Core.package/Collection.extension/instance/neoJsonOn..st create mode 100644 filetree/Neo-JSON-Core.package/Collection.extension/properties.json create mode 100644 filetree/Neo-JSON-Core.package/Dictionary.extension/instance/neoJsonOn..st create mode 100644 filetree/Neo-JSON-Core.package/Dictionary.extension/properties.json create mode 100644 filetree/Neo-JSON-Core.package/Integer.extension/instance/neoJsonOn..st create mode 100644 filetree/Neo-JSON-Core.package/Integer.extension/properties.json create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONArray.class/README.md create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONArray.class/class/exampleNumbers.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONArray.class/class/exampleSimple.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/at.add..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/atPath..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/atPath.add..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/atPath.put..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/findPath..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/findPaths..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/printOn..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/removeKey..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONArray.class/properties.json create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/README.md create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/decoder..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/encoder..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/identifier.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfElementSchema..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfType..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfType.andElementSchema..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/mapWithValueSchema..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/readFrom..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/reader..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/schemaName..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/writeObject.on..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/writer..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/properties.json create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/README.md create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/class/lowPrecision.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/class/scientificOnly.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/decimalPoint.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/exponent.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/infinite.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/initialize.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/lower..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/nan.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/precision..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/print..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/print.decimalOn..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/print.fractionOn..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/print.on..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/print.scientificOn..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/print.signOn..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/print.specialOn..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/printFloat.on..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/upper..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/properties.json create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONMapper.class/README.md create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONMapper.class/instance/customMappingFor..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONMapper.class/instance/for.customDo..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONMapper.class/instance/for.do..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONMapper.class/instance/mapAllInstVarsFor..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONMapper.class/instance/mapInstVarsFor..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONMapper.class/instance/mappingFor..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONMapper.class/instance/mappingFor.ifAbsent..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONMapper.class/instance/mappings.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONMapper.class/instance/objectMappingFor..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONMapper.class/instance/resolveMappingFor..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONMapper.class/properties.json create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONMapping.class/README.md create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONMapping.class/instance/identifier.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONMapping.class/instance/printOn..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONMapping.class/instance/readFrom..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONMapping.class/instance/writeObject.on..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONMapping.class/properties.json create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/README.md create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/class/signalFor..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/class/signalFor.in..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/collection..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/collection.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/messageText.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/object..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/object.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/standardMessageText.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/properties.json create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObject.class/README.md create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleCoordinates.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleCoordinatesParsing.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleCoordinatesWriting.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleMagnitudeClassHierarchy.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleNested.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleNestedRoundtrip.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleSimple.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleSimpleJSON.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleSimpleParsing.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleSimpleUsage.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleSimpleWriting.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/fromStream..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/fromString..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/readFrom..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/at..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/at.add..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/at.at..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/at.at.put..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/at.ifPresent.ifAbsentPut..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/atPath..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/atPath.add..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/atPath.put..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/doesNotUnderstand..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/findPath..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/findPaths..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/name.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/printOn..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/removeAtPath..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/value.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObject.class/properties.json create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/README.md create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/allowNil.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/identifier.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/initialize.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAccessor..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAccessor.mutator.to..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAccessor.to..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAccessors..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAllInstVars.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVar..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVar.to..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVars..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVars.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapProperty.getter.setter..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/propertyNamed.ifAbsent..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/readFrom..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/subjectClass..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/writeObject.on..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/properties.json create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONParseError.class/README.md create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONParseError.class/properties.json create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/README.md create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/getter..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/printOn..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/propertyName..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/propertyName.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/readObject.from..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/setter..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/valueSchema..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/writeObject.on..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/properties.json create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/README.md create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/class/exampleCoordinatesCustomParsing.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/class/exampleCoordinatesGenericParsing.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/class/exampleCoordinatesJSON.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/class/fromString..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/class/fromString.as..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/class/on..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/atEnd.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/close.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/consumeWhitespace.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/error..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/expectChar..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/failIfNotAtEnd.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/initialize.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/listClass..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/listClass.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/mapClass..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/mapClass.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/match.do..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/matchChar..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/next.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/nextAs..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/nextListAs..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/on..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacter.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacterHex.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacterHex4Value.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacterHexDigit.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseConstantDo..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseList.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseListDo..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseListElementsDo..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseMap.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseMapDo..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseMapKeysAndValuesDo..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseMapKeysDo..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseNumber.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseNumberExponent.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseNumberFraction.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseNumberInteger.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parsePropertyName.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseString.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseTrailingSurrogateHexEscape.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseValue.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/propertyNamesAsSymbols..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/stringStreamClass.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/stringStreamContents..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/unescapeChar..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/upToEnd.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONReader.class/properties.json create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/README.md create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/class/on..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/initialize.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/on..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/wasUsed.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeElement..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeElement.as..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeKey.value..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeKey.value.as..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeNil.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/properties.json create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/README.md create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/class/exampleCoordinates.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/class/exampleCoordinatesCustomWriting.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/class/exampleCoordinatesGeneric.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/class/exampleCoordinatesGenericWriting.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/class/on..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/class/toString..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/class/toStringPretty..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/asciiOnly..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/close.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/doesCodePointNeedEscaping..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/encodeChar..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/encodeKey..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/encodeKey.value..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/encodeKey.value.as..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/escapeChar..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/escapeUnicode..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/escapeUnicode4..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/floatPrinter..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/indentedDo..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/initialize.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/listElementSeparator.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/mapElementSeparator.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/newLine..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/newline.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/newlineIndent.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/nextPut..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/nextPut.as..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/nextPutAll..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/on..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/prettyPrint..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/prettyPrintSpace.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/printFloat.on..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeBoolean..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeFloat..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeInteger..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeList..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeListStreamingDo..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeMap..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeMapStreamingDo..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeNil..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeNil.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeNull.st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeObject..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeStreamingDo..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeString..st create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONWriter.class/properties.json create mode 100644 filetree/Neo-JSON-Core.package/Number.extension/instance/neoJsonOn..st create mode 100644 filetree/Neo-JSON-Core.package/Number.extension/properties.json create mode 100644 filetree/Neo-JSON-Core.package/Object.extension/instance/neoJsonOn..st create mode 100644 filetree/Neo-JSON-Core.package/Object.extension/properties.json create mode 100644 filetree/Neo-JSON-Core.package/String.extension/instance/neoJsonOn..st create mode 100644 filetree/Neo-JSON-Core.package/String.extension/properties.json create mode 100644 filetree/Neo-JSON-Core.package/UndefinedObject.extension/instance/neoJsonOn..st create mode 100644 filetree/Neo-JSON-Core.package/UndefinedObject.extension/properties.json create mode 100644 filetree/Neo-JSON-Core.package/properties.json create mode 100644 filetree/Neo-JSON-Pharo-Core.package/.filetree create mode 100644 filetree/Neo-JSON-Pharo-Core.package/OrderedDictionary.extension/instance/neoJsonOn..st create mode 100644 filetree/Neo-JSON-Pharo-Core.package/OrderedDictionary.extension/properties.json create mode 100644 filetree/Neo-JSON-Pharo-Core.package/SmallDictionary.extension/instance/neoJsonOn..st create mode 100644 filetree/Neo-JSON-Pharo-Core.package/SmallDictionary.extension/properties.json create mode 100644 filetree/Neo-JSON-Pharo-Core.package/properties.json create mode 100644 filetree/Neo-JSON-Pharo-Examples.package/.filetree create mode 100644 filetree/Neo-JSON-Pharo-Examples.package/Attachment.class/README.md create mode 100644 filetree/Neo-JSON-Pharo-Examples.package/Attachment.class/instance/fileName..st create mode 100644 filetree/Neo-JSON-Pharo-Examples.package/Attachment.class/instance/url..st create mode 100644 filetree/Neo-JSON-Pharo-Examples.package/Attachment.class/properties.json create mode 100644 filetree/Neo-JSON-Pharo-Examples.package/BittrexResponse.class/README.md create mode 100644 filetree/Neo-JSON-Pharo-Examples.package/BittrexResponse.class/properties.json create mode 100644 filetree/Neo-JSON-Pharo-Examples.package/Market.class/README.md create mode 100644 filetree/Neo-JSON-Pharo-Examples.package/Market.class/properties.json create mode 100644 filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/README.md create mode 100644 filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testAccessingTheNewYorkPublicLibrary.st create mode 100644 filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testAttachmentsExample.st create mode 100644 filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testBittrexLitecoinAsDictionary.st create mode 100644 filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testBittrexLitecoinAsDomainObjects.st create mode 100644 filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testDoomtownDBCards.st create mode 100644 filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testFeed.st create mode 100644 filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testGetWorldCapitals.st create mode 100644 filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testGoogleMapsAPI.st create mode 100644 filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testParsingUserAgentStrings.st create mode 100644 filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testStackOverflowInfo.st create mode 100644 filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/properties.json create mode 100644 filetree/Neo-JSON-Pharo-Examples.package/properties.json create mode 100644 filetree/Neo-JSON-Pharo-Tests.package/.filetree create mode 100644 filetree/Neo-JSON-Pharo-Tests.package/properties.json create mode 100644 filetree/Neo-JSON-Tests.package/.filetree create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONBenchmark.class/README.md create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONBenchmark.class/instance/initialize.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONBenchmark.class/instance/read.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONBenchmark.class/instance/write.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONBenchmark.class/instance/writePrettyPrintedRead.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONBenchmark.class/properties.json create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/README.md create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/instance/testObject2.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/instance/testPrettyPrinted.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/instance/testRead.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/instance/testWrite.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/properties.json create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/README.md create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testMultiInstances.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testPoints.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testRectanglePoints.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testRectanglePointsWithNils.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/properties.json create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONFloatPrinterTests.class/README.md create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONFloatPrinterTests.class/instance/setUp.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONFloatPrinterTests.class/instance/testDecimalNotation.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONFloatPrinterTests.class/instance/testInteger.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONFloatPrinterTests.class/instance/testLowPrecision.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONFloatPrinterTests.class/instance/testScientificNotation.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONFloatPrinterTests.class/instance/testScientificOnly.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONFloatPrinterTests.class/instance/testSpecialValues.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONFloatPrinterTests.class/instance/testWellKnownConstants.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONFloatPrinterTests.class/properties.json create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONMappingTests.class/README.md create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONMappingTests.class/instance/testDynamicTyping.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONMappingTests.class/instance/testSymbolOrStringInstVarMapping.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONMappingTests.class/instance/testVirtualTransferObject.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONMappingTests.class/properties.json create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/README.md create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/class/on..st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/atEnd.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/close.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/collectionSpecies.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/next.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/nextPut..st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/nextPutAll..st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/peek.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/peekFor..st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/space.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/stream..st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/properties.json create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/README.md create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/exampleJSONSchema.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testArray.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testAtAt.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testAtPath.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testAtPathPut.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testCRUD.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testFindPath.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testFindPaths.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testJSON.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testPathAccess.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/properties.json create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/README.md create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testAllowNil.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testArrayOfPoints.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testArrayOfPointsUsingNextListAs.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testAssociation.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testBooleans.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testByteArray.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testDate.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testDateAndTime.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testFloats.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testIntegers.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testLists.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testMaps.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testNextStringAsHex.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testNonBMPCharacterDecoding.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testNull.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testOrderedCollection.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testOrderedCollectionOfPoints.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testParseErrors.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPoint.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPoint1.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPoint2.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPoint3.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPointUsingAsString.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPropertyNamesAsSymbols.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testSmallDictionary.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testStrings.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testSymbol.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testTime.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/properties.json create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/README.md create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/class/example1.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/class/neoJsonMapping..st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/^equals.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/bytes..st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/bytes.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/hash.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/id..st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/id.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/name..st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/name.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/points..st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/points.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/timestamp..st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/timestamp.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/properties.json create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/README.md create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmark..st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmark10k.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmark10kAsDictionary.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmark200k.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmarkAsDictionary..st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/example1.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/neoJsonMapping..st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/^equals.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/asDictionary.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/data..st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/data.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/hash.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/height..st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/height.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/id..st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/id.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/width..st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/width.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/properties.json create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject3.class/README.md create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject3.class/class/example1.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject3.class/class/neoJsonMapping..st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/^equals.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/asDictionary.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/color..st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/color.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/transparent..st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/transparent.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONTestObject3.class/properties.json create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/README.md create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/closeLog.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/ensureLog.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/gitDirectory..st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/gitDirectory.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteDirectory.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingDirectory.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingFailFiles.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingInfoFiles.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingPassFiles.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestTransformDirectory.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/log..st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/logFile.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkDataDirectory.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkDirectory.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkJsonCheckerDirectory.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkJsonCheckerFailFiles.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkJsonCheckerPassFiles.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkRoundTripDirectory.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkRoundTripFiles.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runJsonTestSuiteTestParsingFailures.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runJsonTestSuiteTestParsingInfo.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runJsonTestSuiteTestParsingPasses.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runNativeJsonBenchmarkJsonCheckerFailures.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runNativeJsonBenchmarkJsonCheckerPasses.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runNativeJsonBenchmarkRoundTrip.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/validateFiles.usingTest..st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/properties.json create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/README.md create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/instance/writeRead..st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/properties.json create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriteReadMockStreamTests.class/README.md create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriteReadMockStreamTests.class/instance/writeRead..st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriteReadMockStreamTests.class/properties.json create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/README.md create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/testDictionaryOfObject2.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/testObject1.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/testObject2.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/testObject3.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/writeRead..st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/properties.json create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/README.md create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testDictionaryOfObject2.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testFloats.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testIntegers.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testLists.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testMaps.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testObject1.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testObject2.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testObject3.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testSpecials.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testStrings.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/writeRead..st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/properties.json create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/README.md create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testAsciiOnlyStrings.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testAssociation.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testBooleans.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testByteArray.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testDate.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testDateAndTime.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testFloatPrinter.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testFloats.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testIntegers.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testLists.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testListsExtra.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testMapKeysMustBeStrings.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testMaps.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testMapsExtra.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testNextPutStringAsHex.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testNonBMPCharacterEncoding.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testNull.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPoint.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPoint1.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPoint2.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPoint3.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPointUsingAsString.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPointWriteNil.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPreservePropertyOrder.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testStrings.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testSymbol.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testTime.st create mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/properties.json create mode 100644 filetree/Neo-JSON-Tests.package/properties.json create mode 100644 filetree/properties.st create mode 100644 t2f2t/components/Core.ston create mode 100644 t2f2t/filetree.ston create mode 100644 t2f2t/projects/README.md create mode 100644 t2f2t/specs/filetree.ston create mode 100644 t2f2t/specs/tonel.ston create mode 100644 t2f2t/tonel.ston diff --git a/filetree/.filetree b/filetree/.filetree new file mode 100644 index 0000000..6535e4d --- /dev/null +++ b/filetree/.filetree @@ -0,0 +1,3 @@ +{ + "packageExtension" : ".package", + "Metadata" : "false" } diff --git a/filetree/BaselineOfNeoJSON.package/.filetree b/filetree/BaselineOfNeoJSON.package/.filetree new file mode 100644 index 0000000..8998102 --- /dev/null +++ b/filetree/BaselineOfNeoJSON.package/.filetree @@ -0,0 +1,4 @@ +{ + "noMethodMetaData" : true, + "separateMethodMetaAndSource" : false, + "useCypressPropertiesFile" : true } diff --git a/filetree/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/README.md b/filetree/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/README.md new file mode 100644 index 0000000..628fec7 --- /dev/null +++ b/filetree/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/README.md @@ -0,0 +1,2 @@ +I am BaselineOfNeoJSON, I load the code for the NeoJSON project. +I am a BaselineOf. \ No newline at end of file diff --git a/filetree/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/instance/baseline..st b/filetree/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/instance/baseline..st new file mode 100644 index 0000000..8cc90a8 --- /dev/null +++ b/filetree/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/instance/baseline..st @@ -0,0 +1,20 @@ +baselines +baseline: spec + + spec + for: #common + do: [ spec + package: 'Neo-JSON-Core'; + package: 'Neo-JSON-Tests' with: [ spec requires: #('Neo-JSON-Core') ]; + group: 'default' with: #('core' 'tests'); + group: 'Core' with: #('Neo-JSON-Core'); + group: 'Tests' with: #('Neo-JSON-Tests') ]. + spec + for: #pharo + do: [ spec + package: 'Neo-JSON-Pharo-Core' with: [ spec requires: #('Neo-JSON-Core') ]; + package: 'Neo-JSON-Pharo-Tests' with: [ spec requires: #('Neo-JSON-Tests') ]; + package: 'Neo-JSON-Pharo-Examples' with: [ spec requires: #('Neo-JSON-Core') ]; + group: 'Core' with: #('Neo-JSON-Core' 'Neo-JSON-Pharo-Core'); + group: 'Tests' with: #('Neo-JSON-Tests' 'Neo-JSON-Pharo-Tests'); + group: 'examples' with: #('Neo-JSON-Pharo-Examples') ]. \ No newline at end of file diff --git a/filetree/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/properties.json b/filetree/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/properties.json new file mode 100644 index 0000000..d5f0fa2 --- /dev/null +++ b/filetree/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "BaselineOfNeoJSON", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + ], + "name" : "BaselineOfNeoJSON", + "pools" : [ + ], + "super" : "BaselineOf", + "type" : "normal" } diff --git a/filetree/BaselineOfNeoJSON.package/properties.json b/filetree/BaselineOfNeoJSON.package/properties.json new file mode 100644 index 0000000..a097c63 --- /dev/null +++ b/filetree/BaselineOfNeoJSON.package/properties.json @@ -0,0 +1,2 @@ +{ + } \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/.filetree b/filetree/ConfigurationOfNeoJSON.package/.filetree new file mode 100644 index 0000000..8998102 --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/.filetree @@ -0,0 +1,4 @@ +{ + "noMethodMetaData" : true, + "separateMethodMetaAndSource" : false, + "useCypressPropertiesFile" : true } diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/README.md b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/README.md new file mode 100644 index 0000000..a4abe8c --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/README.md @@ -0,0 +1,3 @@ +I am ConfigurationOfNeoJSON, a Metacello configuration for NeoJSON. + +NeoJSON is a flexible and efficient reader and writer for JSON. \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/DevelopmentSupport.st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/DevelopmentSupport.st new file mode 100644 index 0000000..f188387 --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/DevelopmentSupport.st @@ -0,0 +1,5 @@ +development support +DevelopmentSupport + +"See the methods in the 'development support' category on the class-side of MetacelloBaseConfiguration. Decide what development support methods you would like to use and copy them the the class-side of your configuration." + diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/baseConfigurationClassIfAbsent..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/baseConfigurationClassIfAbsent..st new file mode 100644 index 0000000..e906812 --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/baseConfigurationClassIfAbsent..st @@ -0,0 +1,8 @@ +private +baseConfigurationClassIfAbsent: aBlock + + ^Smalltalk + at: #MetacelloBaseConfiguration + ifAbsent: [ + self ensureMetacelloBaseConfiguration. + Smalltalk at: #MetacelloBaseConfiguration ifAbsent: aBlock ]. diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogContactInfo.st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogContactInfo.st new file mode 100644 index 0000000..ab72693 --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogContactInfo.st @@ -0,0 +1,3 @@ +accessing +catalogContactInfo + ^ 'Written and maintained by Sven Van Caekenberghe (http://stfx.eu) and the community. Discussions on the Pharo mailing lists.' \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogDescription.st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogDescription.st new file mode 100644 index 0000000..19d3548 --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogDescription.st @@ -0,0 +1,3 @@ +accessing +catalogDescription + ^ 'JSON (JavaScript Object Notation) is a popular data-interchange format. NeoJSON is an elegant and efficient standalone Smalltalk framework to read and write JSON converting to or from Smalltalk objects.' \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogKeywords.st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogKeywords.st new file mode 100644 index 0000000..6b63bcb --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogKeywords.st @@ -0,0 +1,3 @@ +accessing +catalogKeywords + ^ #(format input output json serialization encoding text javascript) \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/ensureMetacello.st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/ensureMetacello.st new file mode 100644 index 0000000..869b381 --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/ensureMetacello.st @@ -0,0 +1,4 @@ +private +ensureMetacello + + (self baseConfigurationClassIfAbsent: []) ensureMetacello \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/ensureMetacelloBaseConfiguration.st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/ensureMetacelloBaseConfiguration.st new file mode 100644 index 0000000..7605398 --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/ensureMetacelloBaseConfiguration.st @@ -0,0 +1,14 @@ +private +ensureMetacelloBaseConfiguration + + Smalltalk + at: #MetacelloBaseConfiguration + ifAbsent: [ + | repository version | + repository := MCHttpRepository location: 'http://seaside.gemstone.com/ss/metacello' user: '' password: ''. + repository + versionReaderForFileNamed: 'Metacello-Base-DaleHenrichs.2.mcz' + do: [ :reader | + version := reader version. + version load. + version workingCopy repositoryGroup addRepository: repository ] ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/isMetacelloConfig.st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/isMetacelloConfig.st new file mode 100644 index 0000000..98d81c7 --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/isMetacelloConfig.st @@ -0,0 +1,5 @@ +metacello tool support +isMetacelloConfig + "Answer true and the Metacello tools will operate on you" + + ^true \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/load.st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/load.st new file mode 100644 index 0000000..cfb70d4 --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/load.st @@ -0,0 +1,8 @@ +loading +load + "Load the #stable version defined for this platform. The #stable version is the version that is recommended to be used on this platform." + + "self load" + + + ^(self project version: #stable) load \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/loadBleedingEdge.st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/loadBleedingEdge.st new file mode 100644 index 0000000..e780e1d --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/loadBleedingEdge.st @@ -0,0 +1,8 @@ +loading +loadBleedingEdge + "Load the latest versions of the mcz files defined for this project. It is not likely that the #bleedingEdge has been tested." + + "self loadBleedingEdge" + + + ^(self project version: #bleedingEdge) load \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/loadDevelopment.st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/loadDevelopment.st new file mode 100644 index 0000000..2ccd72a --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/loadDevelopment.st @@ -0,0 +1,8 @@ +loading +loadDevelopment + "Load the #development version defined for this platform. The #development version will change over time and is not expected to be stable." + + "self loadDevelopment" + + + ^(self project version: #development) load \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/project.st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/project.st new file mode 100644 index 0000000..925935b --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/project.st @@ -0,0 +1,4 @@ +accessing +project + + ^self new project \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/validate.st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/validate.st new file mode 100644 index 0000000..589fc0b --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/validate.st @@ -0,0 +1,12 @@ +development support +validate + "Check the configuration for Errors, Critical Warnings, and Warnings (see class comment for MetacelloMCVersionValidator for more information). + Errors identify specification issues that will result in unexpected behaviour when you load the configuration. + Critical Warnings identify specification issues that may result in unexpected behavior when you load the configuration. + Warnings identify specification issues that are technically correct, but are worth take a look at." + + "self validate" + + + self ensureMetacello. + ^ ((Smalltalk at: #MetacelloToolBox) validateConfiguration: self debug: #() recurse: false) explore \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline1..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline1..st new file mode 100644 index 0000000..85f7a25 --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline1..st @@ -0,0 +1,13 @@ +baselines +baseline1: spec + + + spec for: #common do: [ + spec + blessing: #baseline; + repository: 'http://mc.stfx.eu/Neo'; + package: 'Neo-JSON-Core'; + package: 'Neo-JSON-Tests' with: [ spec requires: 'Neo-JSON-Core' ]; + group: 'default' with: #('Neo-JSON-Core' 'Neo-JSON-Tests'); + group: 'Core' with: #('Neo-JSON-Core'); + group: 'Tests' with: #('Neo-JSON-Tests') ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline2..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline2..st new file mode 100644 index 0000000..b553d76 --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline2..st @@ -0,0 +1,20 @@ +baselines +baseline2: spec + + spec + for: #common + do: [ + spec + blessing: #baseline; + repository: 'http://mc.stfx.eu/Neo'; + package: 'Neo-JSON-Core'; + package: 'Neo-JSON-Tests' with: [ spec requires: 'Neo-JSON-Core' ]; + group: 'default' with: #('Neo-JSON-Core' 'Neo-JSON-Tests'); + group: 'Core' with: #('Neo-JSON-Core'); + group: 'Tests' with: #('Neo-JSON-Tests') ]. + spec + for: #gemstone + do: [ + spec + baseline: 'NeoJSON' with: [ spec repository: 'github://GsDevKit/NeoJSON:master/repository' ]; + import: 'NeoJSON' ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline3..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline3..st new file mode 100644 index 0000000..0ccdffd --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline3..st @@ -0,0 +1,44 @@ +baselines +baseline3: spec + + spec + for: #common + do: [ + spec + blessing: #baseline; + repository: 'http://mc.stfx.eu/Neo'; + package: 'Neo-JSON-Core'; + package: 'Neo-JSON-Tests' with: [ spec requires: 'Neo-JSON-Core' ]; + group: 'default' with: #('Core' 'Tests'); + group: 'Core' with: #('Neo-JSON-Core'); + group: 'Tests' with: #('Neo-JSON-Tests') ]. + + + spec + for: #pharo + do: [ + + spec + package: 'Neo-JSON-Pharo-Examples' with: [ spec requires: 'Neo-JSON-Core' ]; + group: 'Examples' with: #('Neo-JSON-Pharo-Examples'). + + "So far, it only contains Pharo-Specific extensions" + spec + package: 'Neo-JSON-Pharo-Core' with: [ spec requires: #( 'Neo-JSON-Core') ]; + package: 'Neo-JSON-Pharo-Tests' with: [ spec requires: #( 'Neo-JSON-Tests') ]; + group: 'Core' with: #('Neo-JSON-Core' 'Neo-JSON-Pharo-Core'). + + "CoreVASTExport group is used when we are exporting code to be later imported in VAST/ENVY via Monticello Importer. 'Neo-JSON-VASTMock' should not be imported in ENVY....its goal is that in 'Neo-JSON-VAST-Core' we can define extension methods to classes defined in VAST but not existing in Pharo. So in 'Neo-JSON-VASTMock' we simply create dummy classes with the sole purpose of being able to define extension methods for it. " + spec + package: 'Neo-JSON-VASTMock'; + package: 'Neo-JSON-VAST-Core' with: [ spec requires: #('Neo-JSON-VASTMock' 'Neo-JSON-Core') ]; + package: 'Neo-JSON-VAST-Tests' with: [ spec requires: #( 'Neo-JSON-Tests') ]; + group: 'CoreVASTExport' with: #('Neo-JSON-Core' 'Neo-JSON-VAST-Core' 'Tests' 'Neo-JSON-VAST-Tests' ). + ]. + + spec + for: #gemstone + do: [ + spec + baseline: 'NeoJSON' with: [ spec repository: 'github://GsDevKit/NeoJSON:master/repository' ]; + import: 'NeoJSON' ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/bleedingEdge..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/bleedingEdge..st new file mode 100644 index 0000000..a61a59c --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/bleedingEdge..st @@ -0,0 +1,3 @@ +symbolic versions +bleedingEdge: spec + \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/development..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/development..st new file mode 100644 index 0000000..0e26382 --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/development..st @@ -0,0 +1,3 @@ +symbolic versions +development: spec + \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/project.st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/project.st new file mode 100644 index 0000000..43dcd87 --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/project.st @@ -0,0 +1,11 @@ +accessing +project + + ^ project ifNil: [ | constructor | + "Bootstrap Metacello if it is not already loaded" + (self class baseConfigurationClassIfAbsent: []) ensureMetacello. + "Construct Metacello project" + constructor := (Smalltalk at: #MetacelloVersionConstructor) on: self. + project := constructor project. + project loadType: #linear. "change to #atomic if desired" + project ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/stable..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/stable..st new file mode 100644 index 0000000..75b8772 --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/stable..st @@ -0,0 +1,7 @@ +symbolic versions +stable: spec + + + spec for: #common version: '17'. + + spec for: #gemstone version: '13'. \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version1..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version1..st new file mode 100644 index 0000000..efbc61f --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version1..st @@ -0,0 +1,9 @@ +versions +version1: spec + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.17'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.15' ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version10..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version10..st new file mode 100644 index 0000000..01fc11d --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version10..st @@ -0,0 +1,9 @@ +versions +version10: spec + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.29'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.26' ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version11..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version11..st new file mode 100644 index 0000000..029a804 --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version11..st @@ -0,0 +1,9 @@ +versions +version11: spec + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.30'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.30' ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version12..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version12..st new file mode 100644 index 0000000..5d52f09 --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version12..st @@ -0,0 +1,9 @@ +versions +version12: spec + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.31'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.31' ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version13..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version13..st new file mode 100644 index 0000000..83dc556 --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version13..st @@ -0,0 +1,9 @@ +versions +version13: spec + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.33'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.33' ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version14..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version14..st new file mode 100644 index 0000000..ab5ba02 --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version14..st @@ -0,0 +1,9 @@ +versions +version14: spec + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.37'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.35' ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version15..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version15..st new file mode 100644 index 0000000..1b2daac --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version15..st @@ -0,0 +1,9 @@ +versions +version15: spec + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.37'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.36' ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version16..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version16..st new file mode 100644 index 0000000..2da79b3 --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version16..st @@ -0,0 +1,9 @@ +versions +version16: spec + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.42'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.39' ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version17..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version17..st new file mode 100644 index 0000000..aae7af6 --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version17..st @@ -0,0 +1,9 @@ +versions +version17: spec + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.46'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.44' ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version2..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version2..st new file mode 100644 index 0000000..4b57665 --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version2..st @@ -0,0 +1,9 @@ +versions +version2: spec + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.19'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.16' ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version3..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version3..st new file mode 100644 index 0000000..7731134 --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version3..st @@ -0,0 +1,9 @@ +versions +version3: spec + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.20'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.16' ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version30..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version30..st new file mode 100644 index 0000000..a33fb3b --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version30..st @@ -0,0 +1,7 @@ +versions +version30: spec + + + spec for: #common do: [ + spec + blessing: #development ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version4..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version4..st new file mode 100644 index 0000000..f356d39 --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version4..st @@ -0,0 +1,9 @@ +versions +version4: spec + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.23'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.18' ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version5..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version5..st new file mode 100644 index 0000000..ce3a48c --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version5..st @@ -0,0 +1,9 @@ +versions +version5: spec + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.24'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.19' ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version6..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version6..st new file mode 100644 index 0000000..47d529b --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version6..st @@ -0,0 +1,9 @@ +versions +version6: spec + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.24'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.20' ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version7..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version7..st new file mode 100644 index 0000000..dc49603 --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version7..st @@ -0,0 +1,9 @@ +versions +version7: spec + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.24'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.21' ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version8..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version8..st new file mode 100644 index 0000000..e827cd3 --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version8..st @@ -0,0 +1,9 @@ +versions +version8: spec + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.24'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.22' ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version9..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version9..st new file mode 100644 index 0000000..94a6e04 --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version9..st @@ -0,0 +1,9 @@ +versions +version9: spec + + + spec for: #common do: [ + spec + blessing: #release; + package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.27'; + package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.24' ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/properties.json b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/properties.json new file mode 100644 index 0000000..3556e1f --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "ConfigurationOfNeoJSON", + "classinstvars" : [ + ], + "classvars" : [ + "LastVersionLoad" ], + "commentStamp" : "", + "instvars" : [ + "project" ], + "name" : "ConfigurationOfNeoJSON", + "pools" : [ + ], + "super" : "Object", + "type" : "normal" } diff --git a/filetree/ConfigurationOfNeoJSON.package/properties.json b/filetree/ConfigurationOfNeoJSON.package/properties.json new file mode 100644 index 0000000..a097c63 --- /dev/null +++ b/filetree/ConfigurationOfNeoJSON.package/properties.json @@ -0,0 +1,2 @@ +{ + } \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/.filetree b/filetree/Neo-JSON-Core.package/.filetree new file mode 100644 index 0000000..8998102 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/.filetree @@ -0,0 +1,4 @@ +{ + "noMethodMetaData" : true, + "separateMethodMetaAndSource" : false, + "useCypressPropertiesFile" : true } diff --git a/filetree/Neo-JSON-Core.package/Boolean.extension/instance/neoJsonOn..st b/filetree/Neo-JSON-Core.package/Boolean.extension/instance/neoJsonOn..st new file mode 100644 index 0000000..1cc3c40 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/Boolean.extension/instance/neoJsonOn..st @@ -0,0 +1,3 @@ +*neo-json-core +neoJsonOn: neoJSONWriter + neoJSONWriter writeBoolean: self \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/Boolean.extension/properties.json b/filetree/Neo-JSON-Core.package/Boolean.extension/properties.json new file mode 100644 index 0000000..c15542b --- /dev/null +++ b/filetree/Neo-JSON-Core.package/Boolean.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "Boolean" } diff --git a/filetree/Neo-JSON-Core.package/Collection.extension/instance/neoJsonOn..st b/filetree/Neo-JSON-Core.package/Collection.extension/instance/neoJsonOn..st new file mode 100644 index 0000000..eaddd30 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/Collection.extension/instance/neoJsonOn..st @@ -0,0 +1,3 @@ +*neo-json-core +neoJsonOn: neoJSONWriter + neoJSONWriter writeList: self \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/Collection.extension/properties.json b/filetree/Neo-JSON-Core.package/Collection.extension/properties.json new file mode 100644 index 0000000..93b0dc3 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/Collection.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "Collection" } diff --git a/filetree/Neo-JSON-Core.package/Dictionary.extension/instance/neoJsonOn..st b/filetree/Neo-JSON-Core.package/Dictionary.extension/instance/neoJsonOn..st new file mode 100644 index 0000000..174eb53 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/Dictionary.extension/instance/neoJsonOn..st @@ -0,0 +1,3 @@ +*neo-json-core +neoJsonOn: neoJSONWriter + neoJSONWriter writeMap: self \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/Dictionary.extension/properties.json b/filetree/Neo-JSON-Core.package/Dictionary.extension/properties.json new file mode 100644 index 0000000..cb1bf50 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/Dictionary.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "Dictionary" } diff --git a/filetree/Neo-JSON-Core.package/Integer.extension/instance/neoJsonOn..st b/filetree/Neo-JSON-Core.package/Integer.extension/instance/neoJsonOn..st new file mode 100644 index 0000000..8d200b0 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/Integer.extension/instance/neoJsonOn..st @@ -0,0 +1,3 @@ +*neo-json-core +neoJsonOn: neoJSONWriter + neoJSONWriter writeInteger: self \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/Integer.extension/properties.json b/filetree/Neo-JSON-Core.package/Integer.extension/properties.json new file mode 100644 index 0000000..d27420b --- /dev/null +++ b/filetree/Neo-JSON-Core.package/Integer.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "Integer" } diff --git a/filetree/Neo-JSON-Core.package/NeoJSONArray.class/README.md b/filetree/Neo-JSON-Core.package/NeoJSONArray.class/README.md new file mode 100644 index 0000000..4f3b4a9 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONArray.class/README.md @@ -0,0 +1,9 @@ +I am NeoJSONArray. +I am an Array. + +I am often used in combination with NeoJSONObject, to represent the result of parsing JSON. + + I support path access for nested instances of me, using #atPath: and #atPath:put: + +Used in its generic way, NeoJSONParser will return Arrays and Dictionaries. +Returning NeoJSONArrays and NeoJSONObjects, simple subclasses, allows to add some convenience methods. diff --git a/filetree/Neo-JSON-Core.package/NeoJSONArray.class/class/exampleNumbers.st b/filetree/Neo-JSON-Core.package/NeoJSONArray.class/class/exampleNumbers.st new file mode 100644 index 0000000..550e964 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONArray.class/class/exampleNumbers.st @@ -0,0 +1,19 @@ +example +exampleNumbers + + | numbers | + numbers := self new: 128 withAll: nil. + 0 to: 127 do: [ :n | + numbers + at: n + 1 + put: (NeoJSONObject new + integer: n; + decimal: (n printStringBase: 10); + octal: (n printStringBase: 8); + hexadecimal: (n printStringBase: 16); + binary: (n printStringBase: 2); + roman: n printStringRoman; + words: n asWords; + prime: n isPrime; + character: n asCharacter asString) ]. + ^ numbers \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONArray.class/class/exampleSimple.st b/filetree/Neo-JSON-Core.package/NeoJSONArray.class/class/exampleSimple.st new file mode 100644 index 0000000..59bce1f --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONArray.class/class/exampleSimple.st @@ -0,0 +1,4 @@ +example +exampleSimple + + ^ self withAll: { 0 . 1 . Float pi. 'string' . true . false. nil } \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/at.add..st b/filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/at.add..st new file mode 100644 index 0000000..f0cc6be --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/at.add..st @@ -0,0 +1,5 @@ +adding +at: index add: object + ^ index = '-' + ifTrue: [ self addLast: object ] + ifFalse: [ self insert: object before: index ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/atPath..st b/filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/atPath..st new file mode 100644 index 0000000..8086f62 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/atPath..st @@ -0,0 +1,10 @@ +accessing +atPath: keyCollection + "Use each key in keyCollection recursively, return nil when a key is missing. + Note how keys can also be indexes to arrays." + + | value | + value := self. + keyCollection do: [ :each | + value := value at: each ifAbsent: [ ^ nil ] ]. + ^ value \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/atPath.add..st b/filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/atPath.add..st new file mode 100644 index 0000000..72057ff --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/atPath.add..st @@ -0,0 +1,14 @@ +adding +atPath: keyCollection add: newValue + "Use each key in keyCollection recursively, create new levels when needed. + Note how keys can also be indexes to arrays. + This variant will insert/add to arrays" + + | target | + keyCollection ifEmpty: [ ^ self ]. + target := self. + keyCollection allButLastDo: [ :each | + target := target + at: each + ifAbsent: [ target at: each add: target species new ] ]. + ^ target at: keyCollection last add: newValue \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/atPath.put..st b/filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/atPath.put..st new file mode 100644 index 0000000..1cff8da --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/atPath.put..st @@ -0,0 +1,13 @@ +accessing +atPath: keyCollection put: newValue + "Use each key in keyCollection recursively, create new levels when needed. + Note how keys can also be indexes to arrays." + + | target | + keyCollection ifEmpty: [ ^ self ]. + target := self. + keyCollection allButLastDo: [ :each | + target := target + at: each + ifAbsent: [ target at: each put: target species new ] ]. + ^ target at: keyCollection last put: newValue \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/findPath..st b/filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/findPath..st new file mode 100644 index 0000000..180b1b8 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/findPath..st @@ -0,0 +1,12 @@ +accessing +findPath: conditionBlock + "Find and return the first path to an object in the graph that I represent + for which conditionBlock holds. Return nil when not found." + + (conditionBlock value: self) ifTrue: [ ^ #(()) ]. + self doWithIndex: [ :value :index | + (conditionBlock value: value) ifTrue: [ ^ { index } ]. + (value isCollection and: [ value isString not ]) ifTrue: [ + (value findPath: conditionBlock) ifNotNil: [ :subPath | + ^ { index } , subPath ] ] ]. + ^ nil \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/findPaths..st b/filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/findPaths..st new file mode 100644 index 0000000..48598fb --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/findPaths..st @@ -0,0 +1,13 @@ +accessing +findPaths: conditionBlock + "Find and return all paths to objects in the graph that I represent + for which conditionBlock holds. Return an empty collection when none are found." + + | found | + found := OrderedCollection new. + self doWithIndex: [ :value :index | + (conditionBlock value: value) ifTrue: [ found add: { index } ]. + (value isCollection and: [ value isString not ]) ifTrue: [ + (value findPaths: conditionBlock) do: [ :subPath | + found add: { index } , subPath ] ] ]. + ^ found \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/printOn..st b/filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/printOn..st new file mode 100644 index 0000000..5f56606 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/printOn..st @@ -0,0 +1,10 @@ +print +printOn: stream + "I use my JSON representation when printing myself" + + [ (NeoJSONWriter on: stream) nextPut: self ] + on: Error + do: [ :exception | + stream + nextPutAll: ' Error printing JSON: '; + print: exception ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/removeKey..st b/filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/removeKey..st new file mode 100644 index 0000000..41021d1 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/removeKey..st @@ -0,0 +1,5 @@ +removing +removeKey: index + "Polymorphic with NeoJSONObject: remove the element at index" + + ^ self removeAt: index \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONArray.class/properties.json b/filetree/Neo-JSON-Core.package/NeoJSONArray.class/properties.json new file mode 100644 index 0000000..043cb0d --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONArray.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "Neo-JSON-Core", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + ], + "name" : "NeoJSONArray", + "pools" : [ + ], + "super" : "OrderedCollection", + "type" : "normal" } diff --git a/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/README.md b/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/README.md new file mode 100644 index 0000000..6e1a020 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/README.md @@ -0,0 +1,3 @@ +I am NeoJSONCustomMapping. + +I read the next JSON value and turn it into a Smalltalk object using a converter block. \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/decoder..st b/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/decoder..st new file mode 100644 index 0000000..135efff --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/decoder..st @@ -0,0 +1,8 @@ +mapping +decoder: block + "Set a decoder block that accepts the next object representation read + and converts it into the actual object to be returned." + + self reader: [ :jsonReader | | representation | + representation := jsonReader next. + block value: representation ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/encoder..st b/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/encoder..st new file mode 100644 index 0000000..c7b2a43 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/encoder..st @@ -0,0 +1,8 @@ +mapping +encoder: block + "Set a encoder block that accepts the next object to be written + and converts it into the actual representation to be written." + + self writer: [ :jsonWriter :anObject | | representation | + representation := block value: anObject. + jsonWriter nextPut: representation ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/identifier.st b/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/identifier.st new file mode 100644 index 0000000..745eec3 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/identifier.st @@ -0,0 +1,3 @@ +accessing +identifier + ^ schemaName \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfElementSchema..st b/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfElementSchema..st new file mode 100644 index 0000000..c51d13f --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfElementSchema..st @@ -0,0 +1,15 @@ +mapping +listOfElementSchema: elementSchema + "Set the reader to a block that will create an instance of the + standard listClass while reading a list of elements of type elementSchema. + Pass down the elementSchema to the elements in the writer." + + self reader: [ :jsonReader | + jsonReader listClass streamContents: [ :stream | + jsonReader parseListDo: [ | element | + element := jsonReader nextAs: elementSchema. + stream nextPut: element ] ] ]. + self writer: [ :jsonWriter :list | + jsonWriter writeListStreamingDo: [ :listWriter | + list do: [ :each | + listWriter writeElement: each as: elementSchema ] ] ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfType..st b/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfType..st new file mode 100644 index 0000000..bdc43572 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfType..st @@ -0,0 +1,15 @@ +mapping +listOfType: collectionClass + "Set the reader to a block that will create an instance of collectionClass + using #streamContents: while reading a list of elements. + Set the writer to write the list's elements." + + self reader: [ :jsonReader | + collectionClass streamContents: [ :stream | + jsonReader parseListDo: [ | element | + element := jsonReader next. + stream nextPut: element ] ] ]. + self writer: [ :jsonWriter :list | + jsonWriter writeListStreamingDo: [ :listWriter | + list do: [ :each | + listWriter writeElement: each ] ] ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfType.andElementSchema..st b/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfType.andElementSchema..st new file mode 100644 index 0000000..94acea3 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfType.andElementSchema..st @@ -0,0 +1,15 @@ +mapping +listOfType: collectionClass andElementSchema: elementSchema + "Set the reader to a block that will create an instance of collectionClass + using #streamContents: while reading a list of elements of type elementSchema. + Pass down the elementSchema to the elements in the writer." + + self reader: [ :jsonReader | + collectionClass streamContents: [ :stream | + jsonReader parseListDo: [ | element | + element := jsonReader nextAs: elementSchema. + stream nextPut: element ] ] ]. + self writer: [ :jsonWriter :list | + jsonWriter writeListStreamingDo: [ :listWriter | + list do: [ :each | + listWriter writeElement: each as: elementSchema ] ] ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/mapWithValueSchema..st b/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/mapWithValueSchema..st new file mode 100644 index 0000000..0b7e3fd --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/mapWithValueSchema..st @@ -0,0 +1,16 @@ +mapping +mapWithValueSchema: valueSchema + "Set the reader to a block that will create an instance of the + standard mapClass while reading values of type valueSchema, + with standard keys" + + self reader: [ :jsonReader | | map | + map := jsonReader mapClass new. + jsonReader parseMapKeysDo: [ :key | | value | + value := jsonReader nextAs: valueSchema. + map at: key put: value ]. + map ]. + self writer: [ :jsonWriter :map | + jsonWriter writeMapStreamingDo: [ :mapWriter | + map keysAndValuesDo: [ :key :value | + mapWriter writeKey: key value: value as: valueSchema ] ] ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/readFrom..st b/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/readFrom..st new file mode 100644 index 0000000..8237ad9 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/readFrom..st @@ -0,0 +1,5 @@ +parsing +readFrom: jsonReader + ^ reader + ifNil: [ jsonReader next ] + ifNotNil: [ reader value: jsonReader ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/reader..st b/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/reader..st new file mode 100644 index 0000000..89ea0b4 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/reader..st @@ -0,0 +1,7 @@ +accessing +reader: block + "Set the reader to block, a 1 argument block that when given + a jsonReader as argument reads the object that I represent. + When there is no reader block, the default #next will be used." + + reader := block \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/schemaName..st b/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/schemaName..st new file mode 100644 index 0000000..06ba93a --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/schemaName..st @@ -0,0 +1,3 @@ +accessing +schemaName: schema + schemaName := schema \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/writeObject.on..st b/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/writeObject.on..st new file mode 100644 index 0000000..dca04b6 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/writeObject.on..st @@ -0,0 +1,5 @@ +writing +writeObject: anObject on: jsonWriter + writer + ifNil: [ anObject neoJsonOn: jsonWriter ] + ifNotNil: [ writer value: jsonWriter value: anObject ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/writer..st b/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/writer..st new file mode 100644 index 0000000..7e4f1ef --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/writer..st @@ -0,0 +1,7 @@ +accessing +writer: block + "Set the writer to block, a 2 argument block that when given: a jsonWriter + and the object to write will write the object that I represent. + When there is no writer block, the default #neoJsonOn: will be used." + + writer := block \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/properties.json b/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/properties.json new file mode 100644 index 0000000..2619891 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/properties.json @@ -0,0 +1,16 @@ +{ + "category" : "Neo-JSON-Core", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + "schemaName", + "reader", + "writer" ], + "name" : "NeoJSONCustomMapping", + "pools" : [ + ], + "super" : "NeoJSONMapping", + "type" : "normal" } diff --git a/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/README.md b/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/README.md new file mode 100644 index 0000000..8f28ba8 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/README.md @@ -0,0 +1,22 @@ +I am NeoJSONFloatPrinter. + +I print Float numbers in a compact, human friendly format. + +The following (default) parameters are used: + - base 10 - hardcoded (for now) + - precision 5 digits + - decimal point - hardcoded (for now) + - exponent e - hardcoded (for now) + - NaN, Inf and -Inf - hardcoded (for now) + - lower 1e-4 + - upper 1e6 + - decimal notation for abs values inside abs [ lower, upper ] + - scientific notation for abs values outside [ lower, upper ] + - no padding, no trailing zeros in fraction part + - only negative sign, never a positive sign + - no thousands separators + - no engineering notation + +See my class side for configuration examples. + +My public interface is in the printing protocol. diff --git a/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/class/lowPrecision.st b/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/class/lowPrecision.st new file mode 100644 index 0000000..323ab85 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/class/lowPrecision.st @@ -0,0 +1,7 @@ +instance creation +lowPrecision + ^ self new + precision: 2; + lower: 1e-2; + upper: 1e5; + yourself \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/class/scientificOnly.st b/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/class/scientificOnly.st new file mode 100644 index 0000000..ba5a518 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/class/scientificOnly.st @@ -0,0 +1,6 @@ +instance creation +scientificOnly + ^ self new + lower: 0; + upper: 0; + yourself \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/decimalPoint.st b/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/decimalPoint.st new file mode 100644 index 0000000..294c6e6 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/decimalPoint.st @@ -0,0 +1,3 @@ +constants +decimalPoint + ^ $. \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/exponent.st b/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/exponent.st new file mode 100644 index 0000000..e397b57 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/exponent.st @@ -0,0 +1,3 @@ +constants +exponent + ^ $e \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/infinite.st b/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/infinite.st new file mode 100644 index 0000000..0d23af7 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/infinite.st @@ -0,0 +1,3 @@ +constants +infinite + ^ 'Inf' \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/initialize.st b/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/initialize.st new file mode 100644 index 0000000..d808a27 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/initialize.st @@ -0,0 +1,7 @@ +initialize-release +initialize + super initialize. + base := 10. + precision := 5. + lower := 1e-4. + upper := 1e6 \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/lower..st b/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/lower..st new file mode 100644 index 0000000..e582521 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/lower..st @@ -0,0 +1,3 @@ +initialize-release +lower: number + lower := number \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/nan.st b/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/nan.st new file mode 100644 index 0000000..a394bc5 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/nan.st @@ -0,0 +1,3 @@ +constants +nan + ^ 'NaN' \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/precision..st b/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/precision..st new file mode 100644 index 0000000..86df656 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/precision..st @@ -0,0 +1,4 @@ +initialize-release +precision: numberOfDigits + self assert: (numberOfDigits between: 1 and: 20). + precision := numberOfDigits \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/print..st b/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/print..st new file mode 100644 index 0000000..941c608 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/print..st @@ -0,0 +1,4 @@ +printing +print: float + ^ String new: 16 streamContents: [ :out | + self print: float on: out ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/print.decimalOn..st b/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/print.decimalOn..st new file mode 100644 index 0000000..ddba67a --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/print.decimalOn..st @@ -0,0 +1,7 @@ +private +print: float decimalOn: stream + stream print: float asInteger. + stream nextPut: self decimalPoint. + self + print: (float fractionPart * (base raisedTo: precision)) rounded + fractionOn: stream \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/print.fractionOn..st b/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/print.fractionOn..st new file mode 100644 index 0000000..3926781 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/print.fractionOn..st @@ -0,0 +1,13 @@ +private +print: fractionPart fractionOn: stream + | zeros | + zeros := 0. "leading zeros are significant, trailing zeros are not printed" + precision to: 1 by: -1 do: [ :position | | digit | + digit := fractionPart digitAt: position base: base. + digit = 0 + ifTrue: [ zeros := zeros +1 ] + ifFalse: [ + zeros > 0 ifTrue: [ + zeros timesRepeat: [ stream nextPut: $0 ]. + zeros := 0 ]. + stream nextPut: digit asCharacterDigit ] ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/print.on..st b/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/print.on..st new file mode 100644 index 0000000..e8def3e --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/print.on..st @@ -0,0 +1,12 @@ +printing +print: float on: stream + | int abs | + (float isZero or: [ float isFinite not ]) + ifTrue: [ ^ self print: float specialOn: stream ]. + self print: float signOn: stream. + ((abs := float abs) between: lower and: upper) + ifTrue: [ + (int := abs asInteger) = abs + ifTrue: [ int printOn: stream ] + ifFalse: [ self print: abs decimalOn: stream ] ] + ifFalse: [ self print: abs scientificOn: stream ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/print.scientificOn..st b/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/print.scientificOn..st new file mode 100644 index 0000000..75a6e90 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/print.scientificOn..st @@ -0,0 +1,9 @@ +private +print: float scientificOn: stream + | exponent mantissa | + exponent := (float ln / base ln) floor. + mantissa := float / (base raisedTo: exponent). + self print: mantissa decimalOn: stream. + stream + nextPut: self exponent; + print: exponent \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/print.signOn..st b/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/print.signOn..st new file mode 100644 index 0000000..c0157e1 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/print.signOn..st @@ -0,0 +1,4 @@ +private +print: float signOn: stream + float sign = -1 + ifTrue: [ stream nextPut: $- ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/print.specialOn..st b/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/print.specialOn..st new file mode 100644 index 0000000..c29fe45 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/print.specialOn..st @@ -0,0 +1,12 @@ +private +print: float specialOn: stream + float isZero + ifTrue: [ + stream nextPut: $0 ] + ifFalse: [ + float isNaN + ifTrue: [ + stream nextPutAll: self nan ] + ifFalse: [ + self print: float signOn: stream. + stream nextPutAll: self infinite ] ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/printFloat.on..st b/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/printFloat.on..st new file mode 100644 index 0000000..35d1b88 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/printFloat.on..st @@ -0,0 +1,3 @@ +printing +printFloat: float on: stream + self print: float on: stream \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/upper..st b/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/upper..st new file mode 100644 index 0000000..6b83f8b --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/instance/upper..st @@ -0,0 +1,3 @@ +initialize-release +upper: number + upper := number \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/properties.json b/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/properties.json new file mode 100644 index 0000000..b4dda76 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONFloatPrinter.class/properties.json @@ -0,0 +1,17 @@ +{ + "category" : "Neo-JSON-Core", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + "precision", + "lower", + "upper", + "base" ], + "name" : "NeoJSONFloatPrinter", + "pools" : [ + ], + "super" : "Object", + "type" : "normal" } diff --git a/filetree/Neo-JSON-Core.package/NeoJSONMapper.class/README.md b/filetree/Neo-JSON-Core.package/NeoJSONMapper.class/README.md new file mode 100644 index 0000000..7166c5e --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONMapper.class/README.md @@ -0,0 +1,28 @@ +I am NeoJSONMapper. +I hold a mapping from schema identifiers to objects that known how to read or write instances from or to JSON. + +Schema identifiers are either Smalltalk classes or Symbols. + +I offer a builder interface to construct mappings. + +The standard object mapping represents a Smalltalk object as a map, mapping some or all instance variables, or a set of accessors (getter/setter methods). Furthermore, for each value an optional schema can be specified. + +Using a custom mapping, a reader and/or writer block can deal with special cases such as specific collection types with an optional schema for the elements, or a direct mapping of semi primitive types such as Date or DateAndTime. + +A mapping can be specified explicitely on a mapper, or can be resolved using the #neoJsonMapping: class method. + +Here are some examples: + + mapper mapAllInstVarsFor: Point. + mapper for: TestObject do: [ :mapping | + mapping mapInstVars: #(id name). + (mapping mapInstVar: #timestamp to: 'created-at') valueSchema: DateAndTime. + (mapping mapInstVar: #points) valueSchema: #ArrayOfPoints. + (mapping mapInstVar: #bytes) valueSchema: ByteArray ]. + mapper for: DateAndTime customDo: [ :mapping | + mapping decoder: [ :string | DateAndTime fromString: string ]. + mapping encoder: [ :dateAndTime | dateAndTime printString ] ]. + mapper for: #ArrayOfPoints customDo: [ :mapping | + mapping listOfElementSchema: Point ]. + mapper for: ByteArray customDo: [ :mapping | + mapping listOfType: ByteArray ] diff --git a/filetree/Neo-JSON-Core.package/NeoJSONMapper.class/instance/customMappingFor..st b/filetree/Neo-JSON-Core.package/NeoJSONMapper.class/instance/customMappingFor..st new file mode 100644 index 0000000..289f589 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONMapper.class/instance/customMappingFor..st @@ -0,0 +1,8 @@ +private +customMappingFor: schemaName + ^ self mappings + at: schemaName + ifAbsentPut: [ + NeoJSONCustomMapping new + schemaName: schemaName; + yourself ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONMapper.class/instance/for.customDo..st b/filetree/Neo-JSON-Core.package/NeoJSONMapper.class/instance/for.customDo..st new file mode 100644 index 0000000..774c55b --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONMapper.class/instance/for.customDo..st @@ -0,0 +1,9 @@ +mapping +for: schemaName customDo: block + "Execute the code in block to further customize the mapping for schemaName. + Create and add a new custom mapping for schemaName if necessary." + + | mapping | + mapping := self customMappingFor: schemaName. + block value: mapping. + ^ mapping \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONMapper.class/instance/for.do..st b/filetree/Neo-JSON-Core.package/NeoJSONMapper.class/instance/for.do..st new file mode 100644 index 0000000..e2455b6 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONMapper.class/instance/for.do..st @@ -0,0 +1,9 @@ +mapping +for: smalltalkClass do: block + "Execute the code in block to further customize the mapping for schemaName. + Create and add a new standard object mapping for schemaName if necessary." + + | mapping | + mapping := self objectMappingFor: smalltalkClass. + block value: mapping. + ^ mapping \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONMapper.class/instance/mapAllInstVarsFor..st b/filetree/Neo-JSON-Core.package/NeoJSONMapper.class/instance/mapAllInstVarsFor..st new file mode 100644 index 0000000..fbca425 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONMapper.class/instance/mapAllInstVarsFor..st @@ -0,0 +1,8 @@ +convencience +mapAllInstVarsFor: smalltalkClass + "Map the instance variables of smalltalkClass and all its super classes" + + | mapping | + mapping := self objectMappingFor: smalltalkClass. + mapping mapAllInstVars. + ^ mapping \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONMapper.class/instance/mapInstVarsFor..st b/filetree/Neo-JSON-Core.package/NeoJSONMapper.class/instance/mapInstVarsFor..st new file mode 100644 index 0000000..9ff2de3 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONMapper.class/instance/mapInstVarsFor..st @@ -0,0 +1,8 @@ +convencience +mapInstVarsFor: smalltalkClass + "Map the instance variables of smalltalkClass" + + | mapping | + mapping := self objectMappingFor: smalltalkClass. + mapping mapInstVars. + ^ mapping \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONMapper.class/instance/mappingFor..st b/filetree/Neo-JSON-Core.package/NeoJSONMapper.class/instance/mappingFor..st new file mode 100644 index 0000000..6c821cd --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONMapper.class/instance/mappingFor..st @@ -0,0 +1,5 @@ +accessing +mappingFor: schema + ^ self + mappingFor: schema + ifAbsent: [ NeoJSONMappingNotFound signalFor: schema in: self ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONMapper.class/instance/mappingFor.ifAbsent..st b/filetree/Neo-JSON-Core.package/NeoJSONMapper.class/instance/mappingFor.ifAbsent..st new file mode 100644 index 0000000..707f669 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONMapper.class/instance/mappingFor.ifAbsent..st @@ -0,0 +1,7 @@ +accessing +mappingFor: schema ifAbsent: block + (self mappings includesKey: schema) + ifFalse: [ self resolveMappingFor: schema ]. + ^ self mappings + at: schema + ifAbsent: block \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONMapper.class/instance/mappings.st b/filetree/Neo-JSON-Core.package/NeoJSONMapper.class/instance/mappings.st new file mode 100644 index 0000000..c543660 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONMapper.class/instance/mappings.st @@ -0,0 +1,4 @@ +private +mappings + ^ mappings + ifNil: [ mappings := Dictionary new ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONMapper.class/instance/objectMappingFor..st b/filetree/Neo-JSON-Core.package/NeoJSONMapper.class/instance/objectMappingFor..st new file mode 100644 index 0000000..aede86f --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONMapper.class/instance/objectMappingFor..st @@ -0,0 +1,8 @@ +private +objectMappingFor: smalltalkClass + ^ self mappings + at: smalltalkClass + ifAbsentPut: [ + NeoJSONObjectMapping new + subjectClass: smalltalkClass; + yourself ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONMapper.class/instance/resolveMappingFor..st b/filetree/Neo-JSON-Core.package/NeoJSONMapper.class/instance/resolveMappingFor..st new file mode 100644 index 0000000..50c4f2c --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONMapper.class/instance/resolveMappingFor..st @@ -0,0 +1,5 @@ +private +resolveMappingFor: class + (class respondsTo: #neoJsonMapping:) + ifTrue: [ + class perform: #neoJsonMapping: with: self ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONMapper.class/properties.json b/filetree/Neo-JSON-Core.package/NeoJSONMapper.class/properties.json new file mode 100644 index 0000000..921cb67 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONMapper.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "Neo-JSON-Core", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + "mappings" ], + "name" : "NeoJSONMapper", + "pools" : [ + ], + "super" : "Object", + "type" : "normal" } diff --git a/filetree/Neo-JSON-Core.package/NeoJSONMapping.class/README.md b/filetree/Neo-JSON-Core.package/NeoJSONMapping.class/README.md new file mode 100644 index 0000000..6666cf6 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONMapping.class/README.md @@ -0,0 +1 @@ +I am NeoJSONMapping, an abstract superclass for mapping definitions. diff --git a/filetree/Neo-JSON-Core.package/NeoJSONMapping.class/instance/identifier.st b/filetree/Neo-JSON-Core.package/NeoJSONMapping.class/instance/identifier.st new file mode 100644 index 0000000..6c89cdf --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONMapping.class/instance/identifier.st @@ -0,0 +1,3 @@ +accessing +identifier + self subclassResponsibility \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONMapping.class/instance/printOn..st b/filetree/Neo-JSON-Core.package/NeoJSONMapping.class/instance/printOn..st new file mode 100644 index 0000000..3863183 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONMapping.class/instance/printOn..st @@ -0,0 +1,4 @@ +printing +printOn: stream + super printOn: stream. + stream nextPut: $(; print: self identifier; nextPut: $) \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONMapping.class/instance/readFrom..st b/filetree/Neo-JSON-Core.package/NeoJSONMapping.class/instance/readFrom..st new file mode 100644 index 0000000..5724e30 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONMapping.class/instance/readFrom..st @@ -0,0 +1,3 @@ +parsing +readFrom: jsonReader + self subclassResponsibility \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONMapping.class/instance/writeObject.on..st b/filetree/Neo-JSON-Core.package/NeoJSONMapping.class/instance/writeObject.on..st new file mode 100644 index 0000000..37d1968 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONMapping.class/instance/writeObject.on..st @@ -0,0 +1,3 @@ +writing +writeObject: anObject on: jsonWriter + self subclassResponsibility \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONMapping.class/properties.json b/filetree/Neo-JSON-Core.package/NeoJSONMapping.class/properties.json new file mode 100644 index 0000000..3463234 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONMapping.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "Neo-JSON-Core", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + ], + "name" : "NeoJSONMapping", + "pools" : [ + ], + "super" : "Object", + "type" : "normal" } diff --git a/filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/README.md b/filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/README.md new file mode 100644 index 0000000..5ce2759 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/README.md @@ -0,0 +1,3 @@ +I am NeoJSONMappingNotFound. I am signalled when no mapping is found for a schema. + +Portability comment: In Pharo, I could technically subclass from NotFound directly, avoid all my defined methods and only keep #messageText and #standardMessageText. However, NotFound exception does not exist in other dialects. To keep NeoJSON as portable as possible we duplicate some Pharo code into myself. \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/class/signalFor..st b/filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/class/signalFor..st new file mode 100644 index 0000000..9c1dc48 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/class/signalFor..st @@ -0,0 +1,7 @@ +instance creation +signalFor: anObject + "Create and signal an exception for anObject in the default receiver." + + ^ self new + object: anObject; + signal \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/class/signalFor.in..st b/filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/class/signalFor.in..st new file mode 100644 index 0000000..e016a6a --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/class/signalFor.in..st @@ -0,0 +1,8 @@ +instance creation +signalFor: anObject in: aCollection + "Create and signal an exception for anObject in aCollection." + + ^ self new + object: anObject; + collection: aCollection; + signal \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/collection..st b/filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/collection..st new file mode 100644 index 0000000..1cbebd7 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/collection..st @@ -0,0 +1,5 @@ +accessing +collection: aCollection + "Set the collection where something is not found in" + + collection := aCollection \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/collection.st b/filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/collection.st new file mode 100644 index 0000000..c2192ab --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/collection.st @@ -0,0 +1,5 @@ +accessing +collection + "Return the collection where something is not found in" + + ^ collection \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/messageText.st b/filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/messageText.st new file mode 100644 index 0000000..89c4479 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/messageText.st @@ -0,0 +1,5 @@ +accessing +messageText + "Overwritten with standard text. To ease portability to other Smalltalk dialects we do not access the instVar 'messageText' as not all dialects have it. Not caching the value on the instVar shouldn't bring any performance hit in this case. " + + ^ self standardMessageText \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/object..st b/filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/object..st new file mode 100644 index 0000000..17b79eb --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/object..st @@ -0,0 +1,5 @@ +accessing +object: anObject + "Set the object that was not found" + + object := anObject \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/object.st b/filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/object.st new file mode 100644 index 0000000..44ae0b9 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/object.st @@ -0,0 +1,5 @@ +accessing +object + "Return the object that was not found" + + ^ object \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/standardMessageText.st b/filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/standardMessageText.st new file mode 100644 index 0000000..182f3fe --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/standardMessageText.st @@ -0,0 +1,7 @@ +private +standardMessageText + ^ String streamContents: [ :stream | + stream << 'No mapping found for '. + stream print: self object. + stream << ' in '. + stream print: self collection class ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/properties.json b/filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/properties.json new file mode 100644 index 0000000..a32a862 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/properties.json @@ -0,0 +1,15 @@ +{ + "category" : "Neo-JSON-Core", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + "object", + "collection" ], + "name" : "NeoJSONMappingNotFound", + "pools" : [ + ], + "super" : "Error", + "type" : "normal" } diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/README.md b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/README.md new file mode 100644 index 0000000..51fe8d3 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/README.md @@ -0,0 +1,39 @@ +I am NeoJSONObject. +I am an OrderedDictionary. + +I behave more like a JavaScript object. I return nil for missing keys. I allow any property to be read or set by using a normal accessor message. + +The following are equivalent: + + self foo. + self at: #foo. + +As are the following + + self foo: 1. + self at: #foo put: 1. + +Except that in the first case, self is returned. + +I can optionally be used by NeoJSONReader as mapClass (see #mapClass:). + +For output, I act just like my superclass (it is thus not necessary to do any conversions). + +Example: + + NeoJSONObject fromString: '{"foo":1,"bar":-2}'. + NeoJSONObject new foo: 1; bar: -2. + { #x -> 100. #y -> 200 } as: NeoJSONObject. + (NeoJSONObject new data: (NeoJSONObject new id: #sensor1; value: 37.5)) asString. + +I use JSON as my printed representation. To convert me to JSON, use #printString or #asString. + +Additionally, I support path access for nested instances of me, using #atPath: and #atPath:put: + +The first is special because it returns nil as soon as a key is missing. The second is special because it creates extra levels (instances of me) as needed to follow the path of keys. + + NeoJSONObject new atPath: #(one two three) put: 42; yourself. + NeoJSONObject new atPath: #(one two three) put: 42; atPath: #(one two three). + +The fact that I am an OrderedDictionary means to I maintain the order of keys. This is meant as a convenience feature only as the official JSON specification clearly states "An object is an unordered set of name/value pairs". +I work together with NeoJSONArray. \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleCoordinates.st b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleCoordinates.st new file mode 100644 index 0000000..dfc500a --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleCoordinates.st @@ -0,0 +1,6 @@ +example +exampleCoordinates + + ^ (0 to: 4) + collect: [ :each | self new x: each; y: each * 2 ] + as: NeoJSONArray \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleCoordinatesParsing.st b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleCoordinatesParsing.st new file mode 100644 index 0000000..ce56ec8 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleCoordinatesParsing.st @@ -0,0 +1,7 @@ +example +exampleCoordinatesParsing + + | result | + result := self fromString: NeoJSONReader exampleCoordinatesJSON. + self assert: result equals: self exampleCoordinates. + ^ result \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleCoordinatesWriting.st b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleCoordinatesWriting.st new file mode 100644 index 0000000..1036295 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleCoordinatesWriting.st @@ -0,0 +1,4 @@ +example +exampleCoordinatesWriting + + ^ self exampleCoordinates printString \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleMagnitudeClassHierarchy.st b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleMagnitudeClassHierarchy.st new file mode 100644 index 0000000..0bb804e --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleMagnitudeClassHierarchy.st @@ -0,0 +1,17 @@ +example +exampleMagnitudeClassHierarchy + + | builder | + builder := [ :aClass | + NeoJSONObject new + name: aClass name; + superclass: aClass superclass name; + instanceVariables: aClass instVarNames; + category: aClass category; + totalInstanceVariablesCount: aClass allInstVarNames size; + methodCount: aClass methods size; + totalMethodCount: aClass allMethods size; + subclasses: (aClass subclasses + collect: [ :aSubclass | builder value: aSubclass ] + as: NeoJSONArray) ]. + ^ builder value: Magnitude \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleNested.st b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleNested.st new file mode 100644 index 0000000..8e3b2d8 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleNested.st @@ -0,0 +1,4 @@ +example +exampleNested + + ^ self exampleSimple array: NeoJSONArray exampleSimple \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleNestedRoundtrip.st b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleNestedRoundtrip.st new file mode 100644 index 0000000..f784191 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleNestedRoundtrip.st @@ -0,0 +1,8 @@ +example +exampleNestedRoundtrip + + | json result| + json := self exampleNested printString. + result := self fromString: json. + self assert: result equals: self exampleNested. + ^ result \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleSimple.st b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleSimple.st new file mode 100644 index 0000000..979a5bc --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleSimple.st @@ -0,0 +1,6 @@ +example +exampleSimple + + ^ self new + foo: 100; + bar: 200 \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleSimpleJSON.st b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleSimpleJSON.st new file mode 100644 index 0000000..b957c13 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleSimpleJSON.st @@ -0,0 +1,4 @@ +example +exampleSimpleJSON + + ^ '{"foo":100,"bar":200}' \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleSimpleParsing.st b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleSimpleParsing.st new file mode 100644 index 0000000..7ea3e2a --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleSimpleParsing.st @@ -0,0 +1,7 @@ +example +exampleSimpleParsing + + | result | + result := self fromString: self exampleSimpleJSON. + self assert: result equals: self exampleSimple. + ^ result \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleSimpleUsage.st b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleSimpleUsage.st new file mode 100644 index 0000000..a42191e --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleSimpleUsage.st @@ -0,0 +1,10 @@ +example +exampleSimpleUsage + + | simple | + simple := NeoJSONObject exampleSimple. + self assert: simple foo equals: (simple at: #foo). + self assert: (simple foo: -1) equals: (simple at: #foo put: -1; yourself). + self assert: (simple includesKey: #baz) not. + self assert: simple baz equals: nil. + ^ simple \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleSimpleWriting.st b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleSimpleWriting.st new file mode 100644 index 0000000..397cbbd --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/exampleSimpleWriting.st @@ -0,0 +1,7 @@ +example +exampleSimpleWriting + + | result | + result := self exampleSimple printString. + self assert: result equals: self exampleSimpleJSON. + ^ result \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/fromStream..st b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/fromStream..st new file mode 100644 index 0000000..248ad17 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/fromStream..st @@ -0,0 +1,9 @@ +convenience +fromStream: readStream + "Parse stream as JSON, so that maps become instances of me and lists instances of NeoJSONArray" + + ^ (NeoJSONReader on: readStream readStream) + mapClass: self; + listClass: NeoJSONArray; + propertyNamesAsSymbols: true; + next \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/fromString..st b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/fromString..st new file mode 100644 index 0000000..c9bfb95 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/fromString..st @@ -0,0 +1,5 @@ +convenience +fromString: string + "Parse string as JSON, so that maps become instances of me and lists instances of NeoJSONArray" + + ^ self fromStream: string readStream \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/readFrom..st b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/readFrom..st new file mode 100644 index 0000000..a792130 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/readFrom..st @@ -0,0 +1,5 @@ +convenience +readFrom: readStream + "Parse stream as JSON, so that maps become instances of me and lists instances of NeoJSONArray" + + ^ self fromStream: readStream \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/at..st b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/at..st new file mode 100644 index 0000000..5ef6ca3 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/at..st @@ -0,0 +1,6 @@ +accessing +at: key + "I return nil for missing keys. + My superclass would signal a KeyNotFound." + + ^ self at: key ifAbsent: [ nil ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/at.add..st b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/at.add..st new file mode 100644 index 0000000..f4609ff --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/at.add..st @@ -0,0 +1,3 @@ +add +at: key add: object + ^ self at: key put: object \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/at.at..st b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/at.at..st new file mode 100644 index 0000000..66f30e4 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/at.at..st @@ -0,0 +1,6 @@ +nested dictionaries +at: firstKey at: secondKey + "I return nil for missing keys. + My superclass would signal a KeyNotFound." + + ^ self atPath: { firstKey. secondKey } \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/at.at.put..st b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/at.at.put..st new file mode 100644 index 0000000..2520d3b --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/at.at.put..st @@ -0,0 +1,5 @@ +nested dictionaries +at: firstKey at: secondKey put: value + "Store value under secondKey in nested object under firstKey, create new level when needed" + + ^ self atPath: { firstKey. secondKey } put: value \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/at.ifPresent.ifAbsentPut..st b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/at.ifPresent.ifAbsentPut..st new file mode 100644 index 0000000..285b913 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/at.ifPresent.ifAbsentPut..st @@ -0,0 +1,13 @@ +accessing +at: key ifPresent: aPresentBlock ifAbsentPut: anAbsentBlock + "Lookup the given key in the receiver. If it is present, answer the + value of evaluating the first block optionally with the value associated with the key. + Otherwise store and return the result of evaluating the second block as the new value of the key." + + "Overwritten to patch a bug in the superclass implementation in Pharo 7 and 8. + This problem was fixed in Pharo 9 where this overwrite is no longer necessary but harmless." + + ^ self + at: key + ifPresent: aPresentBlock + ifAbsent: [ self at: key put: anAbsentBlock value ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/atPath..st b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/atPath..st new file mode 100644 index 0000000..8086f62 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/atPath..st @@ -0,0 +1,10 @@ +accessing +atPath: keyCollection + "Use each key in keyCollection recursively, return nil when a key is missing. + Note how keys can also be indexes to arrays." + + | value | + value := self. + keyCollection do: [ :each | + value := value at: each ifAbsent: [ ^ nil ] ]. + ^ value \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/atPath.add..st b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/atPath.add..st new file mode 100644 index 0000000..117bde3 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/atPath.add..st @@ -0,0 +1,14 @@ +accessing +atPath: keyCollection add: newValue + "Use each key in keyCollection recursively, create new levels when needed. + Note how keys can also be indexes to arrays. + This variant will insert/add to arrays." + + | target | + keyCollection ifEmpty: [ ^ self ]. + target := self. + keyCollection allButLastDo: [ :each | + target := target + at: each + ifAbsent: [ target at: each add: target species new ] ]. + ^ target at: keyCollection last add: newValue \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/atPath.put..st b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/atPath.put..st new file mode 100644 index 0000000..1cff8da --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/atPath.put..st @@ -0,0 +1,13 @@ +accessing +atPath: keyCollection put: newValue + "Use each key in keyCollection recursively, create new levels when needed. + Note how keys can also be indexes to arrays." + + | target | + keyCollection ifEmpty: [ ^ self ]. + target := self. + keyCollection allButLastDo: [ :each | + target := target + at: each + ifAbsent: [ target at: each put: target species new ] ]. + ^ target at: keyCollection last put: newValue \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/doesNotUnderstand..st b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/doesNotUnderstand..st new file mode 100644 index 0000000..a805e42 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/doesNotUnderstand..st @@ -0,0 +1,12 @@ +reflective operations +doesNotUnderstand: message + "Overwritten so that 'self foo' becomes 'self at: #foo' + and 'self foo: 1' becomes 'self at: #foo put: 1' except that self is returned" + + | key | + key := message selector. + key isUnary + ifTrue: [ ^ self at: key ]. + ^ (key isKeyword and: [ key numArgs = 1 ]) + ifTrue: [ self at: key allButLast asSymbol put: message arguments first; yourself ] + ifFalse: [ super doesNotUnderstand: message ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/findPath..st b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/findPath..st new file mode 100644 index 0000000..87d2b48 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/findPath..st @@ -0,0 +1,12 @@ +accessing +findPath: conditionBlock + "Find and return the first path to an object in the graph that I represent + for which conditionBlock holds. Return nil when not found." + + (conditionBlock value: self) ifTrue: [ ^ #(()) ]. + self keysAndValuesDo: [ :key :value | + (conditionBlock value: value) ifTrue: [ ^ { key } ]. + (value isCollection and: [ value isString not ]) ifTrue: [ + (value findPath: conditionBlock) ifNotNil: [ :subPath | + ^ { key } , subPath ] ] ]. + ^ nil \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/findPaths..st b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/findPaths..st new file mode 100644 index 0000000..47fd80e --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/findPaths..st @@ -0,0 +1,13 @@ +accessing +findPaths: conditionBlock + "Find and return all paths to objects in the graph that I represent + for which conditionBlock holds. Return an empty collection when none are found." + + | found | + found := OrderedCollection new. + self keysAndValuesDo: [ :key :value | + (conditionBlock value: value) ifTrue: [ found add: { key } ]. + (value isCollection and: [ value isString not ]) ifTrue: [ + (value findPaths: conditionBlock) do: [ :subPath | + found add: { key } , subPath ] ] ]. + ^ found \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/name.st b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/name.st new file mode 100644 index 0000000..80a9a04 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/name.st @@ -0,0 +1,5 @@ +accessing +name + "Overwritten to make this accessor available as key" + + ^ self at: #name \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/printOn..st b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/printOn..st new file mode 100644 index 0000000..d5a197b --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/printOn..st @@ -0,0 +1,10 @@ +printing +printOn: stream + "I use my JSON representation when printing myself" + + [ (NeoJSONWriter on: stream) nextPut: self ] + on: Error + do: [ :exception | + stream + nextPutAll: ' Error printing JSON: '; + print: exception ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/removeAtPath..st b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/removeAtPath..st new file mode 100644 index 0000000..dd80241 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/removeAtPath..st @@ -0,0 +1,11 @@ +accessing +removeAtPath: keyCollection + "Use each key in keyCollection recursively and remove the final key. + Note how keys can also be indexes to arrays." + + | target | + keyCollection ifEmpty: [ ^ self ]. + target := self. + keyCollection allButLastDo: [ :each | + target := target at: each ifAbsent: [ ^ self ] ]. + ^ target removeKey: keyCollection last \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/value.st b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/value.st new file mode 100644 index 0000000..278cafa --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/value.st @@ -0,0 +1,5 @@ +evaluating +value + "Overwritten to make this accessor available as key" + + ^ self at: #value \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/properties.json b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/properties.json new file mode 100644 index 0000000..c1a3486 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "Neo-JSON-Core", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + ], + "name" : "NeoJSONObject", + "pools" : [ + ], + "super" : "OrderedDictionary", + "type" : "normal" } diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/README.md b/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/README.md new file mode 100644 index 0000000..6957dea --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/README.md @@ -0,0 +1,10 @@ +I am NeoJSONObjectMapping. +I describe how instances of a Smalltalk class are mapped to a JSON map. + +I do this using set of NeoJSONPropertyMappings. + +I know the Smalltalk class that I am a mapping for. This class is the schema identifier and is used to instanciate new objects. + +A mapping can be based on any combination of instance variables or accessors (getter/setter pairs). + +I offer a builder interface to constuct property mappings. \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/allowNil.st b/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/allowNil.st new file mode 100644 index 0000000..58dca2b --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/allowNil.st @@ -0,0 +1,5 @@ +initialize-release +allowNil + "Set that I will allow nil/null values when I read/expect an object" + + allowNil := true \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/identifier.st b/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/identifier.st new file mode 100644 index 0000000..cdf717c --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/identifier.st @@ -0,0 +1,3 @@ +accessing +identifier + ^ subjectClass \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/initialize.st b/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/initialize.st new file mode 100644 index 0000000..074317d --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/initialize.st @@ -0,0 +1,5 @@ +initialize-release +initialize + super initialize. + properties := OrderedCollection new. + allowNil := false \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAccessor..st b/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAccessor..st new file mode 100644 index 0000000..d8d20b3 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAccessor..st @@ -0,0 +1,3 @@ +mapping +mapAccessor: accessor + ^ self mapAccessor: accessor to: accessor \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAccessor.mutator.to..st b/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAccessor.mutator.to..st new file mode 100644 index 0000000..b0078fd --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAccessor.mutator.to..st @@ -0,0 +1,6 @@ +mapping +mapAccessor: accessor mutator: mutator to: propertyName + ^ self + mapProperty: propertyName + getter: [ :object | object perform: accessor ] + setter: [ :object :value | object perform: mutator with: value ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAccessor.to..st b/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAccessor.to..st new file mode 100644 index 0000000..0575f7a --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAccessor.to..st @@ -0,0 +1,6 @@ +mapping +mapAccessor: accessor to: propertyName + ^ self + mapProperty: propertyName + getter: [ :object | object perform: accessor ] + setter: [ :object :value | object perform: accessor asMutator with: value ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAccessors..st b/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAccessors..st new file mode 100644 index 0000000..e9552cd --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAccessors..st @@ -0,0 +1,3 @@ +mapping +mapAccessors: accessors + ^ accessors collect: [ :each | self mapAccessor: each ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAllInstVars.st b/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAllInstVars.st new file mode 100644 index 0000000..740548c --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapAllInstVars.st @@ -0,0 +1,3 @@ +convenience +mapAllInstVars + ^ self mapInstVars: subjectClass allInstVarNames \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVar..st b/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVar..st new file mode 100644 index 0000000..f29739f --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVar..st @@ -0,0 +1,3 @@ +mapping +mapInstVar: instVarName + ^ self mapInstVar: instVarName to: instVarName \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVar.to..st b/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVar.to..st new file mode 100644 index 0000000..36ee121 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVar.to..st @@ -0,0 +1,15 @@ +mapping +mapInstVar: instVarName to: propertyName + | index | + index := + "For portability reasons, do not use instVarIndexFor:ifAbsent: + (it doesn't exist in all Smalltalk dialects) but the below approach. + Also, convert to symbols for portability reasons" + (subjectClass allInstVarNames collect: [ :each | each asSymbol ]) + indexOf: instVarName asSymbol + ifAbsent: [ self error: 'Inst var not found: ', instVarName printString ]. + ^ self + mapProperty: propertyName asString + getter: [ :object | object instVarAt: index ] + setter: [ :object :value | object instVarAt: index put: value ] + diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVars..st b/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVars..st new file mode 100644 index 0000000..240320e --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVars..st @@ -0,0 +1,3 @@ +mapping +mapInstVars: instVarNames + ^ instVarNames collect: [ :each | self mapInstVar: each ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVars.st b/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVars.st new file mode 100644 index 0000000..c7296cb --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVars.st @@ -0,0 +1,3 @@ +convenience +mapInstVars + ^ self mapInstVars: subjectClass instVarNames \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapProperty.getter.setter..st b/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapProperty.getter.setter..st new file mode 100644 index 0000000..88161b6 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapProperty.getter.setter..st @@ -0,0 +1,11 @@ +mapping +mapProperty: propertyName getter: readBlock setter: writeBlock + | propertyMapping | + propertyMapping := NeoJSONPropertyMapping new. + propertyMapping + propertyName: propertyName; + getter: readBlock; + setter: writeBlock. + properties removeAllSuchThat: [ :each | each propertyName = propertyMapping propertyName ]. + properties addLast: propertyMapping. + ^ propertyMapping \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/propertyNamed.ifAbsent..st b/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/propertyNamed.ifAbsent..st new file mode 100644 index 0000000..975f27a --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/propertyNamed.ifAbsent..st @@ -0,0 +1,5 @@ +accessing +propertyNamed: propertyName ifAbsent: block + | symbolPropertyName | + symbolPropertyName := propertyName asSymbol. + ^ properties detect: [ :each | each propertyName = symbolPropertyName ] ifNone: block \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/readFrom..st b/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/readFrom..st new file mode 100644 index 0000000..ffb2d7d --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/readFrom..st @@ -0,0 +1,15 @@ +parsing +readFrom: jsonReader + | anObject | + anObject := subjectClass new. + allowNil ifTrue: [ + jsonReader parseConstantDo: [ :value | + ^ value ifNotNil: [ jsonReader error: 'Unexpected boolean constant' ] ] ]. + jsonReader parseMapKeysDo: [ :key | + (self propertyNamed: key ifAbsent: [ nil ]) + ifNil: [ + "read, skip & ignore value" + jsonReader next ] + ifNotNil: [ :mapping | + mapping readObject: anObject from: jsonReader ] ]. + ^ anObject \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/subjectClass..st b/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/subjectClass..st new file mode 100644 index 0000000..8be311b --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/subjectClass..st @@ -0,0 +1,3 @@ +accessing +subjectClass: smalltalkClass + subjectClass := smalltalkClass \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/writeObject.on..st b/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/writeObject.on..st new file mode 100644 index 0000000..96857d6 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/writeObject.on..st @@ -0,0 +1,5 @@ +writing +writeObject: anObject on: jsonWriter + jsonWriter writeMapStreamingDo: [ :jsonMapWriter | + properties do: [ :each | + each writeObject: anObject on: jsonMapWriter ] ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/properties.json b/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/properties.json new file mode 100644 index 0000000..706022a --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONObjectMapping.class/properties.json @@ -0,0 +1,16 @@ +{ + "category" : "Neo-JSON-Core", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + "subjectClass", + "properties", + "allowNil" ], + "name" : "NeoJSONObjectMapping", + "pools" : [ + ], + "super" : "NeoJSONMapping", + "type" : "normal" } diff --git a/filetree/Neo-JSON-Core.package/NeoJSONParseError.class/README.md b/filetree/Neo-JSON-Core.package/NeoJSONParseError.class/README.md new file mode 100644 index 0000000..378a11b --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONParseError.class/README.md @@ -0,0 +1,4 @@ +I am NeoJSONParseError. +I am an Error. + +I am signalled when JSON input is not valid while parsing. \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONParseError.class/properties.json b/filetree/Neo-JSON-Core.package/NeoJSONParseError.class/properties.json new file mode 100644 index 0000000..2d89d8c --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONParseError.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "Neo-JSON-Core", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + ], + "name" : "NeoJSONParseError", + "pools" : [ + ], + "super" : "Error", + "type" : "normal" } diff --git a/filetree/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/README.md b/filetree/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/README.md new file mode 100644 index 0000000..1da0980 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/README.md @@ -0,0 +1,7 @@ +I am NeoJSONPropertyMapping. +I describe how a property of a Smalltalk class maps to a JSON property. + +A property is either an instance variable or getter/setter pair. +I hold a getter and setter block to do the actual work. The property name is used in JSON. + +Optionally, the schema for the value of my property can be specified. This is then used recursively. \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/getter..st b/filetree/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/getter..st new file mode 100644 index 0000000..70af252 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/getter..st @@ -0,0 +1,3 @@ +accessing +getter: block + getter := block \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/printOn..st b/filetree/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/printOn..st new file mode 100644 index 0000000..cb04aed --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/printOn..st @@ -0,0 +1,4 @@ +printing +printOn: stream + super printOn: stream. + stream nextPut: $(; print: propertyName; nextPut: $) \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/propertyName..st b/filetree/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/propertyName..st new file mode 100644 index 0000000..7b044f7 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/propertyName..st @@ -0,0 +1,3 @@ +accessing +propertyName: symbolOrString + propertyName := symbolOrString asSymbol \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/propertyName.st b/filetree/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/propertyName.st new file mode 100644 index 0000000..2a727f6 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/propertyName.st @@ -0,0 +1,3 @@ +accessing +propertyName + ^ propertyName \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/readObject.from..st b/filetree/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/readObject.from..st new file mode 100644 index 0000000..59b4d21 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/readObject.from..st @@ -0,0 +1,5 @@ +parsing +readObject: anObject from: jsonReader + | value | + value := jsonReader nextAs: valueSchema. + setter value: anObject value: value \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/setter..st b/filetree/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/setter..st new file mode 100644 index 0000000..4b51f72 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/setter..st @@ -0,0 +1,3 @@ +accessing +setter: block + setter := block \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/valueSchema..st b/filetree/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/valueSchema..st new file mode 100644 index 0000000..96d3f93 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/valueSchema..st @@ -0,0 +1,3 @@ +accessing +valueSchema: schemaName + valueSchema := schemaName \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/writeObject.on..st b/filetree/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/writeObject.on..st new file mode 100644 index 0000000..b3b0f51 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/writeObject.on..st @@ -0,0 +1,6 @@ +writing +writeObject: anObject on: jsonMapWriter + | value | + value := getter value: anObject. + (value notNil or: [ jsonMapWriter writeNil ]) + ifTrue: [ jsonMapWriter writeKey: propertyName value: value as: valueSchema ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/properties.json b/filetree/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/properties.json new file mode 100644 index 0000000..1c73c65 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/properties.json @@ -0,0 +1,17 @@ +{ + "category" : "Neo-JSON-Core", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + "propertyName", + "valueSchema", + "getter", + "setter" ], + "name" : "NeoJSONPropertyMapping", + "pools" : [ + ], + "super" : "Object", + "type" : "normal" } diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/README.md b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/README.md new file mode 100644 index 0000000..9a24cec --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/README.md @@ -0,0 +1,29 @@ +I am NeoJSONReader. +I am a NeoJSONMapper. +I parse a JSON representation from a textual stream into Smalltalk objects. + +Primitive types are automatically mapped to their Smalltalk counterpart: Numbers, Strings, Booleans and UndefinedObject. +When parsing using #next, lists normally become Arrays and maps become Dictionaries. +An alternative listClass or mapClass can be specified. + +When parsing using #nextAs: a schema can be specified. This schema defines a mapping to be used. + +Here are some examples: + + NeoJSONReader fromString: ' [ 1,2,3 ] '. + NeoJSONReader fromString: ' [ 3.14159, true, false, null, "string" ] '. + NeoJSONReader fromString: ' { "x" : 1, "y" : 2 } '. + + (NeoJSONReader on: ' { "x" : 1, "y" : 2 } ' readStream) + mapInstVarsFor: Point; + nextAs: Point. + + (NeoJSONReader on: '[ { "x" : 1, "y" : 2 }, { "x" : 3, "y" : 4 } ]' readStream) + mapInstVarsFor: Point; + for: #ArrayOfPoints customDo: [ :mapping | + mapping listOfElementSchema: Point ]; + nextAs: #ArrayOfPoints. + + (NeoJSONReader on: '[ { "x" : 1, "y" : 2 }, { "x" : 3, "y" : 4 } ]' readStream) + mapInstVarsFor: Point; + nextListAs: Point. \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/class/exampleCoordinatesCustomParsing.st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/class/exampleCoordinatesCustomParsing.st new file mode 100644 index 0000000..97d95fd --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/class/exampleCoordinatesCustomParsing.st @@ -0,0 +1,9 @@ +example +exampleCoordinatesCustomParsing + + | reader | + reader := self on: self exampleCoordinatesJSON readStream. + reader mapAllInstVarsFor: Point. + reader for: #ArrayOfPoints customDo: [ :mapping | + mapping listOfElementSchema: Point ]. + ^ reader nextAs: #ArrayOfPoints \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/class/exampleCoordinatesGenericParsing.st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/class/exampleCoordinatesGenericParsing.st new file mode 100644 index 0000000..589be20 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/class/exampleCoordinatesGenericParsing.st @@ -0,0 +1,4 @@ +example +exampleCoordinatesGenericParsing + + ^ self fromString: self exampleCoordinatesJSON \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/class/exampleCoordinatesJSON.st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/class/exampleCoordinatesJSON.st new file mode 100644 index 0000000..e0e9360 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/class/exampleCoordinatesJSON.st @@ -0,0 +1,4 @@ +example +exampleCoordinatesJSON + + ^ '[{"x":0,"y":0},{"x":1,"y":2},{"x":2,"y":4},{"x":3,"y":6},{"x":4,"y":8}]' \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/class/fromString..st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/class/fromString..st new file mode 100644 index 0000000..0fe69e0 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/class/fromString..st @@ -0,0 +1,3 @@ +convenience +fromString: string + ^ (self on: string readStream) next \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/class/fromString.as..st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/class/fromString.as..st new file mode 100644 index 0000000..949b95d --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/class/fromString.as..st @@ -0,0 +1,3 @@ +convenience +fromString: string as: schema + ^ (self on: string readStream) nextAs: schema \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/class/on..st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/class/on..st new file mode 100644 index 0000000..31100fa --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/class/on..st @@ -0,0 +1,8 @@ +instance creation +on: readStream + "Initialize on readStream, which should be a character stream that + implements #next, #peek, #atEnd and (optionally) #close." + + ^ self new + on: readStream; + yourself \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/atEnd.st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/atEnd.st new file mode 100644 index 0000000..b761ce7 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/atEnd.st @@ -0,0 +1,3 @@ +testing +atEnd + ^ readStream atEnd \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/close.st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/close.st new file mode 100644 index 0000000..0b2225f --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/close.st @@ -0,0 +1,5 @@ +initialize-release +close + readStream ifNotNil: [ + readStream close. + readStream := nil ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/consumeWhitespace.st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/consumeWhitespace.st new file mode 100644 index 0000000..a40b705 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/consumeWhitespace.st @@ -0,0 +1,7 @@ +private +consumeWhitespace + "Strip whitespaces from the input stream." + + [ readStream atEnd not and: [ readStream peek isSeparator ] ] + whileTrue: [ + readStream next ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/error..st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/error..st new file mode 100644 index 0000000..f9b9bfc --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/error..st @@ -0,0 +1,3 @@ +private +error: text + NeoJSONParseError signal: text \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/expectChar..st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/expectChar..st new file mode 100644 index 0000000..aaa555c --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/expectChar..st @@ -0,0 +1,7 @@ +private +expectChar: character + "Expect character and consume input and optional whitespace at the end, + throw an error otherwise." + + (self matchChar: character) + ifFalse: [ self error: character asString, ' expected' ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/failIfNotAtEnd.st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/failIfNotAtEnd.st new file mode 100644 index 0000000..2db27e9 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/failIfNotAtEnd.st @@ -0,0 +1,4 @@ +parsing +failIfNotAtEnd + self atEnd + ifFalse: [ self error: 'extraneous input detected' ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/initialize.st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/initialize.st new file mode 100644 index 0000000..d8a66ad --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/initialize.st @@ -0,0 +1,4 @@ +initialize-release +initialize + super initialize. + propertyNamesAsSymbols := false \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/listClass..st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/listClass..st new file mode 100644 index 0000000..b4c3791 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/listClass..st @@ -0,0 +1,3 @@ +initialize-release +listClass: collectionClass + listClass := collectionClass \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/listClass.st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/listClass.st new file mode 100644 index 0000000..79121bd --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/listClass.st @@ -0,0 +1,5 @@ +accessing +listClass + "Return the collection type to use for JSON lists" + + ^ listClass ifNil: [ Array ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/mapClass..st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/mapClass..st new file mode 100644 index 0000000..e52f3f3 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/mapClass..st @@ -0,0 +1,3 @@ +initialize-release +mapClass: collectionClass + mapClass := collectionClass \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/mapClass.st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/mapClass.st new file mode 100644 index 0000000..8d9c040 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/mapClass.st @@ -0,0 +1,5 @@ +accessing +mapClass + "Return the collection type to use for JSON maps" + + ^ mapClass ifNil: [ Dictionary ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/match.do..st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/match.do..st new file mode 100644 index 0000000..7109d1b --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/match.do..st @@ -0,0 +1,9 @@ +private +match: string do: block + "Try to read and consume string and execute block if successful. + Else do nothing (but do not back up)" + + (string allSatisfy: [ :each | readStream peekFor: each ]) + ifTrue: [ + self consumeWhitespace. + block value ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/matchChar..st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/matchChar..st new file mode 100644 index 0000000..2b91639 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/matchChar..st @@ -0,0 +1,11 @@ +private +matchChar: character + "Tries to match character, consume input and + answer true if successful and consumes whitespace at the end. + When character does not match, return false and leave stream untouched." + + ^ (readStream peekFor: character) + ifTrue: [ + self consumeWhitespace. + true ] + ifFalse: [ false ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/next.st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/next.st new file mode 100644 index 0000000..e8c5a5c --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/next.st @@ -0,0 +1,8 @@ +accessing +next + "Primary interface to parse a JSON value. + Return either primitives, a listClass or a mapClass instance." + + ^ self + consumeWhitespace; + parseValue \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/nextAs..st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/nextAs..st new file mode 100644 index 0000000..d41ad39 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/nextAs..st @@ -0,0 +1,11 @@ +accessing +nextAs: schema + "Secondary interface to parse JSON. + Return an object according to schema. + If schema is nil, act like #next" + + | mapping | + schema ifNil: [ ^ self next ]. + self consumeWhitespace. + mapping := self mappingFor: schema. + ^ mapping readFrom: self \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/nextListAs..st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/nextListAs..st new file mode 100644 index 0000000..564fd76 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/nextListAs..st @@ -0,0 +1,8 @@ +accessing +nextListAs: schema + "Secondary interface to parse JSON. + Return a list of objects, each element according to schema." + + ^ self listClass streamContents: [ :stream | + self parseListDo: [ + stream nextPut: (self nextAs: schema) ] ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/on..st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/on..st new file mode 100644 index 0000000..d6071ec --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/on..st @@ -0,0 +1,6 @@ +initialize-release +on: aReadStream + "Initialize on aReadStream, which should be a character stream that + implements #next, #peek, #atEnd and (optionally) #close." + + readStream := aReadStream \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacter.st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacter.st new file mode 100644 index 0000000..b71f65f --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacter.st @@ -0,0 +1,14 @@ +parsing +parseCharacter + | char | + (char := readStream next) = $\ + ifFalse: [ ^ char ]. + ('/"\' includes: (char := readStream next)) + ifTrue: [ ^ char ]. + ('bfnrt' includes: char) + ifTrue: [ ^ self unescapeChar: char ]. + char = $u + ifTrue: [ ^ self parseCharacterHex ]. + char + ifNil: [ self error: 'invalid escape, end of file' ] + ifNotNil: [ self error: 'invalid escape character \' , char asString ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacterHex.st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacterHex.st new file mode 100644 index 0000000..1fd5f46 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacterHex.st @@ -0,0 +1,16 @@ +private +parseCharacterHex + | value codePoint | + value := self parseCharacterHex4Value. + (value < 16rD800 or: [ value > 16rDBFF ]) + ifTrue: [ codePoint := value ] + ifFalse: [ | leadSurrogate trailSurrogate | + "Characters not in the Basic Multilingual Plane are encoded as a UTF-16 surrogate pair" + "See https://tools.ietf.org/html/rfc7159#section-7" + leadSurrogate := value. + trailSurrogate := self parseTrailingSurrogateHexEscape. + codePoint := (leadSurrogate - 16rD800) * 16r400 + (trailSurrogate - 16rDC00). + codePoint := 16r10000 + codePoint. + codePoint > 16r10FFFF + ifTrue: [ self error: 'Character Unicode code point outside encoder range' ] ]. + ^ Character codePoint: codePoint \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacterHex4Value.st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacterHex4Value.st new file mode 100644 index 0000000..00ccdc0 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacterHex4Value.st @@ -0,0 +1,7 @@ +private +parseCharacterHex4Value + | value | + value := self parseCharacterHexDigit. + 3 timesRepeat: [ + value := (value << 4) + self parseCharacterHexDigit ]. + ^ value \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacterHexDigit.st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacterHexDigit.st new file mode 100644 index 0000000..0456f7a --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseCharacterHexDigit.st @@ -0,0 +1,13 @@ +private +parseCharacterHexDigit + | digit | + readStream atEnd + ifFalse: [ + digit := readStream next asInteger. + (digit between: "$0" 48 and: "$9" 57) + ifTrue: [ ^ digit - 48 ]. + (digit between: "$A" 65 and: "$F" 70) + ifTrue: [ ^ digit - 55 ]. + (digit between: "$a" 97 and: "$f" 102) + ifTrue: [ ^ digit - 87 ] ]. + self error: 'hex-digit expected' \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseConstantDo..st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseConstantDo..st new file mode 100644 index 0000000..ac998b8 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseConstantDo..st @@ -0,0 +1,15 @@ +private +parseConstantDo: block + "Parse and consume either true|false|nil|null and execute block + or else do nothing (but do not back up). + Hand written implementation to avoid the use of #position:" + + (readStream peek = $t) + ifTrue: [ + ^ self match: 'true' do: [ block value: true ] ]. + (readStream peek = $f) + ifTrue: [ + ^ self match: 'false' do: [ block value: false ] ]. + (readStream peek = $n) + ifTrue: [ + ^ self match: 'null' do: [ block value: nil ] ] diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseList.st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseList.st new file mode 100644 index 0000000..54b9be3 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseList.st @@ -0,0 +1,8 @@ +parsing +parseList + ^ self listClass + streamContents: [ :stream | + self parseListElementsDo: [ :each | + stream nextPut: each ] ] + + \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseListDo..st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseListDo..st new file mode 100644 index 0000000..4eb0a50 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseListDo..st @@ -0,0 +1,13 @@ +parsing +parseListDo: block + self expectChar: $[. + (self matchChar: $]) + ifTrue: [ ^ self ]. + [ readStream atEnd ] + whileFalse: [ + block value. + (self matchChar: $]) + ifTrue: [ ^ self ]. + (self matchChar: $,) + ifFalse: [ self error: ', or ] expected' ] ]. + self error: 'incomplete list' \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseListElementsDo..st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseListElementsDo..st new file mode 100644 index 0000000..015726a --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseListElementsDo..st @@ -0,0 +1,4 @@ +parsing +parseListElementsDo: block + self parseListDo: [ + block value: self parseValue ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseMap.st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseMap.st new file mode 100644 index 0000000..3e841fa --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseMap.st @@ -0,0 +1,7 @@ +parsing +parseMap + | map | + map := self mapClass new. + self parseMapKeysAndValuesDo: [ :key :value | + map at: key put: value ]. + ^ map \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseMapDo..st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseMapDo..st new file mode 100644 index 0000000..df2fdf2 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseMapDo..st @@ -0,0 +1,12 @@ +parsing +parseMapDo: block + self expectChar: ${. + (self matchChar: $}) + ifTrue: [ ^ self ]. + [ readStream atEnd ] whileFalse: [ + block value. + (self matchChar: $}) + ifTrue: [ ^ self ]. + (self matchChar: $,) + ifFalse: [ self error: ', or } expected' ] ]. + self error: 'incomplete map' \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseMapKeysAndValuesDo..st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseMapKeysAndValuesDo..st new file mode 100644 index 0000000..2193008 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseMapKeysAndValuesDo..st @@ -0,0 +1,4 @@ +parsing +parseMapKeysAndValuesDo: block + self parseMapKeysDo: [ :key | + block value: key value: self parseValue ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseMapKeysDo..st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseMapKeysDo..st new file mode 100644 index 0000000..e55020e --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseMapKeysDo..st @@ -0,0 +1,6 @@ +parsing +parseMapKeysDo: block + self parseMapDo: [ | key | + key := self parsePropertyName. + self expectChar: $:. + block value: key ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseNumber.st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseNumber.st new file mode 100644 index 0000000..969af72 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseNumber.st @@ -0,0 +1,15 @@ +parsing +parseNumber + | negated number isFloat | + negated := readStream peekFor: $-. + number := self parseNumberInteger. + isFloat := (readStream peekFor: $.) + ifTrue: [ number := number + self parseNumberFraction. true ] + ifFalse: [ false ]. + ((readStream peekFor: $e) or: [ readStream peekFor: $E ]) + ifTrue: [ number := number * self parseNumberExponent ]. + isFloat ifTrue: [ number := number asFloat ]. + negated + ifTrue: [ number := number negated ]. + self consumeWhitespace. + ^ number \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseNumberExponent.st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseNumberExponent.st new file mode 100644 index 0000000..e5a310a --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseNumberExponent.st @@ -0,0 +1,16 @@ +parsing +parseNumberExponent + | number negated | + number := 0. + (negated := readStream peekFor: $-) + ifFalse: [ readStream peekFor: $+ ]. + (readStream atEnd or: [ readStream peek isDigit not ]) + ifTrue: [ self error: 'number exponent expected' ]. + [ readStream atEnd not and: [ readStream peek isDigit ] ] + whileTrue: [ number := 10 * number + readStream next digitValue ]. + negated + ifTrue: [ number := number negated ]. + number positive + ifTrue: [ number > Float emax ifTrue: [ self error: 'number exponent too large' ] ] + ifFalse: [ number < Float emin ifTrue: [ self error: 'number exponent too small' ] ]. + ^ 10 raisedTo: number \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseNumberFraction.st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseNumberFraction.st new file mode 100644 index 0000000..40f2d92 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseNumberFraction.st @@ -0,0 +1,10 @@ +parsing +parseNumberFraction + | number power | + number := 0. + power := 1. + [ readStream atEnd not and: [ readStream peek isDigit ] ] + whileTrue: [ + number := 10 * number + readStream next digitValue. + power := power * 10 ]. + ^ number / power \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseNumberInteger.st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseNumberInteger.st new file mode 100644 index 0000000..a4b8941 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseNumberInteger.st @@ -0,0 +1,9 @@ +parsing +parseNumberInteger + | number | + number := nil. + [ readStream atEnd not and: [ readStream peek isDigit ] ] + whileTrue: [ + number := 10 * (number ifNil: [ 0 ]) + readStream next digitValue ]. + number ifNil: [ self error: 'Integer digit expected' ]. + ^ number \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parsePropertyName.st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parsePropertyName.st new file mode 100644 index 0000000..912f789 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parsePropertyName.st @@ -0,0 +1,11 @@ +parsing +parsePropertyName + | name | + name := self parseValue. + ^ name isString + ifTrue: [ + propertyNamesAsSymbols + ifTrue: [ name asSymbol ] + ifFalse: [ name ] ] + ifFalse: [ + self error: 'property name must be a string, not ', name asString ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseString.st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseString.st new file mode 100644 index 0000000..ea36a0f --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseString.st @@ -0,0 +1,10 @@ +parsing +parseString + | result | + (readStream peekFor: $") + ifFalse: [ self error: '" expected' ]. + result := self stringStreamContents: [ :stream | + [ readStream atEnd or: [ readStream peek = $" ] ] + whileFalse: [ stream nextPut: self parseCharacter ] ]. + self expectChar: $". + ^ result \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseTrailingSurrogateHexEscape.st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseTrailingSurrogateHexEscape.st new file mode 100644 index 0000000..00fbbda --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseTrailingSurrogateHexEscape.st @@ -0,0 +1,5 @@ +private +parseTrailingSurrogateHexEscape + (readStream next = $\ and: [ readStream next = $u ]) + ifTrue: [ ^ self parseCharacterHex4Value ] + ifFalse: [ self error: 'trailing surrogate hex escape expected' ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseValue.st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseValue.st new file mode 100644 index 0000000..8cba65c --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseValue.st @@ -0,0 +1,15 @@ +parsing +parseValue + | char | + readStream atEnd ifFalse: [ + char := readStream peek. + char = ${ + ifTrue: [ ^ self parseMap ]. + char = $[ + ifTrue: [ ^ self parseList ]. + char = $" + ifTrue: [ ^ self parseString ]. + (char = $- or: [ char isDigit ]) + ifTrue: [ ^ self parseNumber ]. + self parseConstantDo: [ :value | ^ value ] ]. + self error: 'invalid input: ', char asString \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/propertyNamesAsSymbols..st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/propertyNamesAsSymbols..st new file mode 100644 index 0000000..4cd6d5e --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/propertyNamesAsSymbols..st @@ -0,0 +1,3 @@ +initialize-release +propertyNamesAsSymbols: boolean + propertyNamesAsSymbols := boolean \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/stringStreamClass.st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/stringStreamClass.st new file mode 100644 index 0000000..ea6c8ee --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/stringStreamClass.st @@ -0,0 +1,8 @@ +private +stringStreamClass + "Answer the class of the collection used for the stringStream of receiver. + + NOTE: It is String, but if receiver's readStream is over + another class of String, then this provides compatibility for that." + + ^ readStream collectionSpecies \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/stringStreamContents..st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/stringStreamContents..st new file mode 100644 index 0000000..0d6ac01 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/stringStreamContents..st @@ -0,0 +1,10 @@ +private +stringStreamContents: block + "Like String streamContents: block + but reusing the underlying buffer for improved efficiency" + + stringStream ifNil: [ + stringStream := (self stringStreamClass new: 32) writeStream ]. + stringStream reset. + block value: stringStream. + ^ stringStream contents \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/unescapeChar..st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/unescapeChar..st new file mode 100644 index 0000000..a07a9f5 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/unescapeChar..st @@ -0,0 +1,15 @@ +private +unescapeChar: char + "Handle one of the named character escapes, b, f, n, r or t. Else fail." + + char = $b + ifTrue: [ ^ Character backspace ]. + char = $f + ifTrue: [ ^ Character newPage ]. + char = $n + ifTrue: [ ^ Character lf ]. + char = $r + ifTrue: [ ^ Character cr ]. + char = $t + ifTrue: [ ^ Character tab ]. + self error: 'Unknown escape char: ', (String with: char) \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/upToEnd.st b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/upToEnd.st new file mode 100644 index 0000000..7b944ef --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/instance/upToEnd.st @@ -0,0 +1,8 @@ +accessing +upToEnd + "Parse and collect JSON values from my stream until it ends, returning the collection. + This supports Newline delimited JSON (application/x-ndjson) & JSON Lines (application/jsonl). + Warning: though each element is valid JSON, taken as a whole the result is non-valid JSON." + + ^ Array streamContents: [ :out | + [ self atEnd ] whileFalse: [ out nextPut: self next ] ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONReader.class/properties.json b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/properties.json new file mode 100644 index 0000000..74a8182 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONReader.class/properties.json @@ -0,0 +1,18 @@ +{ + "category" : "Neo-JSON-Core", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + "readStream", + "stringStream", + "listClass", + "mapClass", + "propertyNamesAsSymbols" ], + "name" : "NeoJSONReader", + "pools" : [ + ], + "super" : "NeoJSONMapper", + "type" : "normal" } diff --git a/filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/README.md b/filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/README.md new file mode 100644 index 0000000..0c90034 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/README.md @@ -0,0 +1,4 @@ +I am NeoJSONStreamingWriter. +I help in writing streamed maps and lists. + +This is an internal class used by NeoJSONWriter to deal with interleaving elements and separators as well as pretty printing. \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/class/on..st b/filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/class/on..st new file mode 100644 index 0000000..bb5f485 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/class/on..st @@ -0,0 +1,5 @@ +instance creation +on: jsonWriter + ^ self new + on: jsonWriter; + yourself \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/initialize.st b/filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/initialize.st new file mode 100644 index 0000000..a0c1206 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/initialize.st @@ -0,0 +1,4 @@ +initialize-release +initialize + super initialize. + first := true \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/on..st b/filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/on..st new file mode 100644 index 0000000..69247ab --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/on..st @@ -0,0 +1,3 @@ +initialize-release +on: aJSONWriter + jsonWriter := aJSONWriter \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/wasUsed.st b/filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/wasUsed.st new file mode 100644 index 0000000..07306d2 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/wasUsed.st @@ -0,0 +1,3 @@ +testing +wasUsed + ^ first not \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeElement..st b/filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeElement..st new file mode 100644 index 0000000..f3ea4f8 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeElement..st @@ -0,0 +1,9 @@ +writing +writeElement: value + first + ifTrue: [ + jsonWriter newlineIndent. + first := false ] + ifFalse: [ + jsonWriter listElementSeparator ]. + jsonWriter nextPut: value \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeElement.as..st b/filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeElement.as..st new file mode 100644 index 0000000..e3c7106 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeElement.as..st @@ -0,0 +1,9 @@ +writing +writeElement: value as: valueSchema + first + ifTrue: [ + jsonWriter newlineIndent. + first := false ] + ifFalse: [ + jsonWriter listElementSeparator ]. + jsonWriter nextPut: value as: valueSchema \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeKey.value..st b/filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeKey.value..st new file mode 100644 index 0000000..1534966 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeKey.value..st @@ -0,0 +1,9 @@ +writing +writeKey: key value: value + first + ifTrue: [ + jsonWriter newlineIndent. + first := false ] + ifFalse: [ + jsonWriter mapElementSeparator ]. + jsonWriter encodeKey: key value: value \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeKey.value.as..st b/filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeKey.value.as..st new file mode 100644 index 0000000..5fdc025 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeKey.value.as..st @@ -0,0 +1,9 @@ +writing +writeKey: key value: value as: valueSchema + first + ifTrue: [ + jsonWriter newlineIndent. + first := false ] + ifFalse: [ + jsonWriter mapElementSeparator ]. + jsonWriter encodeKey: key value: value as: valueSchema \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeNil.st b/filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeNil.st new file mode 100644 index 0000000..eb17c6d --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/instance/writeNil.st @@ -0,0 +1,3 @@ +accessing +writeNil + ^ jsonWriter writeNil \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/properties.json b/filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/properties.json new file mode 100644 index 0000000..af4ad5a --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONStreamingWriter.class/properties.json @@ -0,0 +1,15 @@ +{ + "category" : "Neo-JSON-Core", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + "jsonWriter", + "first" ], + "name" : "NeoJSONStreamingWriter", + "pools" : [ + ], + "super" : "Object", + "type" : "normal" } diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/README.md b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/README.md new file mode 100644 index 0000000..e3ae21c --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/README.md @@ -0,0 +1,22 @@ +I am NeoJSONWriter. +I am a NeoJSONMapper. +I write a JSON representation of Smalltalk objects to a textual stream. + +Objects implementing #neoJsonOn: can be encoded. +A number of primitive types, like Strings, Numbers, Booleans and UndefinedObject are treated specially. +Collection are encoded as lists, except for Dictionaries that are encoded as maps. + +All other objects need a mapping to help in doing the encoding. + +Here are some examples: + + NeoJSONWriter toString: #(1 2 3). + NeoJSONWriter toString: { Float pi. true. false. 'string' }. + NeoJSONWriter toStringPretty: (Dictionary new at: #x put: 1; at: #y put: 2; yourself). + + String streamContents: [ :stream | + (NeoJSONWriter on: stream) + prettyPrint: true; + mapInstVarsFor: Point; + nextPut: (Array with: 1@3 with: -1@3) ]. + \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/class/exampleCoordinates.st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/class/exampleCoordinates.st new file mode 100644 index 0000000..a8b7656 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/class/exampleCoordinates.st @@ -0,0 +1,4 @@ +example +exampleCoordinates + + ^ { 0@0 . 1@2. 2@4. 3@6 . 4@8} \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/class/exampleCoordinatesCustomWriting.st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/class/exampleCoordinatesCustomWriting.st new file mode 100644 index 0000000..968cc9e --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/class/exampleCoordinatesCustomWriting.st @@ -0,0 +1,8 @@ +example +exampleCoordinatesCustomWriting + + ^ String streamContents: [ :out | + | writer | + writer := self on: out. + writer mapAllInstVarsFor: Point. + writer nextPut: self exampleCoordinates ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/class/exampleCoordinatesGeneric.st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/class/exampleCoordinatesGeneric.st new file mode 100644 index 0000000..83f9226 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/class/exampleCoordinatesGeneric.st @@ -0,0 +1,4 @@ +example +exampleCoordinatesGeneric + + ^ (0 to: 4) collect: [ :each | { 'x' -> each . 'y' -> (each * 2) } asDictionary ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/class/exampleCoordinatesGenericWriting.st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/class/exampleCoordinatesGenericWriting.st new file mode 100644 index 0000000..704ec66 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/class/exampleCoordinatesGenericWriting.st @@ -0,0 +1,4 @@ +example +exampleCoordinatesGenericWriting + + ^ self toString: self exampleCoordinatesGeneric \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/class/on..st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/class/on..st new file mode 100644 index 0000000..e2fd9e0 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/class/on..st @@ -0,0 +1,8 @@ +instance creation +on: writeStream + "Initialize on writeStream, which should be a character stream that + implements #nextPut:, #nextPutAll:, #space and (optionally) #close." + + ^ self new + on: writeStream; + yourself \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/class/toString..st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/class/toString..st new file mode 100644 index 0000000..02c72ef --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/class/toString..st @@ -0,0 +1,4 @@ +convenience +toString: object + ^ String streamContents: [ :stream | + (self on: stream) nextPut: object ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/class/toStringPretty..st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/class/toStringPretty..st new file mode 100644 index 0000000..f088ef2 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/class/toStringPretty..st @@ -0,0 +1,6 @@ +convenience +toStringPretty: object + ^ String streamContents: [ :stream | + (self on: stream) + prettyPrint: true; + nextPut: object ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/asciiOnly..st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/asciiOnly..st new file mode 100644 index 0000000..14b2730 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/asciiOnly..st @@ -0,0 +1,5 @@ +initialize-release +asciiOnly: boolean + "Set whether I should escape all non ASCII characters or not" + + asciiOnly := boolean \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/close.st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/close.st new file mode 100644 index 0000000..73b1b7d --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/close.st @@ -0,0 +1,7 @@ +initialize-release +close + "Close the stream that I write to" + + writeStream ifNotNil: [ + writeStream close. + writeStream := nil ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/doesCodePointNeedEscaping..st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/doesCodePointNeedEscaping..st new file mode 100644 index 0000000..5b8c464 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/doesCodePointNeedEscaping..st @@ -0,0 +1,5 @@ +private +doesCodePointNeedEscaping: code + code < 32 ifTrue: [ ^ true ]. + ( code = 34 or: [ code = 92 ]) ifTrue: [ ^ true ]. + ^ asciiOnly and: [ code > 126 ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/encodeChar..st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/encodeChar..st new file mode 100644 index 0000000..9b11d82 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/encodeChar..st @@ -0,0 +1,7 @@ +private +encodeChar: char + | code | + code := char codePoint. + (self doesCodePointNeedEscaping: code) + ifTrue: [ self escapeChar: code ] + ifFalse: [ writeStream nextPut: char ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/encodeKey..st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/encodeKey..st new file mode 100644 index 0000000..6b9ae2d --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/encodeKey..st @@ -0,0 +1,7 @@ +private +encodeKey: key + key isString ifFalse: [ ^ self error: 'JSON key names in objects must be strings' ]. + self nextPut: key. + self prettyPrintSpace. + writeStream nextPut: $:. + self prettyPrintSpace \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/encodeKey.value..st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/encodeKey.value..st new file mode 100644 index 0000000..e6faeff --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/encodeKey.value..st @@ -0,0 +1,4 @@ +private +encodeKey: key value: value + self encodeKey: key. + self nextPut: value \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/encodeKey.value.as..st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/encodeKey.value.as..st new file mode 100644 index 0000000..0a83859 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/encodeKey.value.as..st @@ -0,0 +1,4 @@ +private +encodeKey: key value: value as: valueSchema + self encodeKey: key. + self nextPut: value as: valueSchema \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/escapeChar..st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/escapeChar..st new file mode 100644 index 0000000..fdedb11 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/escapeChar..st @@ -0,0 +1,19 @@ +private +escapeChar: code + code = 34 + ifTrue: [ ^ writeStream nextPutAll: '\"' ]. + code = 92 + ifTrue: [ ^ writeStream nextPutAll: '\\' ]. + code = 47 + ifTrue: [ ^ writeStream nextPutAll: '\/' ]. + code = 8 + ifTrue: [ ^ writeStream nextPutAll: '\b' ]. + code = 12 + ifTrue: [ ^ writeStream nextPutAll: '\f' ]. + code = 10 + ifTrue: [ ^ writeStream nextPutAll: '\n' ]. + code = 13 + ifTrue: [ ^ writeStream nextPutAll: '\r' ]. + code = 9 + ifTrue: [ ^ writeStream nextPutAll: '\t' ]. + self escapeUnicode: code \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/escapeUnicode..st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/escapeUnicode..st new file mode 100644 index 0000000..702458f --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/escapeUnicode..st @@ -0,0 +1,15 @@ +private +escapeUnicode: codePoint + codePoint <= 16rFFFF + ifTrue: [ self escapeUnicode4: codePoint ] + ifFalse: [ + codePoint <= 16r10FFFF + ifTrue: [ | leadSurrogate trailSurrogate shifted | + "Characters not in the Basic Multilingual Plane are encoded as a UTF-16 surrogate pair" + "See https://tools.ietf.org/html/rfc7159#section-7" + shifted := codePoint - 16r10000. + leadSurrogate := 16rD800 + (shifted // 16r400). + trailSurrogate := 16rDC00 + (shifted \\ 16r400). + self escapeUnicode4: leadSurrogate. + self escapeUnicode4: trailSurrogate ] + ifFalse: [ self error: 'Character Unicode code point outside encoder range' ] ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/escapeUnicode4..st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/escapeUnicode4..st new file mode 100644 index 0000000..0bfa39c --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/escapeUnicode4..st @@ -0,0 +1,4 @@ +private +escapeUnicode4: codePoint + writeStream nextPutAll: '\u'. + codePoint printOn: writeStream base: 16 nDigits: 4 \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/floatPrinter..st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/floatPrinter..st new file mode 100644 index 0000000..6ae72af --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/floatPrinter..st @@ -0,0 +1,6 @@ +initialize-release +floatPrinter: anObject + "Set the float print, an object that implements #printFloat:on: + By default, I am my own float printer" + + floatPrinter := anObject \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/indentedDo..st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/indentedDo..st new file mode 100644 index 0000000..c1d5260 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/indentedDo..st @@ -0,0 +1,5 @@ +private +indentedDo: block + level := level + 1. + block value. + level := level - 1 \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/initialize.st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/initialize.st new file mode 100644 index 0000000..11954cf --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/initialize.st @@ -0,0 +1,9 @@ +initialize-release +initialize + super initialize. + self newLine: OSPlatform current lineEnding. + self prettyPrint: false. + self asciiOnly: false. + self writeNil: false. + self floatPrinter: self. + level := 0 \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/listElementSeparator.st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/listElementSeparator.st new file mode 100644 index 0000000..62af1c2 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/listElementSeparator.st @@ -0,0 +1,4 @@ +private +listElementSeparator + writeStream nextPut: $,. + self newlineIndent diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/mapElementSeparator.st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/mapElementSeparator.st new file mode 100644 index 0000000..c3c5a99 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/mapElementSeparator.st @@ -0,0 +1,4 @@ +private +mapElementSeparator + writeStream nextPut: $,. + self newlineIndent diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/newLine..st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/newLine..st new file mode 100644 index 0000000..16be4fb --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/newLine..st @@ -0,0 +1,5 @@ +initialize-release +newLine: string + "Set the newline string that I should use when pretty printing" + + newLine := string \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/newline.st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/newline.st new file mode 100644 index 0000000..3e5a509 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/newline.st @@ -0,0 +1,6 @@ +accessing +newline + "Write a newline on the stream that I wrap. + What gets written depends on the configuration, see #newLine:" + + writeStream nextPutAll: newLine \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/newlineIndent.st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/newlineIndent.st new file mode 100644 index 0000000..26798b9 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/newlineIndent.st @@ -0,0 +1,6 @@ +private +newlineIndent + prettyPrint + ifTrue: [ + self newline. + level timesRepeat: [ writeStream nextPut: Character tab ] ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/nextPut..st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/nextPut..st new file mode 100644 index 0000000..3bee296 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/nextPut..st @@ -0,0 +1,5 @@ +accessing +nextPut: anObject + "Primary interface. Write a JSON representation of anObject to my stream." + + anObject neoJsonOn: self \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/nextPut.as..st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/nextPut.as..st new file mode 100644 index 0000000..e13f80c --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/nextPut.as..st @@ -0,0 +1,9 @@ +accessing +nextPut: anObject as: schema + "Secondary interface to write JSON. + Write objects according to schema." + + | mapping | + (schema isNil or: [ anObject isNil ]) ifTrue: [ ^ self nextPut: anObject ]. + mapping := self mappingFor: schema. + ^ mapping writeObject: anObject on: self \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/nextPutAll..st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/nextPutAll..st new file mode 100644 index 0000000..37eff36 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/nextPutAll..st @@ -0,0 +1,9 @@ +accessing +nextPutAll: aCollection + "Write a separate JSON representation of all objects in aCollection to my stream. + This supports Newline delimited JSON (application/x-ndjson) & JSON Lines (application/jsonl). + Warning: though each element is valid JSON, taken as a whole the result is non-valid JSON." + + aCollection do: [ :each | + self nextPut: each. + self newline ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/on..st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/on..st new file mode 100644 index 0000000..cf995e3 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/on..st @@ -0,0 +1,6 @@ +initialize-release +on: aWriteStream + "Initialize on aWriteStream, which should be a character stream that + implements #nextPut:, #nextPutAll:, #space and (optionally) #close." + + writeStream := aWriteStream diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/prettyPrint..st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/prettyPrint..st new file mode 100644 index 0000000..4f00d06 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/prettyPrint..st @@ -0,0 +1,5 @@ +initialize-release +prettyPrint: boolean + "Set whether I should pretty print the JSON that I write" + + prettyPrint := boolean \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/prettyPrintSpace.st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/prettyPrintSpace.st new file mode 100644 index 0000000..29fc223 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/prettyPrintSpace.st @@ -0,0 +1,4 @@ +private +prettyPrintSpace + prettyPrint + ifTrue: [ writeStream nextPut: Character space ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/printFloat.on..st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/printFloat.on..st new file mode 100644 index 0000000..49035bb --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/printFloat.on..st @@ -0,0 +1,5 @@ +printing +printFloat: float on: stream + "See NeoJSONFloatPrinter for a custom float printer" + + float printOn: stream \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeBoolean..st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeBoolean..st new file mode 100644 index 0000000..873bfee --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeBoolean..st @@ -0,0 +1,3 @@ +writing +writeBoolean: boolean + boolean printOn: writeStream \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeFloat..st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeFloat..st new file mode 100644 index 0000000..7006032 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeFloat..st @@ -0,0 +1,3 @@ +writing +writeFloat: float + floatPrinter printFloat: float on: writeStream \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeInteger..st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeInteger..st new file mode 100644 index 0000000..7140a2c --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeInteger..st @@ -0,0 +1,4 @@ +writing +writeInteger: integer + integer printOn: writeStream + \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeList..st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeList..st new file mode 100644 index 0000000..b61e5e7 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeList..st @@ -0,0 +1,5 @@ +writing +writeList: collection + self writeListStreamingDo: [ :jsonListWriter | + collection do: [ :each | + jsonListWriter writeElement: each ] ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeListStreamingDo..st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeListStreamingDo..st new file mode 100644 index 0000000..b5e2d9c --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeListStreamingDo..st @@ -0,0 +1,5 @@ +writing +writeListStreamingDo: block + writeStream nextPut: $[. + self writeStreamingDo: block. + writeStream nextPut: $] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeMap..st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeMap..st new file mode 100644 index 0000000..316dd54 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeMap..st @@ -0,0 +1,5 @@ +writing +writeMap: keyValueCollection + self writeMapStreamingDo: [ :jsonMapWriter | + keyValueCollection keysAndValuesDo: [ :key :value | + jsonMapWriter writeKey: key value: value ] ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeMapStreamingDo..st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeMapStreamingDo..st new file mode 100644 index 0000000..398c8de --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeMapStreamingDo..st @@ -0,0 +1,5 @@ +writing +writeMapStreamingDo: block + writeStream nextPut: ${. + self writeStreamingDo: block. + writeStream nextPut: $} \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeNil..st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeNil..st new file mode 100644 index 0000000..c51986c --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeNil..st @@ -0,0 +1,5 @@ +initialize-release +writeNil: boolean + "Set whether I will write nil/null properties of objects or skip them." + + writeNil := boolean \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeNil.st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeNil.st new file mode 100644 index 0000000..f6d78d5 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeNil.st @@ -0,0 +1,5 @@ +accessing +writeNil + "Return whether I will write nil/null properties of objects or skip them." + + ^ writeNil \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeNull.st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeNull.st new file mode 100644 index 0000000..3847bad --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeNull.st @@ -0,0 +1,3 @@ +writing +writeNull + writeStream nextPutAll: 'null' \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeObject..st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeObject..st new file mode 100644 index 0000000..50b89ce --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeObject..st @@ -0,0 +1,7 @@ +writing +writeObject: anObject + | mapping | + mapping := self mappingFor: anObject class. + mapping + writeObject: anObject + on: self \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeStreamingDo..st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeStreamingDo..st new file mode 100644 index 0000000..57ef9d9 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeStreamingDo..st @@ -0,0 +1,9 @@ +writing +writeStreamingDo: block + | mapWriter | + mapWriter := NeoJSONStreamingWriter on: self. + self indentedDo: [ + block value: mapWriter ]. + mapWriter wasUsed + ifTrue: [ self newlineIndent ] + ifFalse: [ self prettyPrintSpace ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeString..st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeString..st new file mode 100644 index 0000000..e2107ed --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeString..st @@ -0,0 +1,6 @@ +writing +writeString: string + writeStream nextPut: $". + 1 to: string size do: [ :index | + self encodeChar: (string at: index) ]. + writeStream nextPut: $" \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/properties.json b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/properties.json new file mode 100644 index 0000000..dc270f6 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/properties.json @@ -0,0 +1,20 @@ +{ + "category" : "Neo-JSON-Core", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + "writeStream", + "prettyPrint", + "level", + "newLine", + "asciiOnly", + "writeNil", + "floatPrinter" ], + "name" : "NeoJSONWriter", + "pools" : [ + ], + "super" : "NeoJSONMapper", + "type" : "normal" } diff --git a/filetree/Neo-JSON-Core.package/Number.extension/instance/neoJsonOn..st b/filetree/Neo-JSON-Core.package/Number.extension/instance/neoJsonOn..st new file mode 100644 index 0000000..92d21e4 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/Number.extension/instance/neoJsonOn..st @@ -0,0 +1,3 @@ +*neo-json-core +neoJsonOn: neoJSONWriter + neoJSONWriter writeFloat: self asFloat \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/Number.extension/properties.json b/filetree/Neo-JSON-Core.package/Number.extension/properties.json new file mode 100644 index 0000000..1d2c94d --- /dev/null +++ b/filetree/Neo-JSON-Core.package/Number.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "Number" } diff --git a/filetree/Neo-JSON-Core.package/Object.extension/instance/neoJsonOn..st b/filetree/Neo-JSON-Core.package/Object.extension/instance/neoJsonOn..st new file mode 100644 index 0000000..7cf491c --- /dev/null +++ b/filetree/Neo-JSON-Core.package/Object.extension/instance/neoJsonOn..st @@ -0,0 +1,3 @@ +*neo-json-core +neoJsonOn: neoJSONWriter + neoJSONWriter writeObject: self \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/Object.extension/properties.json b/filetree/Neo-JSON-Core.package/Object.extension/properties.json new file mode 100644 index 0000000..3d3b9ec --- /dev/null +++ b/filetree/Neo-JSON-Core.package/Object.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "Object" } diff --git a/filetree/Neo-JSON-Core.package/String.extension/instance/neoJsonOn..st b/filetree/Neo-JSON-Core.package/String.extension/instance/neoJsonOn..st new file mode 100644 index 0000000..b41f066 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/String.extension/instance/neoJsonOn..st @@ -0,0 +1,3 @@ +*neo-json-core +neoJsonOn: neoJSONWriter + neoJSONWriter writeString: self \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/String.extension/properties.json b/filetree/Neo-JSON-Core.package/String.extension/properties.json new file mode 100644 index 0000000..c213850 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/String.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "String" } diff --git a/filetree/Neo-JSON-Core.package/UndefinedObject.extension/instance/neoJsonOn..st b/filetree/Neo-JSON-Core.package/UndefinedObject.extension/instance/neoJsonOn..st new file mode 100644 index 0000000..3d0cf7b --- /dev/null +++ b/filetree/Neo-JSON-Core.package/UndefinedObject.extension/instance/neoJsonOn..st @@ -0,0 +1,3 @@ +*neo-json-core +neoJsonOn: neoJSONWriter + neoJSONWriter writeNull \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/UndefinedObject.extension/properties.json b/filetree/Neo-JSON-Core.package/UndefinedObject.extension/properties.json new file mode 100644 index 0000000..508a24a --- /dev/null +++ b/filetree/Neo-JSON-Core.package/UndefinedObject.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "UndefinedObject" } diff --git a/filetree/Neo-JSON-Core.package/properties.json b/filetree/Neo-JSON-Core.package/properties.json new file mode 100644 index 0000000..a097c63 --- /dev/null +++ b/filetree/Neo-JSON-Core.package/properties.json @@ -0,0 +1,2 @@ +{ + } \ No newline at end of file diff --git a/filetree/Neo-JSON-Pharo-Core.package/.filetree b/filetree/Neo-JSON-Pharo-Core.package/.filetree new file mode 100644 index 0000000..8998102 --- /dev/null +++ b/filetree/Neo-JSON-Pharo-Core.package/.filetree @@ -0,0 +1,4 @@ +{ + "noMethodMetaData" : true, + "separateMethodMetaAndSource" : false, + "useCypressPropertiesFile" : true } diff --git a/filetree/Neo-JSON-Pharo-Core.package/OrderedDictionary.extension/instance/neoJsonOn..st b/filetree/Neo-JSON-Pharo-Core.package/OrderedDictionary.extension/instance/neoJsonOn..st new file mode 100644 index 0000000..61a9c65 --- /dev/null +++ b/filetree/Neo-JSON-Pharo-Core.package/OrderedDictionary.extension/instance/neoJsonOn..st @@ -0,0 +1,3 @@ +*neo-json-pharo-core +neoJsonOn: neoJSONWriter + neoJSONWriter writeMap: self \ No newline at end of file diff --git a/filetree/Neo-JSON-Pharo-Core.package/OrderedDictionary.extension/properties.json b/filetree/Neo-JSON-Pharo-Core.package/OrderedDictionary.extension/properties.json new file mode 100644 index 0000000..63f7607 --- /dev/null +++ b/filetree/Neo-JSON-Pharo-Core.package/OrderedDictionary.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "OrderedDictionary" } diff --git a/filetree/Neo-JSON-Pharo-Core.package/SmallDictionary.extension/instance/neoJsonOn..st b/filetree/Neo-JSON-Pharo-Core.package/SmallDictionary.extension/instance/neoJsonOn..st new file mode 100644 index 0000000..61a9c65 --- /dev/null +++ b/filetree/Neo-JSON-Pharo-Core.package/SmallDictionary.extension/instance/neoJsonOn..st @@ -0,0 +1,3 @@ +*neo-json-pharo-core +neoJsonOn: neoJSONWriter + neoJSONWriter writeMap: self \ No newline at end of file diff --git a/filetree/Neo-JSON-Pharo-Core.package/SmallDictionary.extension/properties.json b/filetree/Neo-JSON-Pharo-Core.package/SmallDictionary.extension/properties.json new file mode 100644 index 0000000..82b9f93 --- /dev/null +++ b/filetree/Neo-JSON-Pharo-Core.package/SmallDictionary.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "SmallDictionary" } diff --git a/filetree/Neo-JSON-Pharo-Core.package/properties.json b/filetree/Neo-JSON-Pharo-Core.package/properties.json new file mode 100644 index 0000000..a097c63 --- /dev/null +++ b/filetree/Neo-JSON-Pharo-Core.package/properties.json @@ -0,0 +1,2 @@ +{ + } \ No newline at end of file diff --git a/filetree/Neo-JSON-Pharo-Examples.package/.filetree b/filetree/Neo-JSON-Pharo-Examples.package/.filetree new file mode 100644 index 0000000..8998102 --- /dev/null +++ b/filetree/Neo-JSON-Pharo-Examples.package/.filetree @@ -0,0 +1,4 @@ +{ + "noMethodMetaData" : true, + "separateMethodMetaAndSource" : false, + "useCypressPropertiesFile" : true } diff --git a/filetree/Neo-JSON-Pharo-Examples.package/Attachment.class/README.md b/filetree/Neo-JSON-Pharo-Examples.package/Attachment.class/README.md new file mode 100644 index 0000000..e69de29 diff --git a/filetree/Neo-JSON-Pharo-Examples.package/Attachment.class/instance/fileName..st b/filetree/Neo-JSON-Pharo-Examples.package/Attachment.class/instance/fileName..st new file mode 100644 index 0000000..3966e08 --- /dev/null +++ b/filetree/Neo-JSON-Pharo-Examples.package/Attachment.class/instance/fileName..st @@ -0,0 +1,3 @@ +accessing +fileName: anObject + fileName := anObject \ No newline at end of file diff --git a/filetree/Neo-JSON-Pharo-Examples.package/Attachment.class/instance/url..st b/filetree/Neo-JSON-Pharo-Examples.package/Attachment.class/instance/url..st new file mode 100644 index 0000000..ca05f95 --- /dev/null +++ b/filetree/Neo-JSON-Pharo-Examples.package/Attachment.class/instance/url..st @@ -0,0 +1,3 @@ +accessing +url: anObject + url := anObject \ No newline at end of file diff --git a/filetree/Neo-JSON-Pharo-Examples.package/Attachment.class/properties.json b/filetree/Neo-JSON-Pharo-Examples.package/Attachment.class/properties.json new file mode 100644 index 0000000..2b7c07f --- /dev/null +++ b/filetree/Neo-JSON-Pharo-Examples.package/Attachment.class/properties.json @@ -0,0 +1,15 @@ +{ + "category" : "Neo-JSON-Pharo-Examples", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + "url", + "fileName" ], + "name" : "Attachment", + "pools" : [ + ], + "super" : "Object", + "type" : "normal" } diff --git a/filetree/Neo-JSON-Pharo-Examples.package/BittrexResponse.class/README.md b/filetree/Neo-JSON-Pharo-Examples.package/BittrexResponse.class/README.md new file mode 100644 index 0000000..e69de29 diff --git a/filetree/Neo-JSON-Pharo-Examples.package/BittrexResponse.class/properties.json b/filetree/Neo-JSON-Pharo-Examples.package/BittrexResponse.class/properties.json new file mode 100644 index 0000000..10c13ec --- /dev/null +++ b/filetree/Neo-JSON-Pharo-Examples.package/BittrexResponse.class/properties.json @@ -0,0 +1,16 @@ +{ + "category" : "Neo-JSON-Pharo-Examples", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + "success", + "message", + "result" ], + "name" : "BittrexResponse", + "pools" : [ + ], + "super" : "Object", + "type" : "normal" } diff --git a/filetree/Neo-JSON-Pharo-Examples.package/Market.class/README.md b/filetree/Neo-JSON-Pharo-Examples.package/Market.class/README.md new file mode 100644 index 0000000..e69de29 diff --git a/filetree/Neo-JSON-Pharo-Examples.package/Market.class/properties.json b/filetree/Neo-JSON-Pharo-Examples.package/Market.class/properties.json new file mode 100644 index 0000000..12a8842 --- /dev/null +++ b/filetree/Neo-JSON-Pharo-Examples.package/Market.class/properties.json @@ -0,0 +1,24 @@ +{ + "category" : "Neo-JSON-Pharo-Examples", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + "MarketCurrency", + "BaseCurrency", + "MarketCurrencyLong", + "BaseCurrencyLong", + "MinTradeSize", + "MarketName", + "IsActive", + "Created", + "Notice", + "IsSponsored", + "LogoUrl" ], + "name" : "Market", + "pools" : [ + ], + "super" : "Object", + "type" : "normal" } diff --git a/filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/README.md b/filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/README.md new file mode 100644 index 0000000..e69de29 diff --git a/filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testAccessingTheNewYorkPublicLibrary.st b/filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testAccessingTheNewYorkPublicLibrary.st new file mode 100644 index 0000000..5ba6501 --- /dev/null +++ b/filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testAccessingTheNewYorkPublicLibrary.st @@ -0,0 +1,13 @@ +tests +testAccessingTheNewYorkPublicLibrary + + | client reader data networkStream | + (client := ZnClient new) + streaming: true; + url: 'https://github.com/NYPL-publicdomain/data-and-utilities/blob/master/items/pd_items_1.ndjson?raw=true'; + get. + networkStream := ZnCharacterReadStream on: client contents. + reader := NeoJSONReader on: networkStream. + data := Array streamContents: [ :out | [ reader atEnd ] whileFalse: [ out nextPut: reader next ] ]. + client close. + data \ No newline at end of file diff --git a/filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testAttachmentsExample.st b/filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testAttachmentsExample.st new file mode 100644 index 0000000..8ded541 --- /dev/null +++ b/filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testAttachmentsExample.st @@ -0,0 +1,31 @@ +tests +testAttachmentsExample + | collectionOne json | + "Let's create a collection of two instances:" + collectionOne := {(Attachment new + url: 'http://example.com/random-name.txt' asZnUrl; + fileName: 'chapter-one.txt' yourself). + (Attachment new + url: 'http://example.com/random-name.png' asZnUrl; + fileName: 'image.png'; + yourself)}. + + "And let's map it to a JSON structure:" + json := String + streamContents: [ :aStream | + (NeoJSONWriter on: aStream) + for: #CollectionOfAttachments customDo: [ :mapping | mapping listOfElementSchema: Attachment ]; + mapAllInstVarsFor: Attachment; + for: ZnUrl customDo: [ :mapping | mapping encoder: [ :aZnUrl | aZnUrl asString ] ]; + nextPut: collectionOne as: #CollectionOfAttachments ]. + + + "And read the JSON structure:" + (NeoJSONReader on: json readStream) + for: #CollectionOfAttachments customDo: [ :mapping | mapping listOfElementSchema: Attachment ]; + for: Attachment + do: [ :mapping | + mapping mapInstVar: 'fileName'. + (mapping mapInstVar: 'url') valueSchema: ZnUrl ]; + for: ZnUrl customDo: [ :mapping | mapping decoder: [ :string | string asZnUrl ] ]; + nextAs: #CollectionOfAttachments \ No newline at end of file diff --git a/filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testBittrexLitecoinAsDictionary.st b/filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testBittrexLitecoinAsDictionary.st new file mode 100644 index 0000000..82b469f --- /dev/null +++ b/filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testBittrexLitecoinAsDictionary.st @@ -0,0 +1,10 @@ +tests +testBittrexLitecoinAsDictionary + ZnClient new + url: 'https://bittrex.com/api/v1.1/public/getmarketSummary?market=BTC-LTC'; + accept: ZnMimeType applicationJson; + contentReader: [ :entity | |reader| + reader := (NeoJSONReader on: entity readStream). + reader next ]; + get. + \ No newline at end of file diff --git a/filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testBittrexLitecoinAsDomainObjects.st b/filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testBittrexLitecoinAsDomainObjects.st new file mode 100644 index 0000000..f41da9c --- /dev/null +++ b/filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testBittrexLitecoinAsDomainObjects.st @@ -0,0 +1,16 @@ +tests +testBittrexLitecoinAsDomainObjects + ZnClient new + url: 'https://bittrex.com/api/v1.1/public/getmarkets'; + enforceHttpSuccess: true; + accept: ZnMimeType applicationJson; + contentReader: [ :entity | |reader| + reader := (NeoJSONReader on: entity readStream). + reader for: BittrexResponse do: [:m| + m mapInstVar: #success. + m mapInstVar: #message. + (m mapInstVar: #result) valueSchema: #ArrayOfMarkets]. + reader for: #ArrayOfMarkets customDo: [ :mapping | mapping listOfElementSchema: Market ]. + reader mapInstVarsFor: Market. + reader nextAs: BittrexResponse ]; + get \ No newline at end of file diff --git a/filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testDoomtownDBCards.st b/filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testDoomtownDBCards.st new file mode 100644 index 0000000..41531e4 --- /dev/null +++ b/filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testDoomtownDBCards.st @@ -0,0 +1,4 @@ +tests +testDoomtownDBCards + + NeoJSONReader fromString: 'http://dtdb.co/api/cards/' asUrl retrieveContents \ No newline at end of file diff --git a/filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testFeed.st b/filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testFeed.st new file mode 100644 index 0000000..476852d --- /dev/null +++ b/filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testFeed.st @@ -0,0 +1,12 @@ +tests +testFeed + | json | + json := ZnClient new + systemPolicy; + url: 'https://daringfireball.net/feeds/json'; + accept: ZnMimeType applicationJson; + contentReader: [ :entity | NeoJSONObject fromString: entity contents ]; + get. + json items collect: #title. + json items collect: [ :each | each title -> each url ]. + json \ No newline at end of file diff --git a/filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testGetWorldCapitals.st b/filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testGetWorldCapitals.st new file mode 100644 index 0000000..1fe53f1 --- /dev/null +++ b/filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testGetWorldCapitals.st @@ -0,0 +1,4 @@ +tests +testGetWorldCapitals + ((NeoJSONReader fromString: (ZnEasy get: 'http://api.geonames.org/countryInfoJSON' username: 'demo' password: '') contents) at: #geonames) + collect: [ :d | d at: #capital ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testGoogleMapsAPI.st b/filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testGoogleMapsAPI.st new file mode 100644 index 0000000..85bb04c --- /dev/null +++ b/filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testGoogleMapsAPI.st @@ -0,0 +1,7 @@ +tests +testGoogleMapsAPI + + ZnClient new + url: 'http://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&sensor=false'; + contentReader: [ :entity | NeoJSONReader fromString: entity contents ]; + get \ No newline at end of file diff --git a/filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testParsingUserAgentStrings.st b/filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testParsingUserAgentStrings.st new file mode 100644 index 0000000..440e03f --- /dev/null +++ b/filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testParsingUserAgentStrings.st @@ -0,0 +1,9 @@ +tests +testParsingUserAgentStrings + ZnClient new + http; + host: 'useragentstring.com'; + queryAt: 'uas' put: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/601.4.4 (KHTML, like Gecko) Version/9.0.3 Safari/601.4.4'; + queryAt: 'getJSON' put: 'all'; + contentReader: [ :entity | NeoJSONReader fromString: entity contents ]; + get \ No newline at end of file diff --git a/filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testStackOverflowInfo.st b/filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testStackOverflowInfo.st new file mode 100644 index 0000000..645a79f --- /dev/null +++ b/filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/instance/testStackOverflowInfo.st @@ -0,0 +1,6 @@ +tests +testStackOverflowInfo + + ZnClient new + contentReader: [ :entity | NeoJSONReader fromString: entity contents ]; + get: 'http://api.stackexchange.com/2.1/info?site=stackoverflow' \ No newline at end of file diff --git a/filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/properties.json b/filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/properties.json new file mode 100644 index 0000000..1fab219 --- /dev/null +++ b/filetree/Neo-JSON-Pharo-Examples.package/NeoJSONPharoExamples.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "Neo-JSON-Pharo-Examples", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + ], + "name" : "NeoJSONPharoExamples", + "pools" : [ + ], + "super" : "TestCase", + "type" : "normal" } diff --git a/filetree/Neo-JSON-Pharo-Examples.package/properties.json b/filetree/Neo-JSON-Pharo-Examples.package/properties.json new file mode 100644 index 0000000..a097c63 --- /dev/null +++ b/filetree/Neo-JSON-Pharo-Examples.package/properties.json @@ -0,0 +1,2 @@ +{ + } \ No newline at end of file diff --git a/filetree/Neo-JSON-Pharo-Tests.package/.filetree b/filetree/Neo-JSON-Pharo-Tests.package/.filetree new file mode 100644 index 0000000..8998102 --- /dev/null +++ b/filetree/Neo-JSON-Pharo-Tests.package/.filetree @@ -0,0 +1,4 @@ +{ + "noMethodMetaData" : true, + "separateMethodMetaAndSource" : false, + "useCypressPropertiesFile" : true } diff --git a/filetree/Neo-JSON-Pharo-Tests.package/properties.json b/filetree/Neo-JSON-Pharo-Tests.package/properties.json new file mode 100644 index 0000000..a097c63 --- /dev/null +++ b/filetree/Neo-JSON-Pharo-Tests.package/properties.json @@ -0,0 +1,2 @@ +{ + } \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/.filetree b/filetree/Neo-JSON-Tests.package/.filetree new file mode 100644 index 0000000..8998102 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/.filetree @@ -0,0 +1,4 @@ +{ + "noMethodMetaData" : true, + "separateMethodMetaAndSource" : false, + "useCypressPropertiesFile" : true } diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONBenchmark.class/README.md b/filetree/Neo-JSON-Tests.package/NeoJSONBenchmark.class/README.md new file mode 100644 index 0000000..3e3cc15 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONBenchmark.class/README.md @@ -0,0 +1,19 @@ +I am NeoJSONBenchmark. +I hold 1000 objects of the form Dictionary('color'->'green' 'enabled'->false 'id'->1 'name'->'Name-1' 'value'->0.002 ) in an Array. +I hold the JSON serialization of that as a String of the form '[{"value":0.002,"enabled":false,"name":"Name-1","color":"green","id":1}, ... + +| benchmark | +benchmark := NeoJSONBenchmark new. +[benchmark read] bench. + +| benchmark | +benchmark := NeoJSONBenchmark new. +[benchmark write] bench. + +| benchmark | +benchmark := NeoJSONBenchmark new. +[benchmark read] timeToRun. + +| benchmark | +benchmark := NeoJSONBenchmark new. +[benchmark write] timeToRun. \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONBenchmark.class/instance/initialize.st b/filetree/Neo-JSON-Tests.package/NeoJSONBenchmark.class/instance/initialize.st new file mode 100644 index 0000000..cb07fc5 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONBenchmark.class/instance/initialize.st @@ -0,0 +1,16 @@ +initialize-release +initialize + super initialize. + objects := Array new: 1000. + 1 to: 1000 do: [ :each | + | map | + (map := Dictionary new) + at: 'id' put: each; + at: 'name' put: 'Name-', each asString; + at: 'enabled' put: (#( true false) at: (each \\ 2) + 1); + at: 'color' put: (#( 'red' 'green' 'blue' ) at: (each \\ 3) + 1); + at: 'value' put: each + each / 1000.0. + objects at: each put: map ]. + json := String streamContents: [ :stream | + (NeoJSONWriter on: stream) nextPut: objects ] + \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONBenchmark.class/instance/read.st b/filetree/Neo-JSON-Tests.package/NeoJSONBenchmark.class/instance/read.st new file mode 100644 index 0000000..996a274 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONBenchmark.class/instance/read.st @@ -0,0 +1,3 @@ +public +read + ^ (NeoJSONReader on: json readStream) next diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONBenchmark.class/instance/write.st b/filetree/Neo-JSON-Tests.package/NeoJSONBenchmark.class/instance/write.st new file mode 100644 index 0000000..021a86a --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONBenchmark.class/instance/write.st @@ -0,0 +1,4 @@ +public +write + ^ String streamContents: [ :stream | + (NeoJSONWriter on: stream) nextPut: objects ] diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONBenchmark.class/instance/writePrettyPrintedRead.st b/filetree/Neo-JSON-Tests.package/NeoJSONBenchmark.class/instance/writePrettyPrintedRead.st new file mode 100644 index 0000000..a8089cc --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONBenchmark.class/instance/writePrettyPrintedRead.st @@ -0,0 +1,9 @@ +public +writePrettyPrintedRead + | output | + output := String streamContents: [ :stream | + (NeoJSONWriter on: stream) + prettyPrint: true; + nextPut: objects ]. + ^ (NeoJSONReader on: output readStream) + next \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONBenchmark.class/properties.json b/filetree/Neo-JSON-Tests.package/NeoJSONBenchmark.class/properties.json new file mode 100644 index 0000000..1310fb1 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONBenchmark.class/properties.json @@ -0,0 +1,15 @@ +{ + "category" : "Neo-JSON-Tests", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + "objects", + "json" ], + "name" : "NeoJSONBenchmark", + "pools" : [ + ], + "super" : "Object", + "type" : "normal" } diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/README.md b/filetree/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/README.md new file mode 100644 index 0000000..f3a17cf --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/README.md @@ -0,0 +1,3 @@ +I am NeoJSONBenchmarkTests. + +This test is obviously dependent on hardware, but the margin is quite high. \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/instance/testObject2.st b/filetree/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/instance/testObject2.st new file mode 100644 index 0000000..84abd8d --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/instance/testObject2.st @@ -0,0 +1,7 @@ +testing +testObject2 + | json | + json := NeoJSONWriter toString: NeoJSONTestObject2 new. + self + assert: (NeoJSONReader fromString: json as: NeoJSONTestObject2) + equals: NeoJSONTestObject2 new \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/instance/testPrettyPrinted.st b/filetree/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/instance/testPrettyPrinted.st new file mode 100644 index 0000000..25ad78e --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/instance/testPrettyPrinted.st @@ -0,0 +1,7 @@ +testing +testPrettyPrinted + | benchmark | + benchmark := NeoJSONBenchmark new. + self + assert: benchmark writePrettyPrintedRead + equals: benchmark read \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/instance/testRead.st b/filetree/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/instance/testRead.st new file mode 100644 index 0000000..de5ec49 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/instance/testRead.st @@ -0,0 +1,5 @@ +testing +testRead + | benchmark | + benchmark := NeoJSONBenchmark new. + benchmark read \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/instance/testWrite.st b/filetree/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/instance/testWrite.st new file mode 100644 index 0000000..355740a --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/instance/testWrite.st @@ -0,0 +1,5 @@ +testing +testWrite + | benchmark | + benchmark := NeoJSONBenchmark new. + benchmark write \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/properties.json b/filetree/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/properties.json new file mode 100644 index 0000000..7bb4537 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONBenchmarkTests.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "Neo-JSON-Tests", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + ], + "name" : "NeoJSONBenchmarkTests", + "pools" : [ + ], + "super" : "TestCase", + "type" : "normal" } diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/README.md b/filetree/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/README.md new file mode 100644 index 0000000..beb1b09 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/README.md @@ -0,0 +1 @@ +NeoJSONExamplesTests runs a couple of examples as tests \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testMultiInstances.st b/filetree/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testMultiInstances.st new file mode 100644 index 0000000..02b10a1 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testMultiInstances.st @@ -0,0 +1,17 @@ +tests +testMultiInstances + "Newline delimited JSON (application/x-ndjson) - https://github.com/ndjson/ndjson-spec" + "JSON Lines (application/jsonl) - https://jsonlines.org" + + | data json | + + data := (1 to: 10) collect: [ :each | + { #number -> each } asDictionary ]. + + json := String streamContents: [ :out | + (NeoJSONWriter on: out) nextPutAll: data ]. + + self assert: (NeoJSONReader on: json readStream) upToEnd equals: data. + + self assert: (NeoJSONReader on: json readStream) next equals: data first. + self deny: ((NeoJSONReader on: json readStream) next; atEnd) \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testPoints.st b/filetree/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testPoints.st new file mode 100644 index 0000000..9a85d33 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testPoints.st @@ -0,0 +1,33 @@ +tests +testPoints + | points json result | + + points := Array with: 1@2 with: 3@4 with: 5@6. + + json := String streamContents: [ :out | + (NeoJSONWriter on: out) + prettyPrint: true; + mapInstVarsFor: Point; + nextPut: points ]. + + result := (NeoJSONReader on: json readStream) + mapInstVarsFor: Point; + for: #ListOfPoints customDo: [ :mapping | + mapping listOfElementSchema: Point ]; + nextAs: #ListOfPoints. + + self assert: result equals: points. + + result := (NeoJSONReader on: json readStream) + mapInstVarsFor: Point; + nextListAs: Point. + + self assert: result equals: points. + + result := (NeoJSONReader on: json readStream) + mapInstVarsFor: Point; + for: #OrderedCollectionOfPoints customDo: [ :mapping | + mapping listOfType: OrderedCollection andElementSchema: Point ]; + nextAs: #OrderedCollectionOfPoints. + + self assert: result equals: points asOrderedCollection. \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testRectanglePoints.st b/filetree/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testRectanglePoints.st new file mode 100644 index 0000000..76cc28e --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testRectanglePoints.st @@ -0,0 +1,29 @@ +tests +testRectanglePoints + | rectangle rectangleJson result | + + rectangle := Rectangle origin: 3 @ 4 extent: 5 @ 6. + + rectangleJson := String streamContents: [ :stream | + (NeoJSONWriter on: stream) + prettyPrint: true; + mapInstVarsFor: Point; + mapInstVarsFor: Rectangle; + nextPut: rectangle ]. + + result := (NeoJSONReader on: rectangleJson readStream) + mapInstVarsFor: Point; + for: Rectangle do: [ :mapping | + (mapping mapInstVar: #origin) valueSchema: Point. + (mapping mapInstVar: #corner) valueSchema: Point ]; + nextAs: Rectangle. + + self assert: result equals: rectangle. + + result := (NeoJSONReader on: rectangleJson readStream) + mapInstVarsFor: Point; + for: Rectangle do: [ :mapping | + mapping mapInstVars do: [ :each | each valueSchema: Point ] ]; + nextAs: Rectangle. + + self assert: result equals: rectangle \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testRectanglePointsWithNils.st b/filetree/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testRectanglePointsWithNils.st new file mode 100644 index 0000000..7011122 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testRectanglePointsWithNils.st @@ -0,0 +1,23 @@ +tests +testRectanglePointsWithNils + self + assert: + (String streamContents: [ :stream | + (NeoJSONWriter on: stream) + for: Point do: [ :mapping | mapping mapAllInstVars ]; + for: Rectangle do: [ :mapping | + (mapping mapInstVar: #origin) valueSchema: Point. + (mapping mapInstVar: #corner) valueSchema: Point ]; + nextPut: Rectangle new ]) + equals: '{}'. + self + assert: + (String streamContents: [ :stream | + (NeoJSONWriter on: stream) + for: Point do: [ :mapping | mapping mapAllInstVars ]; + for: Rectangle do: [ :mapping | + (mapping mapInstVar: #origin) valueSchema: Point. + (mapping mapInstVar: #corner) valueSchema: Point ]; + writeNil: true; + nextPut: Rectangle new ]) + equals: '{"origin":null,"corner":null}'. \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/properties.json b/filetree/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/properties.json new file mode 100644 index 0000000..16c0d2d --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "Neo-JSON-Tests", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + ], + "name" : "NeoJSONExamplesTests", + "pools" : [ + ], + "super" : "TestCase", + "type" : "normal" } diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONFloatPrinterTests.class/README.md b/filetree/Neo-JSON-Tests.package/NeoJSONFloatPrinterTests.class/README.md new file mode 100644 index 0000000..14f4b03 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONFloatPrinterTests.class/README.md @@ -0,0 +1 @@ +I am NeoJSONFloatPrinterTests, the collection of unit tests for NeoJSONFloatPrinter. \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONFloatPrinterTests.class/instance/setUp.st b/filetree/Neo-JSON-Tests.package/NeoJSONFloatPrinterTests.class/instance/setUp.st new file mode 100644 index 0000000..ea65805 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONFloatPrinterTests.class/instance/setUp.st @@ -0,0 +1,4 @@ +running +setUp + super setUp. + printer := NeoJSONFloatPrinter new \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONFloatPrinterTests.class/instance/testDecimalNotation.st b/filetree/Neo-JSON-Tests.package/NeoJSONFloatPrinterTests.class/instance/testDecimalNotation.st new file mode 100644 index 0000000..df94892 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONFloatPrinterTests.class/instance/testDecimalNotation.st @@ -0,0 +1,14 @@ +tests +testDecimalNotation + self assert: (printer print: 1.5) equals: '1.5'. + self assert: (printer print: -1.5) equals: '-1.5'. + self assert: (printer print: 0.5) equals: '0.5'. + self assert: (printer print: -0.5) equals: '-0.5'. + self assert: (printer print: (1/3) asFloat) equals: '0.33333'. + self assert: (printer print: (-1/3) asFloat) equals: '-0.33333'. + self assert: (printer print: 0.00123) equals: '0.00123'. + self assert: (printer print: -0.00123) equals: '-0.00123'. + self assert: (printer print: 0.00012) equals: '0.00012'. + self assert: (printer print: -0.00012) equals: '-0.00012'. + self assert: (printer print: 123456.12345) equals: '123456.12345'. + self assert: (printer print: -123456.12345) equals: '-123456.12345'. diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONFloatPrinterTests.class/instance/testInteger.st b/filetree/Neo-JSON-Tests.package/NeoJSONFloatPrinterTests.class/instance/testInteger.st new file mode 100644 index 0000000..58f95de --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONFloatPrinterTests.class/instance/testInteger.st @@ -0,0 +1,8 @@ +tests +testInteger + self assert: (printer print: 1.0) equals: '1'. + self assert: (printer print: 0.0) equals: '0'. + self assert: (printer print: -1.0) equals: '-1'. + self assert: (printer print: 123.0) equals: '123'. + self assert: (printer print: 123456.0) equals: '123456'. + \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONFloatPrinterTests.class/instance/testLowPrecision.st b/filetree/Neo-JSON-Tests.package/NeoJSONFloatPrinterTests.class/instance/testLowPrecision.st new file mode 100644 index 0000000..9893809 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONFloatPrinterTests.class/instance/testLowPrecision.st @@ -0,0 +1,12 @@ +tests +testLowPrecision + printer := NeoJSONFloatPrinter lowPrecision. + self assert: (printer print: (4/3) asFloat) equals: '1.33'. + self assert: (printer print: 12345.66) equals: '12345.66'. + self assert: (printer print: -123456.77) equals: '-1.23e5'. + self assert: (printer print: Float pi) equals: '3.14'. + self assert: (printer print: Float e negated) equals: '-2.72'. + "the earth's mass in kg" + self assert: (printer print: 5.9724e24) equals: '5.97e24'. + "mass of electron in kg" + self assert: (printer print: 9.10938356e-31) equals: '9.11e-31'. \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONFloatPrinterTests.class/instance/testScientificNotation.st b/filetree/Neo-JSON-Tests.package/NeoJSONFloatPrinterTests.class/instance/testScientificNotation.st new file mode 100644 index 0000000..2263741 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONFloatPrinterTests.class/instance/testScientificNotation.st @@ -0,0 +1,6 @@ +tests +testScientificNotation + self assert: (printer print: 1234567.5) equals: '1.23457e6'. "note the rounding" + self assert: (printer print: -1234567.5) equals: '-1.23457e6'. "note the rounding" + self assert: (printer print: 0.0000123) equals: '1.23e-5'. + self assert: (printer print: -0.0000123) equals: '-1.23e-5'. diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONFloatPrinterTests.class/instance/testScientificOnly.st b/filetree/Neo-JSON-Tests.package/NeoJSONFloatPrinterTests.class/instance/testScientificOnly.st new file mode 100644 index 0000000..7516ad9 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONFloatPrinterTests.class/instance/testScientificOnly.st @@ -0,0 +1,11 @@ +tests +testScientificOnly + printer := NeoJSONFloatPrinter scientificOnly. + self assert: (printer print: (4/3) asFloat) equals: '1.33333e0'. + self assert: (printer print: 12345.66) equals: '1.23457e4'. + self assert: (printer print: Float pi) equals: '3.14159e0'. + self assert: (printer print: Float e negated) equals: '-2.71828e0'. + "the earth's mass in kg" + self assert: (printer print: 5.9724e24) equals: '5.9724e24'. + "mass of electron in kg" + self assert: (printer print: 9.10938356e-31) equals: '9.10938e-31'. \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONFloatPrinterTests.class/instance/testSpecialValues.st b/filetree/Neo-JSON-Tests.package/NeoJSONFloatPrinterTests.class/instance/testSpecialValues.st new file mode 100644 index 0000000..5bbee9f --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONFloatPrinterTests.class/instance/testSpecialValues.st @@ -0,0 +1,6 @@ +tests +testSpecialValues + self assert: (printer print: Float zero) equals: '0'. + self assert: (printer print: Float nan) equals: 'NaN'. + self assert: (printer print: Float infinity) equals: 'Inf'. + self assert: (printer print: Float infinity negated) equals: '-Inf'. \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONFloatPrinterTests.class/instance/testWellKnownConstants.st b/filetree/Neo-JSON-Tests.package/NeoJSONFloatPrinterTests.class/instance/testWellKnownConstants.st new file mode 100644 index 0000000..12ede4d --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONFloatPrinterTests.class/instance/testWellKnownConstants.st @@ -0,0 +1,16 @@ +tests +testWellKnownConstants + self assert: (printer print: Float pi) equals: '3.14159'. + self assert: (printer print: Float e) equals: '2.71828'. + "the earth's mass in kg" + self assert: (printer print: 5.9724e24) equals: '5.9724e24'. + "mass of electron in kg" + self assert: (printer print: 9.10938356e-31) equals: '9.10938e-31'. + "planck's constant in Js" + self assert: (printer print: 1.05457e-34) equals: '1.05457e-34'. + "speed of light in m/s" + self assert: (printer print: 2.99792e8) equals: '2.99792e8'. + "charge of electron in C" + self assert: (printer print: -1.60218e-19) equals: '-1.60218e-19'. + "boltzmann's constant in J/K" + self assert: (printer print: 1.38065e-23) equals: '1.38065e-23'. diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONFloatPrinterTests.class/properties.json b/filetree/Neo-JSON-Tests.package/NeoJSONFloatPrinterTests.class/properties.json new file mode 100644 index 0000000..96682a8 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONFloatPrinterTests.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "Neo-JSON-Tests", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + "printer" ], + "name" : "NeoJSONFloatPrinterTests", + "pools" : [ + ], + "super" : "TestCase", + "type" : "normal" } diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONMappingTests.class/README.md b/filetree/Neo-JSON-Tests.package/NeoJSONMappingTests.class/README.md new file mode 100644 index 0000000..0247a5d --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONMappingTests.class/README.md @@ -0,0 +1 @@ +I am NeoJSONMappingTests, testing more exotic kinds of mapping constructs. \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONMappingTests.class/instance/testDynamicTyping.st b/filetree/Neo-JSON-Tests.package/NeoJSONMappingTests.class/instance/testDynamicTyping.st new file mode 100644 index 0000000..b42066a --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONMappingTests.class/instance/testDynamicTyping.st @@ -0,0 +1,25 @@ +testing +testDynamicTyping + | data customMapping json result | + data := Array with: 'foo'->1 with: #('foo' 2). + "The idea is to map a key value combination as either a classic association or a simple pair, + using key & value properties as well as a type property to distinguish between the two" + customMapping := [ :mapper | + mapper + for: #AssocOrPair customDo: [ :mapping | + mapping + encoder: [ :x | + x isArray + ifTrue: [ Dictionary new at: 'type' put: 'pair'; at: 'key' put: x first; at: 'value' put: x second; yourself ] + ifFalse: [ Dictionary new at: 'type' put: 'assoc'; at: 'key' put: x key; at: 'value' put: x value; yourself ] ]; + decoder: [ :x | + (x at: 'type') = 'pair' + ifTrue: [ Array with: (x at: 'key') with: (x at: 'value') ] + ifFalse: [ (x at: 'key') -> (x at: 'value')] ] ]; + for: #ArrayOfAssocOrPair customDo: [ :mapping | + mapping listOfType: Array andElementSchema: #AssocOrPair ]; + yourself ]. + json := String streamContents: [ :out | + (customMapping value: (NeoJSONWriter on: out)) nextPut: data as: #ArrayOfAssocOrPair ]. + result := (customMapping value: (NeoJSONReader on: json readStream)) nextAs: #ArrayOfAssocOrPair. + self assert: result equals: data \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONMappingTests.class/instance/testSymbolOrStringInstVarMapping.st b/filetree/Neo-JSON-Tests.package/NeoJSONMappingTests.class/instance/testSymbolOrStringInstVarMapping.st new file mode 100644 index 0000000..cb8d8b9 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONMappingTests.class/instance/testSymbolOrStringInstVarMapping.st @@ -0,0 +1,20 @@ +testing +testSymbolOrStringInstVarMapping + | data out1 out2 result1 result2 | + data := Array with: 1@2 with: 3@4. + out1 := String streamContents: [ :out | + (NeoJSONWriter on: out) + for: Point do: [ :mapping | mapping mapInstVars: #(x y) ]; + nextPut: data ]. + result1 := (NeoJSONReader on: out1 readStream) + for: Point do: [ :mapping | mapping mapInstVars: #(x y) ]; + nextListAs: Point. + self assert: result1 equals: data. + out2 := String streamContents: [ :out | + (NeoJSONWriter on: out) + for: Point do: [ :mapping | mapping mapInstVars: #('x' 'y') ]; + nextPut: data ]. + result2 := (NeoJSONReader on: out1 readStream) + for: Point do: [ :mapping | mapping mapInstVars: #('x' 'y') ]; + nextListAs: Point. + self assert: result2 equals: data \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONMappingTests.class/instance/testVirtualTransferObject.st b/filetree/Neo-JSON-Tests.package/NeoJSONMappingTests.class/instance/testVirtualTransferObject.st new file mode 100644 index 0000000..7a8713c --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONMappingTests.class/instance/testVirtualTransferObject.st @@ -0,0 +1,27 @@ +testing +testVirtualTransferObject + | data customMapping extraJson json result | + data := NeoJSONObject new data: (Array with: 1@1 with: 2@2). + extraJson := '{"foo":1,"data":[{"x":1,"y":1},{"x":2,"y":2,"z":-1}]}'. + "The idea here is that we are not interested in the top level object just in its data property, + which should be of a specific type, hence we create a virtual transfer object" + customMapping := [ :mapper | + mapper + for: Point do: [ :mapping | + mapping mapInstVars: #(x y) ]; + for: #ArrayOfPoints customDo: [ :mapping | + mapping listOfElementSchema: Point ]; + for: #TransferObject do: [ :mapping | + mapping subjectClass: NeoJSONObject. + (mapping mapAccessor: #data) valueSchema: #ArrayOfPoints ]; + yourself ]. + "By using NeoJSONObject accessors (#data & #data:) are translated to generic #at:[put:] messages. + A longer alternative is + (mapping mapProperty: #data getter: [ :obj | obj at: #data ] setter: [ :obj :x | obj at: #data put: x]) valueSchema: #ArrayOfPoints + where the blocks give you the flexibility to use a plain Dictionary for example" + result := (customMapping value: (NeoJSONReader on: extraJson readStream)) nextAs: #TransferObject. + self assert: result equals: data. + json := String streamContents: [ :out | + (customMapping value: (NeoJSONWriter on: out)) nextPut: data as: #TransferObject ]. + result := (customMapping value: (NeoJSONReader on: json readStream)) nextAs: #TransferObject. + self assert: result equals: data \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONMappingTests.class/properties.json b/filetree/Neo-JSON-Tests.package/NeoJSONMappingTests.class/properties.json new file mode 100644 index 0000000..deb4b74 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONMappingTests.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "Neo-JSON-Tests", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + ], + "name" : "NeoJSONMappingTests", + "pools" : [ + ], + "super" : "TestCase", + "type" : "normal" } diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/README.md b/filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/README.md new file mode 100644 index 0000000..344fd62 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/README.md @@ -0,0 +1,2 @@ +I am NeoJSONMockStream. +I wrap another stream to validate the limited API used. \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/class/on..st b/filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/class/on..st new file mode 100644 index 0000000..53c51f6 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/class/on..st @@ -0,0 +1,5 @@ +instance creation +on: stream + ^ self new + stream: stream; + yourself \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/atEnd.st b/filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/atEnd.st new file mode 100644 index 0000000..3f1258d --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/atEnd.st @@ -0,0 +1,3 @@ +testing +atEnd + ^ stream atEnd \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/close.st b/filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/close.st new file mode 100644 index 0000000..22378d7 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/close.st @@ -0,0 +1,3 @@ +accessing +close + ^ stream close \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/collectionSpecies.st b/filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/collectionSpecies.st new file mode 100644 index 0000000..1020191 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/collectionSpecies.st @@ -0,0 +1,3 @@ +accessing +collectionSpecies + ^ stream collectionSpecies \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/next.st b/filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/next.st new file mode 100644 index 0000000..8a4257a --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/next.st @@ -0,0 +1,3 @@ +accessing +next + ^ stream next \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/nextPut..st b/filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/nextPut..st new file mode 100644 index 0000000..04080e7 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/nextPut..st @@ -0,0 +1,3 @@ +accessing +nextPut: character + ^ stream nextPut: character \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/nextPutAll..st b/filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/nextPutAll..st new file mode 100644 index 0000000..d5179d8 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/nextPutAll..st @@ -0,0 +1,3 @@ +accessing +nextPutAll: string + ^ stream nextPutAll: string \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/peek.st b/filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/peek.st new file mode 100644 index 0000000..2c74034 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/peek.st @@ -0,0 +1,3 @@ +accessing +peek + ^ stream peek \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/peekFor..st b/filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/peekFor..st new file mode 100644 index 0000000..7a67ff0 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/peekFor..st @@ -0,0 +1,3 @@ +accessing +peekFor: char + ^ stream peekFor: char \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/space.st b/filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/space.st new file mode 100644 index 0000000..4ceb125 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/space.st @@ -0,0 +1,3 @@ +accessing +space + ^ stream space \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/stream..st b/filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/stream..st new file mode 100644 index 0000000..e993619 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/instance/stream..st @@ -0,0 +1,3 @@ +initialize-release +stream: anObject + stream := anObject \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/properties.json b/filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/properties.json new file mode 100644 index 0000000..e4f0993 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONMockStream.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "Neo-JSON-Tests", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + "stream" ], + "name" : "NeoJSONMockStream", + "pools" : [ + ], + "super" : "Object", + "type" : "normal" } diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/README.md b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/README.md new file mode 100644 index 0000000..51b44cb --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/README.md @@ -0,0 +1 @@ +I am NeoJSONObjectTests, I hold unit tests for NeoJSONObject. diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/exampleJSONSchema.st b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/exampleJSONSchema.st new file mode 100644 index 0000000..b8dbd56 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/exampleJSONSchema.st @@ -0,0 +1,15 @@ +accessing +exampleJSONSchema + ^ NeoJSONObject fromString: '{ + "$id" : "https://example.com/schemas/address", + "type" : "object", + "properties" : { + "street_address" : { "$anchor" : "street_address", "type" : "string" }, + "city" : { "type" : "string" }, + "state" : { "type" : "string" } + }, + "required" : ["street_address", "city", "state"], + "$defs" : { + "country" : { "type" : "object", "$anchor" : "country", "enum" : ["us","canada","gb"] } + } +}' \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testArray.st b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testArray.st new file mode 100644 index 0000000..c512f21 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testArray.st @@ -0,0 +1,13 @@ +testing +testArray + | jsonArray array | + jsonArray := '[1,2,3]'. + array := NeoJSONObject fromString: jsonArray. + self assert: array asString equals: jsonArray. + self assertCollection: array hasSameElements: #(1 2 3). + array at: 1 add: 0. + array at: #- add: 4. + self assertCollection: array hasSameElements: #(0 1 2 3 4). + array removeKey: 5. + array removeKey: 1. + self assertCollection: array hasSameElements: #(1 2 3) \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testAtAt.st b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testAtAt.st new file mode 100644 index 0000000..c32d78d --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testAtAt.st @@ -0,0 +1,13 @@ +testing +testAtAt + | object | + object := NeoJSONObject new. + self assert: (object at: #foo) isNil. + self assert: (object at: #foo at: #bar) isNil. + object at: #foo at: #bar put: 123. + self assert: (object at: #foo) notNil. + self assert: (object at: #foo at: #bar) equals: 123. + self assert: object foo bar equals: 123. + object at: #foo at: #bar put: -1. + self assert: (object at: #foo at: #bar) equals: -1. + self assert: (object at: #foo at: #foo) isNil \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testAtPath.st b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testAtPath.st new file mode 100644 index 0000000..79ed9dd --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testAtPath.st @@ -0,0 +1,17 @@ +testing +testAtPath + | object | + object := NeoJSONObject newFrom: (Array with: #one -> ( NeoJSONObject newFrom: (Array with: #two -> ( NeoJSONObject newFrom: (Array with: #three -> 42) ) ) )). + self assert: (object atPath: #(one two three)) equals: 42. + self assert: (object atPath: #(one two three)) equals: object one two three. + self assert: (object atPath: #(missing)) equals: nil. + self assert: (object atPath: #(one missing)) equals: nil. + self assert: (object atPath: #(one two missing)) equals: nil. + self assert: (object atPath: #(one two missing)) equals: object one two missing. + + object := NeoJSONObject newFrom: (Array with: #foo -> 42). + self assert: (object atPath: #(foo)) equals: 42. + self assert: (object atPath: #(foo)) equals: object foo. + self assert: (object atPath: #(foo)) equals: (object at: #foo). + self assert: (object atPath: #()) equals: object. + diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testAtPathPut.st b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testAtPathPut.st new file mode 100644 index 0000000..bcdbb21 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testAtPathPut.st @@ -0,0 +1,20 @@ +testing +testAtPathPut + | object | + object := NeoJSONObject new. + object atPath: #(one test) put: 42. + self assert: (object atPath: #(one test)) equals: 42. + self assert: object one test equals: 42. + object atPath: #(one two three) put: #foo. + self assert: (object atPath: #(one two three)) equals: #foo. + self assert: object one two three equals: #foo. + object atPath: #(one two threeBis) put: #bar. + self assert: (object atPath: #(one two threeBis)) equals: #bar. + self assert: object one two threeBis equals: #bar. + + self assert: object foo isNil. + self assert: (object atPath: #() put: 1) equals: object. + self assert: (object atPath: #(foo) put: 1) equals: 1. + self assert: (object atPath: #(foo)) equals: 1. + self assert: object foo equals: 1 + diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testCRUD.st b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testCRUD.st new file mode 100644 index 0000000..43d355e --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testCRUD.st @@ -0,0 +1,18 @@ +testing +testCRUD + | object | + object := NeoJSONObject new. + self assert: object isEmpty. + self assert: object foo equals: nil. + object foo: 123. + self assert: object foo equals: 123. + self assert: object printString equals: '{"foo":123}'. + object name: 'test'. + object value: Float pi. + self assert: object name equals: 'test'. + self assert: (object value closeTo: Float pi). + self assert: object keys asSet equals: #(foo name value) asSet. + object removeKey: #foo. + self assert: object foo equals: nil. + object removeAll. + self assert: object isEmpty \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testFindPath.st b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testFindPath.st new file mode 100644 index 0000000..d20c638 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testFindPath.st @@ -0,0 +1,22 @@ +testing +testFindPath + | json path | + json := self exampleJSONSchema. + + path := json findPath: [ :object | object isDictionary and: [ (object at: '$anchor') = 'street_address' ] ]. + self deny: path isNil. + self assert: path equals: #(properties street_address). + self assert: ((json atPath: path) at: '$anchor') equals: 'street_address'. + + path := json findPath: [ :object | object isDictionary and: [ (object at: 'foo') = 'bar' ] ]. + self assert: path isNil. + + path := json findPath: [ :object | object isDictionary and: [ (object at: '$anchor') = 'country' ] ]. + self deny: path isNil. + self assert: path equals: #('$defs' country). + self assert: ((json atPath: path) at: '$anchor') equals: 'country'. + + json := NeoJSONObject new at: '$anchor' put: 'top'; yourself. + self + assert: (json findPath: [ :object | object isDictionary and: [ (object at: '$anchor') = 'top' ] ]) + equals: #(()) \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testFindPaths.st b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testFindPaths.st new file mode 100644 index 0000000..df937b1 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testFindPaths.st @@ -0,0 +1,22 @@ +testing +testFindPaths + | json paths | + json := self exampleJSONSchema. + + paths := json findPaths: [ :object | object isDictionary and: [ object includesKey: '$anchor' ] ]. + self deny: paths isEmpty. + self assert: paths asArray equals: #((properties street_address) ('$defs' country)). + self assert: ((json atPath: paths first) at: '$anchor') equals: 'street_address'. + self assert: ((json atPath: paths second) at: '$anchor') equals: 'country'. + + paths := json findPaths: [ :object | object isDictionary and: [ (object at: 'foo') = 'bar' ] ]. + self assert: paths isEmpty. + + paths := json findPaths: [ :object | object isDictionary and: [ object includesKey: #type ] ]. + self deny: paths isEmpty. + paths do: [ :path | + self assert: (#(string object) includes: ((json atPath: path) at: #type)) ]. + + paths := json findPaths: [ :_ | true ]. + paths do: [ :each | + self assert: (json atPath: each) notNil ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testJSON.st b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testJSON.st new file mode 100644 index 0000000..3cb012f --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testJSON.st @@ -0,0 +1,10 @@ +testing +testJSON + | data json object | + data := NeoJSONObject newFrom: (Array with: #foo->1 with: #bar->2 with: #str->'Str!' with: #bool->true with: #flt->1.5). + json := NeoJSONWriter toString: data . + object := NeoJSONObject fromString: json. + self assert: object class equals: NeoJSONObject. + self assert: object equals: data. + json := (NeoJSONWriter toString: object). + self assert: (NeoJSONObject fromString: json) equals: object \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testPathAccess.st b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testPathAccess.st new file mode 100644 index 0000000..21793c0 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testPathAccess.st @@ -0,0 +1,20 @@ +testing +testPathAccess + | data | + data := NeoJSONObject fromString: '{"foo":1,"bar":2,"array":[{"a":1},{"b":2}]}'. + self assert: (data atPath: #(array 1 a)) equals: 1. + self assert: (data atPath: #(array 2 b)) equals: 2. + self assert: (data atPath: #(missing 1)) equals: nil. + data atPath: #(missing) put: 7. + self assert: (data atPath: #(missing)) equals: 7. + self assert: (data atPath: #(array 3)) equals: nil. + data := NeoJSONObject fromString: '[{"c":1},{"c":2},{"c":3}]'. + self assert: (data atPath: #(2 c)) equals: 2. + self assert: (data atPath: #(10 c)) equals: nil. + self assert: (data atPath: #(3 missing)) equals: nil. + data atPath: #(3 missing) put: #found. + self assert: (data atPath: #(3 missing)) equals: #found. + (data at: 3) removeKey: #missing. + self assert: (data atPath: #(3 missing)) equals: nil. + data atPath: #(3 missing x) put: #found. + self assert: (data atPath: #(3 missing x)) equals: #found. \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/properties.json b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/properties.json new file mode 100644 index 0000000..d35cb6d --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "Neo-JSON-Tests", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + ], + "name" : "NeoJSONObjectTests", + "pools" : [ + ], + "super" : "TestCase", + "type" : "normal" } diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/README.md b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/README.md new file mode 100644 index 0000000..58dd4b5 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/README.md @@ -0,0 +1 @@ +I am NeoJSONReaderTests, a test suite for NeoJSONReader. \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testAllowNil.st b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testAllowNil.st new file mode 100644 index 0000000..5c19107 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testAllowNil.st @@ -0,0 +1,21 @@ +testing +testAllowNil + self + should: [ + (NeoJSONReader on: 'null' readStream) + mapInstVarsFor: Point; + nextAs: Point ] + raise: NeoJSONParseError. + self + assert: ((NeoJSONReader on: 'null' readStream) + mapInstVarsFor: Point; + for: Point do: [ :mapping | mapping allowNil ]; + nextAs: Point) + equals: nil. + self + assert: ((NeoJSONReader on: '[ { "x" : 1, "y" : 2 }, null, { "x" : 3, "y" : -1 } ]' readStream) + mapInstVarsFor: Point; + for: Point do: [ :mapping | mapping allowNil ]; + for: #ArrayOfPoints customDo: [ :mapping | mapping listOfElementSchema: Point ]; + nextAs: #ArrayOfPoints) + equals: (Array with: 1 @ 2 with: nil with: 3 @ -1). \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testArrayOfPoints.st b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testArrayOfPoints.st new file mode 100644 index 0000000..699f257 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testArrayOfPoints.st @@ -0,0 +1,13 @@ +testing +testArrayOfPoints + | reader | + reader := [ :string | + (NeoJSONReader on: string readStream) + for: Point do: [ :mapping | + mapping mapInstVars: #(x y) ]; + for: #ArrayOfPoints customDo: [ :mapping | + mapping listOfElementSchema: Point ]; + nextAs: #ArrayOfPoints ]. + self assert: (reader value: '[ { "x":1, "y":2 }, { "x":-1, "y":-2 } ]') equals: (Array with: 1@2 with: -1@ -2) . + self assert: (reader value: '[ ]') equals: #(). + self assert: (reader value: '[ { } ]') equals: (Array with: Point new) \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testArrayOfPointsUsingNextListAs.st b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testArrayOfPointsUsingNextListAs.st new file mode 100644 index 0000000..8415dea --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testArrayOfPointsUsingNextListAs.st @@ -0,0 +1,10 @@ +testing +testArrayOfPointsUsingNextListAs + | reader | + reader := [ :string | + (NeoJSONReader on: string readStream) + mapInstVarsFor: Point; + nextListAs: Point ]. + self assert: (reader value: '[ { "x":1, "y":2 }, { "y":-2, "x":-1 } ]') equals: (Array with: 1@2 with: -1@ -2) . + self assert: (reader value: '[ ]') equals: #(). + self assert: (reader value: '[ { } ]') equals: (Array with: Point new) \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testAssociation.st b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testAssociation.st new file mode 100644 index 0000000..fb8e582 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testAssociation.st @@ -0,0 +1,10 @@ +testing +testAssociation + | reader | + reader := [ :string | + (NeoJSONReader on: string readStream) + for: Association do: [ :mapping | + mapping mapAccessors: #(key value) ]; + nextAs: Association ]. + self assert: (reader value: '{"key":"foo","value":42}') equals: 'foo' -> 42. + self assert: (reader value: '{}') equals: Association new \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testBooleans.st b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testBooleans.st new file mode 100644 index 0000000..fa5aec6 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testBooleans.st @@ -0,0 +1,6 @@ +testing +testBooleans + self assert: (NeoJSONReader on: 'true' readStream) next equals: true. + self assert: (NeoJSONReader on: 'false' readStream) next equals: false. + self should: [ (NeoJSONReader on: 'tru' readStream) next ] raise: NeoJSONParseError. + self should: [ (NeoJSONReader on: 'falsE' readStream) next ] raise: NeoJSONParseError. \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testByteArray.st b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testByteArray.st new file mode 100644 index 0000000..8f925eb --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testByteArray.st @@ -0,0 +1,10 @@ +testing +testByteArray + | reader | + reader := [ :string | + (NeoJSONReader on: string readStream) + for: ByteArray customDo: [ :mapping | + mapping listOfType: ByteArray ]; + nextAs: ByteArray ]. + self assert: (reader value: '[ 1, 2, 3 ]') equals: #[1 2 3]. + self assert: (reader value: '[ ]') equals: ByteArray new \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testDate.st b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testDate.st new file mode 100644 index 0000000..04153bb --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testDate.st @@ -0,0 +1,9 @@ +testing +testDate + | reader | + reader := [ :input | + (NeoJSONReader on: input readStream) + for: Date customDo: [ :mapping | + mapping decoder: [ :string | Date fromString: string ] ]; + nextAs: Date ]. + self assert: (reader value: ' "2012-06-08" ') equals: (Date fromString: '2012-06-08') \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testDateAndTime.st b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testDateAndTime.st new file mode 100644 index 0000000..0bc96f7 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testDateAndTime.st @@ -0,0 +1,11 @@ +testing +testDateAndTime + | reader | + reader := [ :input | + (NeoJSONReader on: input readStream) + for: DateAndTime customDo: [ :mapping | + mapping decoder: [ :string | DateAndTime fromString: string ] ]; + nextAs: DateAndTime ]. + self + assert: (reader value: ' "2012-02-14T16:40:18+01:00" ') + equals: (DateAndTime year: 2012 month: 2 day: 14 hour: 16 minute: 40 second: 18 offset: 1 hour) \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testFloats.st b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testFloats.st new file mode 100644 index 0000000..1dc3abd --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testFloats.st @@ -0,0 +1,23 @@ +testing +testFloats + | reader | + reader := [ :string | + (NeoJSONReader on: string readStream) next ]. + self assert: ((reader value: '123.0') closeTo: 123.0). + self assert: ((reader value: '-123.0') closeTo: -123.0). + self assert: ((reader value: '123.0e0') closeTo: 123.0). + self assert: ((reader value: '123e6') closeTo: 123e6). + self assert: ((reader value: '123e+6') closeTo: 123e6). + self assert: ((reader value: '123e-6') closeTo: 123e-6). + self assert: ((reader value: '123E6') closeTo: 123e6). + self assert: ((reader value: '123E+6') closeTo: 123e6). + self assert: ((reader value: '123E-6') closeTo: 123e-6). + self assert: ((reader value: '-123e6') closeTo: -123e6). + self assert: ((reader value: '-123e-6') closeTo: -123e-6). + self assert: ((reader value: '-123E6') closeTo: -123e6). + self assert: ((reader value: '-123E-6') closeTo: -123e-6). + self assert: ((reader value: '3.141592653589793') closeTo: Float pi). + self assert: ((reader value: '0.123e6') closeTo: 0.123e6). + self assert: ((reader value: '0.123e-6') closeTo: 0.123e-6). + self assert: ((reader value: '-0.123E6') closeTo: -0.123e6). + self assert: ((reader value: '-0.123E-6') closeTo: -0.123e-6). diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testIntegers.st b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testIntegers.st new file mode 100644 index 0000000..5c6b001 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testIntegers.st @@ -0,0 +1,15 @@ +testing +testIntegers + | reader | + reader := [ :string | + (NeoJSONReader on: string readStream) next ]. + self assert: (reader value: '123') equals: 123. + self assert: (reader value: '00123') equals: 123. + self assert: (reader value: '-123') equals: -123. + self assert: (reader value: '-0123') equals: -123. + self assert: (reader value: '0') equals: 0. + self assert: (reader value: '-0') equals: 0. + self assert: (reader value: '00') equals: 0. + self assert: (reader value: ' 123 ') equals: 123. + self should: [ reader value: '+1' ] raise: NeoJSONParseError. + self should: [ reader value: ' - ' ] raise: NeoJSONParseError. diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testLists.st b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testLists.st new file mode 100644 index 0000000..dcfc67e --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testLists.st @@ -0,0 +1,13 @@ +testing +testLists + | reader | + reader := [ :string | + (NeoJSONReader on: string readStream) next ]. + self assert: (reader value: '[1,2,3]') equals: #(1 2 3). + self assert: (reader value: '[]') equals: #(). + self assert: (reader value: ' [ 1 , 2 , 3 ] ') equals: #(1 2 3). + self assert: (reader value: ' [ ] ') equals: #(). + self should: [ reader value: '[1,]' ] raise: NeoJSONParseError. + self should: [ reader value: '[' ] raise: NeoJSONParseError. + self should: [ reader value: ']' ] raise: NeoJSONParseError. + self should: [ reader value: '[}' ] raise: NeoJSONParseError \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testMaps.st b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testMaps.st new file mode 100644 index 0000000..704eecb --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testMaps.st @@ -0,0 +1,15 @@ +testing +testMaps + | reader | + reader := [ :string | + (NeoJSONReader on: string readStream) next ]. + self assert: (reader value: '{"x":1,"y":2}') equals: (Dictionary newFromPairs: #( 'x' 1 'y' 2)). + self assert: (reader value: '{}') equals: Dictionary new. + self assert: (reader value: ' { "x" : 1 , "y" : 2 } ' ) equals: (Dictionary newFromPairs: #( 'x' 1 'y' 2)). + self assert: (reader value: ' { } ') equals: Dictionary new. + self should: [ reader value: '{"foo":}' ] raise: NeoJSONParseError. + self should: [ reader value: '{"foo":9,}' ] raise: NeoJSONParseError. + self should: [ reader value: '{9:true,}' ] raise: NeoJSONParseError. + self should: [ reader value: '{' ] raise: NeoJSONParseError. + self should: [ reader value: '}' ] raise: NeoJSONParseError. + self should: [ reader value: '{]' ] raise: NeoJSONParseError \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testNextStringAsHex.st b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testNextStringAsHex.st new file mode 100644 index 0000000..591d6a2 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testNextStringAsHex.st @@ -0,0 +1,11 @@ +testing +testNextStringAsHex + | string | + string := (NeoJSONReader on: '"466F6F2062617221"' readStream) + for: #StringAsHex + customDo: [ :mapping | + mapping + encoder: [ :x | x asByteArray hex asUppercase ]; + decoder: [ :x | (ByteArray readHexFrom: x) asString ] ]; + nextAs: #StringAsHex. + self assert: string equals: 'Foo bar!' \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testNonBMPCharacterDecoding.st b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testNonBMPCharacterDecoding.st new file mode 100644 index 0000000..1e578d6 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testNonBMPCharacterDecoding.st @@ -0,0 +1,11 @@ +testing +testNonBMPCharacterDecoding + "Characters not in the Basic Multilingual Plane are encoded as a UTF-16 surrogate pair" + + | string object | + string := 16r1D11E asCharacter asString. "MUSICAL SYMBOL G CLEF" + object := (NeoJSONReader fromString: '"\uD834\uDD1E"'). + self assert: object equals: string. + + "UTF-16 surrogate pairs might be invalid, make sure an error is raised" + self should: [ NeoJSONReader fromString: '"\udbff\ue000"' ] raise: NeoJSONParseError \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testNull.st b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testNull.st new file mode 100644 index 0000000..24ff1e0 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testNull.st @@ -0,0 +1,5 @@ +testing +testNull + self assert: (NeoJSONReader on: 'null' readStream) next equals: nil. + self assert: (NeoJSONReader on: ' null ' readStream) next equals: nil. + self should: [ (NeoJSONReader on: ' nil ' readStream) next ] raise: NeoJSONParseError. \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testOrderedCollection.st b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testOrderedCollection.st new file mode 100644 index 0000000..e14229e --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testOrderedCollection.st @@ -0,0 +1,13 @@ +testing +testOrderedCollection + | json list | + json := '[ 1, 2, 3 ]'. + list := (NeoJSONReader on: json readStream) + listClass: OrderedCollection; + next. + self + assert: list + equals: (OrderedCollection with: 1 with: 2 with: 3). + self + assert: list class + equals: OrderedCollection \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testOrderedCollectionOfPoints.st b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testOrderedCollectionOfPoints.st new file mode 100644 index 0000000..10317dc --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testOrderedCollectionOfPoints.st @@ -0,0 +1,13 @@ +testing +testOrderedCollectionOfPoints + | reader | + reader := [ :string | + (NeoJSONReader on: string readStream) + for: Point do: [ :mapping | + mapping mapInstVars: #(x y) ]; + for: #OrderedCollectionOfPoints customDo: [ :mapping | + mapping listOfType: OrderedCollection andElementSchema: Point ]; + nextAs: #OrderedCollectionOfPoints ]. + self assert: (reader value: '[ { "x":1, "y":2 }, { "x":-1, "y":-2 } ]') equals: (Array with: 1@2 with: -1@ -2) asOrderedCollection. + self assert: (reader value: '[ ]') equals: OrderedCollection new. + self assert: (reader value: '[ { } ]') equals: (OrderedCollection with: Point new) \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testParseErrors.st b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testParseErrors.st new file mode 100644 index 0000000..678f055 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testParseErrors.st @@ -0,0 +1,9 @@ +testing +testParseErrors + self should: [ NeoJSONReader fromString: 'zero' ] raise: NeoJSONParseError. + self should: [ NeoJSONReader fromString: '#' ] raise: NeoJSONParseError. + self should: [ NeoJSONReader fromString: '@' ] raise: NeoJSONParseError. + + self should: [ (NeoJSONReader on: '[1,2,3]true' readStream) next; failIfNotAtEnd ] raise: NeoJSONParseError. + self should: [ (NeoJSONReader on: '{"foo":1}"extra"' readStream) next; failIfNotAtEnd ] raise: NeoJSONParseError. + self should: [ (NeoJSONReader on: '[]"extra"' readStream) next; failIfNotAtEnd ] raise: NeoJSONParseError. \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPoint.st b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPoint.st new file mode 100644 index 0000000..2d33d3f --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPoint.st @@ -0,0 +1,6 @@ +testing +testPoint + | reader | + reader := [ :string | + (NeoJSONReader on: string readStream) nextAs: Point ]. + self should: [ reader value: '{"x":1,"y":2}' ] raise: NeoJSONMappingNotFound \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPoint1.st b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPoint1.st new file mode 100644 index 0000000..b60cfe7 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPoint1.st @@ -0,0 +1,11 @@ +testing +testPoint1 + | reader | + reader := [ :string | + (NeoJSONReader on: string readStream) + for: Point do: [ :mapping | + mapping mapProperty: 'x' getter: [ :point | point x ] setter: [ :point :value | point setX: value setY: point y ]. + mapping mapProperty: 'y' getter: [ :point | point y ] setter: [ :point :value | point setX: point x setY: value ]. ]; + nextAs: Point ]. + self assert: (reader value: '{"x":1,"y":2}') equals: 1@2. + self assert: (reader value: '{}') equals: Point new \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPoint2.st b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPoint2.st new file mode 100644 index 0000000..a380a63 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPoint2.st @@ -0,0 +1,9 @@ +testing +testPoint2 + | reader | + reader := [ :string | + (NeoJSONReader on: string readStream) + mapAllInstVarsFor: Point; + nextAs: Point ]. + self assert: (reader value: '{"x":1,"y":2}') equals: 1@2. + self assert: (reader value: '{}') equals: Point new \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPoint3.st b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPoint3.st new file mode 100644 index 0000000..5586d33 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPoint3.st @@ -0,0 +1,10 @@ +testing +testPoint3 + | reader | + reader := [ :string | + (NeoJSONReader on: string readStream) + for: Point do: [ :mapping | + mapping mapInstVars: #(x y) ]; + nextAs: Point ]. + self assert: (reader value: '{"x":1,"y":2}') equals: 1@2. + self assert: (reader value: '{}') equals: Point new \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPointUsingAsString.st b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPointUsingAsString.st new file mode 100644 index 0000000..376bd1b --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPointUsingAsString.st @@ -0,0 +1,23 @@ +testing +testPointUsingAsString + | point | + point := (NeoJSONReader on: '{"x":"1","y":"2"}' readStream) + for: Point + do: [ :mapping | + (mapping + mapProperty: #x + getter: [ :object | object x ] + setter: [ :object :value | object setX: value setY: object y ]) + valueSchema: #AsString. + (mapping + mapProperty: #y + getter: [ :object | object y ] + setter: [ :object :value | object setX: object x setY: value ]) + valueSchema: #AsString ]; + for: #AsString + customDo: [ :mapping | + mapping + encoder: [ :x | x asString ]; + decoder: [ :x | x asNumber ] ]; + nextAs: Point. + self assert: point equals: 1 @ 2 \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPropertyNamesAsSymbols.st b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPropertyNamesAsSymbols.st new file mode 100644 index 0000000..35bcb01 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testPropertyNamesAsSymbols.st @@ -0,0 +1,11 @@ +testing +testPropertyNamesAsSymbols + | json map | + json := '{ "x" : true, "y" : false, "key-1" : 1 }'. + map := (NeoJSONReader on: json readStream) + propertyNamesAsSymbols: true; + next. + self + assert: map + equals: (Dictionary new at: #x put: true; at: #y put: false; at: #'key-1' put: 1; yourself). + self assert: (map keys allSatisfy: [ :each | each isSymbol ]) \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testSmallDictionary.st b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testSmallDictionary.st new file mode 100644 index 0000000..2b67057 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testSmallDictionary.st @@ -0,0 +1,14 @@ +testing +testSmallDictionary + | json map smallDictionaryClass | + json := '{ "x" : true, "y" : false, "key-1" : 1 }'. + smallDictionaryClass := Smalltalk at: #SmallDictionary ifAbsent: [ Dictionary ]. + map := (NeoJSONReader on: json readStream) + mapClass: smallDictionaryClass; + next. + self + assert: map + equals: (smallDictionaryClass new at: 'x' put: true; at: 'y' put: false; at: 'key-1' put: 1; yourself). + self + assert: map class + equals: smallDictionaryClass \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testStrings.st b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testStrings.st new file mode 100644 index 0000000..ce009e2 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testStrings.st @@ -0,0 +1,27 @@ +testing +testStrings + | reader | + reader := [ :string | + (NeoJSONReader on: string readStream) next ]. + self assert: (reader value: '"foo"') equals: 'foo'. + self assert: (reader value: '""') equals: ''. + self assert: (reader value: '"Foo BAR"') equals: 'Foo BAR'. + self assert: (reader value: '" foo "') equals: ' foo '. + self assert: (reader value: '"\u00E9l\u00E8ve en Fran\u00E7ais"') equals: 'élève en Français'. + self + assert: (reader value: '"\"\\\/\t\r\n\f\b"') + equals: (String withAll: ( OrderedCollection new + add: $"; + add: $\; + add: $/; + add: Character tab; + add: Character cr; + add: Character lf; + add: Character newPage; + add: Character backspace; + yourself )). + self should: [ reader value: '"open' ] raise: NeoJSONParseError. + self should: [ reader value: '"\uAA"' ] raise: NeoJSONParseError. + self should: [ reader value: '"\uZZ"' ] raise: NeoJSONParseError. + self should: [ reader value: '"\x"' ] raise: NeoJSONParseError. + self should: [ reader value: ' " ' ] raise: NeoJSONParseError. diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testSymbol.st b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testSymbol.st new file mode 100644 index 0000000..ba30f33 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testSymbol.st @@ -0,0 +1,10 @@ +testing +testSymbol + | reader | + reader := [ :input | + (NeoJSONReader on: input readStream) + for: Symbol customDo: [ :mapping | + mapping decoder: [ :string | string asSymbol ] ]; + nextAs: Symbol ]. + self assert: (reader value: ' "foo" ') equals: #foo. + self assert: (reader value: ' "FOO-1" ') equals: #'FOO-1' \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testTime.st b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testTime.st new file mode 100644 index 0000000..abb759d --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/instance/testTime.st @@ -0,0 +1,9 @@ +testing +testTime + | reader | + reader := [ :input | + (NeoJSONReader on: input readStream) + for: Time customDo: [ :mapping | + mapping decoder: [ :string | Time fromString: string ] ]; + nextAs: Time ]. + self assert: (reader value: ' "14:30:08" ') equals: (Time hour: 14 minute: 30 second: 8) \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/properties.json b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/properties.json new file mode 100644 index 0000000..f3ec786 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONReaderTests.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "Neo-JSON-Tests", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + ], + "name" : "NeoJSONReaderTests", + "pools" : [ + ], + "super" : "TestCase", + "type" : "normal" } diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/README.md b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/README.md new file mode 100644 index 0000000..2d2aa97 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/README.md @@ -0,0 +1,18 @@ +I am NeoJSONTestObject1. + +I repesent a domain model object. +I have the following properties: + +- id +- name +- timestamp +- points +- bytes + +My JSON representation is like this: + +- id +- name +- created-at +- points +- bytes diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/class/example1.st b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/class/example1.st new file mode 100644 index 0000000..ac8135f --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/class/example1.st @@ -0,0 +1,9 @@ +instance creation +example1 + ^ self new + id: 123; + name: 'Example1'; + timestamp: (DateAndTime year: 2012 month: 06 day: 08 hour: 14 minute: 30 second: 15 offset: 1 hour); + points: (Array with: 1@2 with: 3@4); + bytes: #[ 2 4 6 8 ]; + yourself \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/class/neoJsonMapping..st b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/class/neoJsonMapping..st new file mode 100644 index 0000000..b801670 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/class/neoJsonMapping..st @@ -0,0 +1,15 @@ +accessing +neoJsonMapping: mapper + mapper for: self do: [ :mapping | + mapping mapInstVars: #(id name). + (mapping mapInstVar: #timestamp to: 'created-at') valueSchema: DateAndTime. + (mapping mapInstVar: #points) valueSchema: #ArrayOfPoints. + (mapping mapInstVar: #bytes) valueSchema: ByteArray ]. + mapper for: DateAndTime customDo: [ :mapping | + mapping decoder: [ :string | DateAndTime fromString: string ]. + mapping encoder: [ :dateAndTime | dateAndTime printString ] ]. + mapper for: #ArrayOfPoints customDo: [ :mapping | + mapping listOfElementSchema: Point ]. + mapper mapAllInstVarsFor: Point. + mapper for: ByteArray customDo: [ :mapping | + mapping listOfType: ByteArray ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/^equals.st b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/^equals.st new file mode 100644 index 0000000..f36f21f --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/^equals.st @@ -0,0 +1,14 @@ +comparing += anObject + self == anObject + ifTrue: [ ^ true ]. + self class = anObject class + ifFalse: [ ^ false ]. + ^ id = anObject id + and: [ + name = anObject name + and: [ + timestamp = anObject timestamp + and: [ + points = anObject points + and: [ bytes = anObject bytes ] ] ] ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/bytes..st b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/bytes..st new file mode 100644 index 0000000..fa38a87 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/bytes..st @@ -0,0 +1,3 @@ +accessing +bytes: byteArray + bytes := byteArray \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/bytes.st b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/bytes.st new file mode 100644 index 0000000..85d9bfa --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/bytes.st @@ -0,0 +1,3 @@ +accessing +bytes + ^ bytes \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/hash.st b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/hash.st new file mode 100644 index 0000000..c019d80 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/hash.st @@ -0,0 +1,3 @@ +comparing +hash + ^ id hash bitXor: (name hash bitXor: (timestamp hash bitXor: (points hash bitXor: bytes hash))) \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/id..st b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/id..st new file mode 100644 index 0000000..cda7d0a --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/id..st @@ -0,0 +1,3 @@ +accessing +id: integer + id := integer \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/id.st b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/id.st new file mode 100644 index 0000000..41241a3 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/id.st @@ -0,0 +1,3 @@ +accessing +id + ^ id \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/name..st b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/name..st new file mode 100644 index 0000000..5eff854 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/name..st @@ -0,0 +1,3 @@ +accessing +name: string + name := string \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/name.st b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/name.st new file mode 100644 index 0000000..22077c2 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/name.st @@ -0,0 +1,3 @@ +accessing +name + ^ name \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/points..st b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/points..st new file mode 100644 index 0000000..f0bc417 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/points..st @@ -0,0 +1,3 @@ +accessing +points: arrayOfPoints + points := arrayOfPoints \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/points.st b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/points.st new file mode 100644 index 0000000..833ea44 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/points.st @@ -0,0 +1,3 @@ +accessing +points + ^ points \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/timestamp..st b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/timestamp..st new file mode 100644 index 0000000..8f57910 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/timestamp..st @@ -0,0 +1,3 @@ +accessing +timestamp: dateAndTime + timestamp := dateAndTime \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/timestamp.st b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/timestamp.st new file mode 100644 index 0000000..98b1f81 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/instance/timestamp.st @@ -0,0 +1,3 @@ +accessing +timestamp + ^ timestamp \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/properties.json b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/properties.json new file mode 100644 index 0000000..43f3cb3 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject1.class/properties.json @@ -0,0 +1,18 @@ +{ + "category" : "Neo-JSON-Tests", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + "id", + "name", + "timestamp", + "points", + "bytes" ], + "name" : "NeoJSONTestObject1", + "pools" : [ + ], + "super" : "Object", + "type" : "normal" } diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/README.md b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/README.md new file mode 100644 index 0000000..c7a35da --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/README.md @@ -0,0 +1,9 @@ +I am NeoJSONTestObject2. + +Instance Variables + data: + height: + id: + width: + +Used for benchmarking and other tests. \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmark..st b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmark..st new file mode 100644 index 0000000..abb3c4b --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmark..st @@ -0,0 +1,16 @@ +testing +benchmark: count + "self benchmark: 1000" + + | collection json size | + collection := Array new: count withAll: self example1. + size := 2 + (count * (NeoJSONWriter toString: self example1) size) + count - 1. + Transcript + cr; + << ('Serializing {1} objects took ms ' format: (Array with: count) ); + show: [ json := String new: size streamContents: [ :stream | + (NeoJSONWriter on: stream) nextPut: collection ] ] timeToRun. + Transcript + cr; + << ('Deserializing {1} objects took ms ' format: (Array with: count) ); + show: [ NeoJSONReader fromString: json ] timeToRun. \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmark10k.st b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmark10k.st new file mode 100644 index 0000000..eca2480 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmark10k.st @@ -0,0 +1,5 @@ +testing +benchmark10k + "self benchmark10k" + + self benchmark: 10000 \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmark10kAsDictionary.st b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmark10kAsDictionary.st new file mode 100644 index 0000000..9787721 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmark10kAsDictionary.st @@ -0,0 +1,5 @@ +testing +benchmark10kAsDictionary + "self benchmark10kAsDictionary" + + self benchmarkAsDictionary: 10000 \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmark200k.st b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmark200k.st new file mode 100644 index 0000000..d9b7964 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmark200k.st @@ -0,0 +1,5 @@ +testing +benchmark200k + "self benchmark200k" + + self benchmark: 200000 \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmarkAsDictionary..st b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmarkAsDictionary..st new file mode 100644 index 0000000..38321d7 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/benchmarkAsDictionary..st @@ -0,0 +1,16 @@ +testing +benchmarkAsDictionary: count + "self benchmarkAsDictionary: 1000" + + | collection json size | + collection := Array new: count withAll: self example1 asDictionary. + size := 2 + (count * (NeoJSONWriter toString: self example1 asDictionary) size) + count - 1. + Transcript + cr; + << ('Serializing {1} objects took ms ' format: (Array with: count) ); + show: [ json := String new: size streamContents: [ :stream | + (NeoJSONWriter on: stream) nextPut: collection ] ] timeToRun. + Transcript + cr; + << ('Deserializing {1} objects took ms ' format: (Array with: count) ); + show: [ NeoJSONReader fromString: json ] timeToRun. \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/example1.st b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/example1.st new file mode 100644 index 0000000..18024b5 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/example1.st @@ -0,0 +1,8 @@ +instance creation +example1 + ^ self new + id: 13; + width: 250; + height: 110; + data: (String new: 512 withAll: $a); + yourself \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/neoJsonMapping..st b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/neoJsonMapping..st new file mode 100644 index 0000000..346fabc --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/class/neoJsonMapping..st @@ -0,0 +1,7 @@ +accessing +neoJsonMapping: mapper + "For inheritance mapping to work, the schema/classname must be self, + but the instance variables have to be enumerated manually per class" + + mapper for: self do: [ :mapping | + mapping mapInstVars: #(id width height data) ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/^equals.st b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/^equals.st new file mode 100644 index 0000000..95c56bf --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/^equals.st @@ -0,0 +1,13 @@ +comparing += anObject + self == anObject + ifTrue: [ ^ true ]. + self class = anObject class + ifFalse: [ ^ false ]. + ^ id = anObject id + and: [ + height = anObject height + and: [ + width = anObject width + and: [ + data = anObject data ] ] ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/asDictionary.st b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/asDictionary.st new file mode 100644 index 0000000..d288817 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/asDictionary.st @@ -0,0 +1,8 @@ +converting +asDictionary + ^ Dictionary new + at: #id put: id; + at: #height put: height; + at: #width put: width; + at: #data put: data; + yourself \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/data..st b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/data..st new file mode 100644 index 0000000..6133d52 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/data..st @@ -0,0 +1,3 @@ +accessing +data: anObject + data := anObject \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/data.st b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/data.st new file mode 100644 index 0000000..664ff01 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/data.st @@ -0,0 +1,3 @@ +accessing +data + ^ data \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/hash.st b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/hash.st new file mode 100644 index 0000000..9ce246d --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/hash.st @@ -0,0 +1,3 @@ +comparing +hash + ^ id hash bitXor: (width hash bitXor: (height hash bitXor: data hash)) \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/height..st b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/height..st new file mode 100644 index 0000000..0dc7126 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/height..st @@ -0,0 +1,3 @@ +accessing +height: anObject + height := anObject \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/height.st b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/height.st new file mode 100644 index 0000000..207725d --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/height.st @@ -0,0 +1,3 @@ +accessing +height + ^ height \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/id..st b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/id..st new file mode 100644 index 0000000..5561e6d --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/id..st @@ -0,0 +1,3 @@ +accessing +id: anObject + id := anObject \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/id.st b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/id.st new file mode 100644 index 0000000..41241a3 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/id.st @@ -0,0 +1,3 @@ +accessing +id + ^ id \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/width..st b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/width..st new file mode 100644 index 0000000..2748ec2 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/width..st @@ -0,0 +1,3 @@ +accessing +width: anObject + width := anObject \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/width.st b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/width.st new file mode 100644 index 0000000..a34e755 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/instance/width.st @@ -0,0 +1,3 @@ +accessing +width + ^ width \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/properties.json b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/properties.json new file mode 100644 index 0000000..b5d9851 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject2.class/properties.json @@ -0,0 +1,17 @@ +{ + "category" : "Neo-JSON-Tests", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + "id", + "width", + "height", + "data" ], + "name" : "NeoJSONTestObject2", + "pools" : [ + ], + "super" : "Object", + "type" : "normal" } diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject3.class/README.md b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject3.class/README.md new file mode 100644 index 0000000..05ebb8a --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject3.class/README.md @@ -0,0 +1,7 @@ +I am NeoJSONTestObject3, a subclass of NeoJSONTestObject2. + +Instance Variables + color: + transparent : + +I am used for inheritance testing. diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject3.class/class/example1.st b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject3.class/class/example1.st new file mode 100644 index 0000000..c9b2f0a --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject3.class/class/example1.st @@ -0,0 +1,7 @@ +instance creation +example1 + ^ super example1 + data: (String new: 8 withAll: $a); + color: 'red'; + transparent: true; + yourself \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject3.class/class/neoJsonMapping..st b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject3.class/class/neoJsonMapping..st new file mode 100644 index 0000000..e4d74a0 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject3.class/class/neoJsonMapping..st @@ -0,0 +1,8 @@ +accessing +neoJsonMapping: mapper + "For inheritance mapping to work, the schema/classname must be self, + but the instance variables have to be enumerated manually per class" + + super neoJsonMapping: mapper. + mapper for: self do: [ :mapping | + mapping mapInstVars: #(color transparent) ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/^equals.st b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/^equals.st new file mode 100644 index 0000000..27e9c56 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/^equals.st @@ -0,0 +1,5 @@ +comparing += anObject + ^ super = anObject + and: [ color = anObject color + and: [ transparent = anObject transparent ] ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/asDictionary.st b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/asDictionary.st new file mode 100644 index 0000000..4be6261 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/asDictionary.st @@ -0,0 +1,6 @@ +converting +asDictionary + ^ super asDictionary + at: #color put: color; + at: #transparent put: transparent; + yourself \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/color..st b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/color..st new file mode 100644 index 0000000..5030631 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/color..st @@ -0,0 +1,3 @@ +accessing +color: anObject + color := anObject \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/color.st b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/color.st new file mode 100644 index 0000000..b4464aa --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/color.st @@ -0,0 +1,3 @@ +accessing +color + ^ color \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/transparent..st b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/transparent..st new file mode 100644 index 0000000..ccdb341 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/transparent..st @@ -0,0 +1,3 @@ +accessing +transparent: anObject + transparent := anObject \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/transparent.st b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/transparent.st new file mode 100644 index 0000000..4f76d07 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject3.class/instance/transparent.st @@ -0,0 +1,3 @@ +accessing +transparent + ^ transparent \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONTestObject3.class/properties.json b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject3.class/properties.json new file mode 100644 index 0000000..b4f73aa --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONTestObject3.class/properties.json @@ -0,0 +1,15 @@ +{ + "category" : "Neo-JSON-Tests", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + "color", + "transparent" ], + "name" : "NeoJSONTestObject3", + "pools" : [ + ], + "super" : "NeoJSONTestObject2", + "type" : "normal" } diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/README.md b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/README.md new file mode 100644 index 0000000..57e75e2 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/README.md @@ -0,0 +1,27 @@ +I am NeoJSONValidation, a set of tests to validate NeoJSON against some external rules. + +Both positive & negative tests are includes. +Some of these are implementation choices. + +http://seriot.ch/parsing_json.php +https://github.com/nst/JSONTestSuite +https://github.com/nst/JSONTestSuite.git + test_parsing + test_transform + +https://github.com/miloyip/nativejson-benchmark +https://github.com/miloyip/nativejson-benchmark.git + data/jsonchecker + data/roundtrip + +This can only be run with the correct setup (checkout/config). + + NeoJSONValidation new runNativeJsonBenchmarkRoundTrip. + NeoJSONValidation new runNativeJsonBenchmarkJsonCheckerPasses. + NeoJSONValidation new runNativeJsonBenchmarkJsonCheckerFailures. + + NeoJSONValidation new runJsonTestSuiteTestParsingPasses. + NeoJSONValidation new runJsonTestSuiteTestParsingFailures. + NeoJSONValidation new runJsonTestSuiteTestParsingInfo. + +Logging goes to a file, neo-json-validation.log \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/closeLog.st b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/closeLog.st new file mode 100644 index 0000000..7ceefa9 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/closeLog.st @@ -0,0 +1,8 @@ +private +closeLog + logStream ifNotNil: [ + logStream close. + logStream := nil ]. + ^ self logFile exists + ifTrue: [ self logFile contents ] + ifFalse: [ 'log file is empty' ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/ensureLog.st b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/ensureLog.st new file mode 100644 index 0000000..c8241d6 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/ensureLog.st @@ -0,0 +1,6 @@ +private +ensureLog + logStream ifNil: [ + logStream := self logFile ensureDelete; writeStream. + logStream setToEnd ] + \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/gitDirectory..st b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/gitDirectory..st new file mode 100644 index 0000000..9325c2d --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/gitDirectory..st @@ -0,0 +1,3 @@ +accessing +gitDirectory: fileReference + gitDirectory := fileReference \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/gitDirectory.st b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/gitDirectory.st new file mode 100644 index 0000000..34c0c12 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/gitDirectory.st @@ -0,0 +1,3 @@ +accessing +gitDirectory + ^ gitDirectory ifNil: [ gitDirectory := FileLocator home / #Develop / #git ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteDirectory.st b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteDirectory.st new file mode 100644 index 0000000..e82a99d --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteDirectory.st @@ -0,0 +1,3 @@ +accessing +jsonTestSuiteDirectory + ^ self gitDirectory / #JSONTestSuite \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingDirectory.st b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingDirectory.st new file mode 100644 index 0000000..5a99df0 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingDirectory.st @@ -0,0 +1,3 @@ +accessing +jsonTestSuiteTestParsingDirectory + ^ self jsonTestSuiteDirectory / 'test_parsing' \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingFailFiles.st b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingFailFiles.st new file mode 100644 index 0000000..7f4ef80 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingFailFiles.st @@ -0,0 +1,3 @@ +accessing +jsonTestSuiteTestParsingFailFiles + ^ self jsonTestSuiteTestParsingDirectory childrenMatching: 'n_*.json' \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingInfoFiles.st b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingInfoFiles.st new file mode 100644 index 0000000..64c9fb9 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingInfoFiles.st @@ -0,0 +1,3 @@ +accessing +jsonTestSuiteTestParsingInfoFiles + ^ self jsonTestSuiteTestParsingDirectory childrenMatching: 'i_*.json' \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingPassFiles.st b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingPassFiles.st new file mode 100644 index 0000000..476bb03 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestParsingPassFiles.st @@ -0,0 +1,3 @@ +accessing +jsonTestSuiteTestParsingPassFiles + ^ self jsonTestSuiteTestParsingDirectory childrenMatching: 'y_*.json' \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestTransformDirectory.st b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestTransformDirectory.st new file mode 100644 index 0000000..b9a0706 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/jsonTestSuiteTestTransformDirectory.st @@ -0,0 +1,3 @@ +accessing +jsonTestSuiteTestTransformDirectory + ^ self jsonTestSuiteDirectory / 'test_transform' \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/log..st b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/log..st new file mode 100644 index 0000000..6b806e5 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/log..st @@ -0,0 +1,4 @@ +private +log: message + self ensureLog. + logStream nextPutAll: message; lf; flush diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/logFile.st b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/logFile.st new file mode 100644 index 0000000..ba58e23 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/logFile.st @@ -0,0 +1,3 @@ +private +logFile + ^ 'neo-json-validation.log' asFileReference \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkDataDirectory.st b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkDataDirectory.st new file mode 100644 index 0000000..211be52 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkDataDirectory.st @@ -0,0 +1,3 @@ +accessing +nativeJsonBenchmarkDataDirectory + ^ self nativeJsonBenchmarkDirectory / #data \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkDirectory.st b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkDirectory.st new file mode 100644 index 0000000..dd17440 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkDirectory.st @@ -0,0 +1,3 @@ +accessing +nativeJsonBenchmarkDirectory + ^ self gitDirectory / 'nativejson-benchmark' \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkJsonCheckerDirectory.st b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkJsonCheckerDirectory.st new file mode 100644 index 0000000..2bdf04c --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkJsonCheckerDirectory.st @@ -0,0 +1,3 @@ +accessing +nativeJsonBenchmarkJsonCheckerDirectory + ^ self nativeJsonBenchmarkDataDirectory / #jsonchecker \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkJsonCheckerFailFiles.st b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkJsonCheckerFailFiles.st new file mode 100644 index 0000000..3b7a188 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkJsonCheckerFailFiles.st @@ -0,0 +1,3 @@ +accessing +nativeJsonBenchmarkJsonCheckerFailFiles + ^ self nativeJsonBenchmarkJsonCheckerDirectory childrenMatching: 'fail*.json' \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkJsonCheckerPassFiles.st b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkJsonCheckerPassFiles.st new file mode 100644 index 0000000..c1df699 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkJsonCheckerPassFiles.st @@ -0,0 +1,3 @@ +accessing +nativeJsonBenchmarkJsonCheckerPassFiles + ^ self nativeJsonBenchmarkJsonCheckerDirectory childrenMatching: 'pass*.json' \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkRoundTripDirectory.st b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkRoundTripDirectory.st new file mode 100644 index 0000000..405b93b --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkRoundTripDirectory.st @@ -0,0 +1,3 @@ +accessing +nativeJsonBenchmarkRoundTripDirectory + ^ self nativeJsonBenchmarkDataDirectory / #roundtrip \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkRoundTripFiles.st b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkRoundTripFiles.st new file mode 100644 index 0000000..5029c8e --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/nativeJsonBenchmarkRoundTripFiles.st @@ -0,0 +1,3 @@ +accessing +nativeJsonBenchmarkRoundTripFiles + ^ self nativeJsonBenchmarkRoundTripDirectory children \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runJsonTestSuiteTestParsingFailures.st b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runJsonTestSuiteTestParsingFailures.st new file mode 100644 index 0000000..184c8f7 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runJsonTestSuiteTestParsingFailures.st @@ -0,0 +1,11 @@ +running +runJsonTestSuiteTestParsingFailures + ^ self + validateFiles: self jsonTestSuiteTestParsingFailFiles + usingTest: [ :file | + | data success | + success := false. + [ data := file readStreamDo: [ :in | (NeoJSONReader on: in) next; failIfNotAtEnd ] ] + on: NeoJSONParseError + do: [ :exception | self log: exception printString. success := true ]. + success ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runJsonTestSuiteTestParsingInfo.st b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runJsonTestSuiteTestParsingInfo.st new file mode 100644 index 0000000..f8455fb --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runJsonTestSuiteTestParsingInfo.st @@ -0,0 +1,11 @@ +running +runJsonTestSuiteTestParsingInfo + ^ self + validateFiles: self jsonTestSuiteTestParsingInfoFiles + usingTest: [ :file | + | data success | + success := true. + [ data := file readStreamDo: [ :in | (NeoJSONReader on: in) next ] ] + on: NeoJSONParseError + do: [ :exception | self log: exception printString. success := false ]. + success ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runJsonTestSuiteTestParsingPasses.st b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runJsonTestSuiteTestParsingPasses.st new file mode 100644 index 0000000..b825c57 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runJsonTestSuiteTestParsingPasses.st @@ -0,0 +1,11 @@ +running +runJsonTestSuiteTestParsingPasses + ^ self + validateFiles: self jsonTestSuiteTestParsingPassFiles + usingTest: [ :file | + | data success | + success := true. + [ data := file readStreamDo: [ :in | (NeoJSONReader on: in) next ] ] + on: NeoJSONParseError + do: [ :exception | self log: exception printString. success := false ]. + success ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runNativeJsonBenchmarkJsonCheckerFailures.st b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runNativeJsonBenchmarkJsonCheckerFailures.st new file mode 100644 index 0000000..cf2a3fb --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runNativeJsonBenchmarkJsonCheckerFailures.st @@ -0,0 +1,11 @@ +running +runNativeJsonBenchmarkJsonCheckerFailures + ^ self + validateFiles: self nativeJsonBenchmarkJsonCheckerFailFiles + usingTest: [ :file | + | data success | + success := false. + [ data := file readStreamDo: [ :in | (NeoJSONReader on: in) next; failIfNotAtEnd ] ] + on: NeoJSONParseError + do: [ :exception | self log: exception printString. success := true ]. + success ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runNativeJsonBenchmarkJsonCheckerPasses.st b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runNativeJsonBenchmarkJsonCheckerPasses.st new file mode 100644 index 0000000..dd7d42c --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runNativeJsonBenchmarkJsonCheckerPasses.st @@ -0,0 +1,11 @@ +running +runNativeJsonBenchmarkJsonCheckerPasses + ^ self + validateFiles: self nativeJsonBenchmarkJsonCheckerPassFiles + usingTest: [ :file | + | data success | + success := true. + [ data := file readStreamDo: [ :in | (NeoJSONReader on: in) next ] ] + on: NeoJSONParseError + do: [ :exception | self log: exception printString. success := false ]. + success ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runNativeJsonBenchmarkRoundTrip.st b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runNativeJsonBenchmarkRoundTrip.st new file mode 100644 index 0000000..945a380 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/runNativeJsonBenchmarkRoundTrip.st @@ -0,0 +1,9 @@ +running +runNativeJsonBenchmarkRoundTrip + ^ self + validateFiles: self nativeJsonBenchmarkRoundTripFiles + usingTest: [ :file | + | data json | + data := file readStreamDo: [ :in | (NeoJSONReader on: in) next ]. + json := NeoJSONWriter toString: data. + json = file contents ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/validateFiles.usingTest..st b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/validateFiles.usingTest..st new file mode 100644 index 0000000..4411f84 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/instance/validateFiles.usingTest..st @@ -0,0 +1,18 @@ +private +validateFiles: files usingTest: block + | total succeeded failed | + total := succeeded := failed := 0. + files do: [ :file | + | success | + self log: 'Running ' , file pathString. + self log: ([ file contents contractTo: 64 ] on: Error do: [ :exception | exception printString ]). + success := [ block value: file ] + on: Error + do: [ :exception | self log: ' Errored. ' , exception printString. false ]. + total := total + 1. + success + ifTrue: [ succeeded := succeeded + 1 ] + ifFalse: [ failed := failed + 1 ]. + self log: (success ifTrue: [ ' Succeeded' ] ifFalse: [ ' Failed' ]); log: '' ]. + self log: ('{1} total = {2} succeeded + {3} failed' format: (Array with: total with: succeeded with: failed) ). + ^ self closeLog \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/properties.json b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/properties.json new file mode 100644 index 0000000..475cf5c --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONValidation.class/properties.json @@ -0,0 +1,15 @@ +{ + "category" : "Neo-JSON-Tests", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + "gitDirectory", + "logStream" ], + "name" : "NeoJSONValidation", + "pools" : [ + ], + "super" : "Object", + "type" : "normal" } diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/README.md b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/README.md new file mode 100644 index 0000000..f24c05e --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/README.md @@ -0,0 +1 @@ +I am NeoJSONWriteReadAsciiOnlyTests. \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/instance/writeRead..st b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/instance/writeRead..st new file mode 100644 index 0000000..3b0a09c --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/instance/writeRead..st @@ -0,0 +1,6 @@ +private +writeRead: object + | json | + json := String streamContents: [ :stream | + (NeoJSONWriter on: stream) asciiOnly: true; nextPut: object ]. + ^ (NeoJSONReader on: json readStream) next \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/properties.json b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/properties.json new file mode 100644 index 0000000..c230f7a --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadAsciiOnlyTests.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "Neo-JSON-Tests", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + ], + "name" : "NeoJSONWriteReadAsciiOnlyTests", + "pools" : [ + ], + "super" : "NeoJSONWriteReadTests", + "type" : "normal" } diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadMockStreamTests.class/README.md b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadMockStreamTests.class/README.md new file mode 100644 index 0000000..4af70f7 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadMockStreamTests.class/README.md @@ -0,0 +1 @@ +I am NeoJSONWriteReadMockStreamTests. \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadMockStreamTests.class/instance/writeRead..st b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadMockStreamTests.class/instance/writeRead..st new file mode 100644 index 0000000..321ddba --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadMockStreamTests.class/instance/writeRead..st @@ -0,0 +1,8 @@ +private +writeRead: object + | json | + json := String streamContents: [ :stream | + (NeoJSONWriter on: (NeoJSONMockStream on: stream)) + prettyPrint: true; + nextPut: object ]. + ^ (NeoJSONReader on: (NeoJSONMockStream on: json readStream)) next \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadMockStreamTests.class/properties.json b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadMockStreamTests.class/properties.json new file mode 100644 index 0000000..f6dfe39 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadMockStreamTests.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "Neo-JSON-Tests", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + ], + "name" : "NeoJSONWriteReadMockStreamTests", + "pools" : [ + ], + "super" : "NeoJSONWriteReadTests", + "type" : "normal" } diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/README.md b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/README.md new file mode 100644 index 0000000..c23e56c --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/README.md @@ -0,0 +1 @@ +I am NeoJSONWriteReadPrettyPrintedTests. \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/testDictionaryOfObject2.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/testDictionaryOfObject2.st new file mode 100644 index 0000000..228293d --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/testDictionaryOfObject2.st @@ -0,0 +1,14 @@ +testing +testDictionaryOfObject2 + | data json reader | + data := Dictionary new. + data + at: 'one' put: NeoJSONTestObject2 example1; + at: 'two' put: NeoJSONTestObject2 example1. + json := NeoJSONWriter toStringPretty: data. + reader := NeoJSONReader on: json readStream. + reader for: #DictionaryOfObject2 customDo: [ :mapping | + mapping mapWithValueSchema: NeoJSONTestObject2 ]. + self + assert: (reader nextAs: #DictionaryOfObject2) + equals: data \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/testObject1.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/testObject1.st new file mode 100644 index 0000000..714bf15 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/testObject1.st @@ -0,0 +1,7 @@ +testing +testObject1 + | json | + json := NeoJSONWriter toStringPretty: NeoJSONTestObject1 example1. + self + assert: (NeoJSONReader fromString: json as: NeoJSONTestObject1) + equals: NeoJSONTestObject1 example1 \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/testObject2.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/testObject2.st new file mode 100644 index 0000000..2e7f041 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/testObject2.st @@ -0,0 +1,7 @@ +testing +testObject2 + | json | + json := NeoJSONWriter toStringPretty: NeoJSONTestObject2 example1. + self + assert: (NeoJSONReader fromString: json as: NeoJSONTestObject2) + equals: NeoJSONTestObject2 example1 \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/testObject3.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/testObject3.st new file mode 100644 index 0000000..0fb93f9 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/testObject3.st @@ -0,0 +1,7 @@ +testing +testObject3 + | json | + json := NeoJSONWriter toStringPretty: NeoJSONTestObject3 example1. + self + assert: (NeoJSONReader fromString: json as: NeoJSONTestObject3) + equals: NeoJSONTestObject3 example1 \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/writeRead..st b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/writeRead..st new file mode 100644 index 0000000..d653acb --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/instance/writeRead..st @@ -0,0 +1,8 @@ +private +writeRead: object + | json | + json := String streamContents: [ :stream | + (NeoJSONWriter on: stream) + prettyPrint: true; + nextPut: object ]. + ^ (NeoJSONReader on: json readStream) next \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/properties.json b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/properties.json new file mode 100644 index 0000000..9e69380 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "Neo-JSON-Tests", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + ], + "name" : "NeoJSONWriteReadPrettyPrintedTests", + "pools" : [ + ], + "super" : "NeoJSONWriteReadTests", + "type" : "normal" } diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/README.md b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/README.md new file mode 100644 index 0000000..9de032f --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/README.md @@ -0,0 +1 @@ +I am NeoJSONWriteReadTests. \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testDictionaryOfObject2.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testDictionaryOfObject2.st new file mode 100644 index 0000000..822240f --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testDictionaryOfObject2.st @@ -0,0 +1,14 @@ +testing +testDictionaryOfObject2 + | data json reader | + data := Dictionary new. + data + at: 'one' put: NeoJSONTestObject2 example1; + at: 'two' put: NeoJSONTestObject2 example1. + json := NeoJSONWriter toString: data. + reader := NeoJSONReader on: json readStream. + reader for: #DictionaryOfObject2 customDo: [ :mapping | + mapping mapWithValueSchema: NeoJSONTestObject2 ]. + self + assert: (reader nextAs: #DictionaryOfObject2) + equals: data \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testFloats.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testFloats.st new file mode 100644 index 0000000..1143b92 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testFloats.st @@ -0,0 +1,7 @@ +testing +testFloats + | objects | + objects := OrderedCollection new add: Float pi; add: 1.0; add: -1.0; add: 0.0; add: 1.5e6; add: -1.5e6; add: 1.5e-6; add: -1.5e-6; yourself. + (self writeRead: objects) + with: objects + do: [ :first :second | self assert: (first closeTo: second) ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testIntegers.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testIntegers.st new file mode 100644 index 0000000..48d1824 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testIntegers.st @@ -0,0 +1,7 @@ +testing +testIntegers + | objects | + objects := Array with: 1 with: -1 with: 0 with: 123467890 with: -1234567890. + self + assert: (self writeRead: objects) + equals: objects \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testLists.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testLists.st new file mode 100644 index 0000000..8018686 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testLists.st @@ -0,0 +1,7 @@ +testing +testLists + | objects | + objects := Array with: #(1 2 3) with: #() with: #( 'foo' 'bar'). + self + assert: (self writeRead: objects) + equals: objects \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testMaps.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testMaps.st new file mode 100644 index 0000000..41b6c5d --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testMaps.st @@ -0,0 +1,10 @@ +testing +testMaps + | objects | + objects := Array + with: Dictionary new + with: (Dictionary with: 'x' -> 1) + with: (Dictionary newFromPairs: #( 'foo' true 'bar' false 'zero' 0 'null' nil 'string' 'Hello World!' )). + self + assert: (self writeRead: objects) + equals: objects \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testObject1.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testObject1.st new file mode 100644 index 0000000..f71ba0e --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testObject1.st @@ -0,0 +1,7 @@ +testing +testObject1 + | json | + json := NeoJSONWriter toString: NeoJSONTestObject1 example1. + self + assert: (NeoJSONReader fromString: json as: NeoJSONTestObject1) + equals: NeoJSONTestObject1 example1 \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testObject2.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testObject2.st new file mode 100644 index 0000000..aa42f7b --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testObject2.st @@ -0,0 +1,7 @@ +testing +testObject2 + | json | + json := NeoJSONWriter toString: NeoJSONTestObject2 example1. + self + assert: (NeoJSONReader fromString: json as: NeoJSONTestObject2) + equals: NeoJSONTestObject2 example1 \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testObject3.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testObject3.st new file mode 100644 index 0000000..8c93100 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testObject3.st @@ -0,0 +1,7 @@ +testing +testObject3 + | json | + json := NeoJSONWriter toString: NeoJSONTestObject3 example1. + self + assert: (NeoJSONReader fromString: json as: NeoJSONTestObject3) + equals: NeoJSONTestObject3 example1 \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testSpecials.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testSpecials.st new file mode 100644 index 0000000..251ed3d --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testSpecials.st @@ -0,0 +1,7 @@ +testing +testSpecials + | objects | + objects := Array with: true with: false with: nil. + self + assert: (self writeRead: objects) + equals: objects \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testStrings.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testStrings.st new file mode 100644 index 0000000..6ebeaff --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testStrings.st @@ -0,0 +1,12 @@ +testing +testStrings + | objects | + objects := OrderedCollection new + add: 'foo'; add: 'Foo BAR'; add: ''; add: ' \\'''; + add: 'élève en Français'; + add: (Character codePoint: 12354) asString; "HIRAGANA LETTER A" + yourself; + asArray. + self + assert: (self writeRead: objects) + equals: objects \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/writeRead..st b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/writeRead..st new file mode 100644 index 0000000..d797887 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/writeRead..st @@ -0,0 +1,6 @@ +private +writeRead: object + | json | + json := String streamContents: [ :stream | + (NeoJSONWriter on: stream) nextPut: object ]. + ^ (NeoJSONReader on: json readStream) next \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/properties.json b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/properties.json new file mode 100644 index 0000000..1c39d34 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "Neo-JSON-Tests", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + ], + "name" : "NeoJSONWriteReadTests", + "pools" : [ + ], + "super" : "TestCase", + "type" : "normal" } diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/README.md b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/README.md new file mode 100644 index 0000000..a9f43f3 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/README.md @@ -0,0 +1 @@ +I am NeoJSONWriterTests, a test suite for NeoJSONWriter. \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testAsciiOnlyStrings.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testAsciiOnlyStrings.st new file mode 100644 index 0000000..c3ca857 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testAsciiOnlyStrings.st @@ -0,0 +1,25 @@ +testing +testAsciiOnlyStrings + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) + asciiOnly: true; + nextPut: object ] ]. + self assert: (writer value: 'élève français') equals: '"\u00E9l\u00E8ve fran\u00E7ais"'. + self assert: (writer value: 'foo') equals: '"foo"'. + self assert: (writer value: 'Foo BAR') equals: '"Foo BAR"'. + self assert: (writer value: '') equals: '""'. + self + assert: (writer value: (String withAll: ( OrderedCollection new + add: $"; + add: $\; + add: $/; + add: Character tab; + add: Character cr; + add: Character lf; + add: Character newPage; + add: Character backspace; + yourself ))) + equals: '"\"\\/\t\r\n\f\b"' + diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testAssociation.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testAssociation.st new file mode 100644 index 0000000..ecdeab6 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testAssociation.st @@ -0,0 +1,11 @@ +testing +testAssociation + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) + for: Association do: [ :mapping | + mapping mapAccessors: #(key value) ]; + nextPut: object ] ]. + self assert: (writer value: 'foo' -> 42) equals: '{"key":"foo","value":42}'. + self assert: (writer value: Association new) equals: '{}' \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testBooleans.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testBooleans.st new file mode 100644 index 0000000..bfa4647 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testBooleans.st @@ -0,0 +1,8 @@ +testing +testBooleans + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) nextPut: object ] ]. + self assert: (writer value: true) equals: 'true'. + self assert: (writer value: false) equals: 'false'. \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testByteArray.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testByteArray.st new file mode 100644 index 0000000..b9e2f7e --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testByteArray.st @@ -0,0 +1,8 @@ +testing +testByteArray + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) nextPut: object ] ]. + self assert: (writer value: #[1 2 3]) equals: '[1,2,3]'. + self assert: (writer value: #[]) equals: '[]' diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testDate.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testDate.st new file mode 100644 index 0000000..c2b810c --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testDate.st @@ -0,0 +1,10 @@ +testing +testDate + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) + for: Date customDo: [ :mapping | + mapping encoder: [ :date | date yyyymmdd ] ]; + nextPut: object ] ]. + self assert: (writer value: (Date fromString: '2012-06-08')) equals: '"2012-06-08"' \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testDateAndTime.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testDateAndTime.st new file mode 100644 index 0000000..9ba04ea --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testDateAndTime.st @@ -0,0 +1,12 @@ +testing +testDateAndTime + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) + for: DateAndTime customDo: [ :mapping | + mapping encoder: [ :dateAndTime | dateAndTime printString ] ]; + nextPut: object ] ]. + self + assert: (writer value: (DateAndTime year: 2012 month: 2 day: 14 hour: 16 minute: 40 second: 18 offset: 1 hour)) + equals: '"2012-02-14T16:40:18+01:00"' \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testFloatPrinter.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testFloatPrinter.st new file mode 100644 index 0000000..a90e148 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testFloatPrinter.st @@ -0,0 +1,18 @@ +testing +testFloatPrinter + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) + floatPrinter: NeoJSONFloatPrinter new; + nextPut: object ] ]. + self assert: (writer value: 123.0) equals: '123'. + self assert: (writer value: -123.0) equals: '-123'. + self assert: (writer value: 0.0) equals: '0'. + self assert: (writer value: 1.50) equals: '1.5'. + self assert: (writer value: -1.25) equals: '-1.25'. + self assert: (writer value: Float pi) equals: '3.14159'. + self assert: (writer value: 9.10938356e-31) equals: '9.10938e-31'. + self assert: (writer value: 5.9724e24) equals: '5.9724e24'. + self assert: (writer value: 1234567890.1234567890) equals: '1.23457e9'. + self assert: (writer value: (1/3) asFloat) equals: '0.33333'. \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testFloats.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testFloats.st new file mode 100644 index 0000000..74d0576 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testFloats.st @@ -0,0 +1,9 @@ +testing +testFloats + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) nextPut: object ] ]. + self assert: (writer value: 123.0) equals: '123.0'. + self assert: (writer value: -123.0) equals: '-123.0'. + self assert: (writer value: 0.0) equals: '0.0'. \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testIntegers.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testIntegers.st new file mode 100644 index 0000000..e939d11 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testIntegers.st @@ -0,0 +1,9 @@ +testing +testIntegers + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) nextPut: object ] ]. + self assert: (writer value: 123) equals: '123'. + self assert: (writer value: -123) equals: '-123'. + self assert: (writer value: 0) equals: '0'. \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testLists.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testLists.st new file mode 100644 index 0000000..44f6b40 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testLists.st @@ -0,0 +1,8 @@ +testing +testLists + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) nextPut: object ] ]. + self assert: (writer value: #(1 2 3)) equals: '[1,2,3]'. + self assert: (writer value: #()) equals: '[]'. diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testListsExtra.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testListsExtra.st new file mode 100644 index 0000000..6543c1b --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testListsExtra.st @@ -0,0 +1,10 @@ +testing +testListsExtra + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) nextPut: object ] ]. + #( OrderedCollection LinkedList ByteArray IntegerArray SortedCollection ) do: [ :each | + Smalltalk at: each ifPresent: [ :collectionClass | + self assert: (writer value: (collectionClass withAll: #(1 2 3))) equals: '[1,2,3]'. + self assert: (writer value: collectionClass new) equals: '[]' ] ] diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testMapKeysMustBeStrings.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testMapKeysMustBeStrings.st new file mode 100644 index 0000000..f28cce1 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testMapKeysMustBeStrings.st @@ -0,0 +1,8 @@ +testing +testMapKeysMustBeStrings + self should: [ NeoJSONWriter toString: { 1->#a } asDictionary ] raise: Error. + self should: [ NeoJSONWriter toString: { true->#a } asDictionary ] raise: Error. + self should: [ NeoJSONWriter toString: { nil->#a } asDictionary ] raise: Error. + self should: [ NeoJSONWriter toString: { #()->#a } asDictionary ] raise: Error. + self should: [ NeoJSONWriter toString: { Dictionary new->#a } asDictionary ] raise: Error. + self should: [ NeoJSONWriter toString: { Float pi->#a } asDictionary ] raise: Error. \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testMaps.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testMaps.st new file mode 100644 index 0000000..5207baf --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testMaps.st @@ -0,0 +1,9 @@ +testing +testMaps + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) nextPut: object ] ]. + self assert: ((writer value: (Dictionary newFromPairs: #( 'x' 1 'y' 2))) includesSubstring: '"x":1'). + self assert: ((writer value: (Dictionary newFromPairs: #( 'x' 1 'y' 2))) includesSubstring: '"y":2'). + self assert: (writer value: Dictionary new) equals: '{}'. diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testMapsExtra.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testMapsExtra.st new file mode 100644 index 0000000..1a931b3 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testMapsExtra.st @@ -0,0 +1,14 @@ +testing +testMapsExtra + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) nextPut: object ] ]. + self assert: (writer value: (IdentityDictionary newFromPairs: #( 'x' 1))) equals: '{"x":1}'. + self assert: (writer value: IdentityDictionary new) equals: '{}'. + #( SmallDictionary OrderedDictionary OrderedIdentityDictionary ) do: [ :each | + | dictionaryClass | + dictionaryClass := Smalltalk at: each ifAbsent: [ nil ]. + dictionaryClass ifNotNil: [ + self assert: (writer value: (dictionaryClass new at: 'x' put: 1; at: 'y' put: 2; yourself)) equals: '{"x":1,"y":2}'. + self assert: (writer value: dictionaryClass new) equals: '{}'] ] diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testNextPutStringAsHex.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testNextPutStringAsHex.st new file mode 100644 index 0000000..848a321 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testNextPutStringAsHex.st @@ -0,0 +1,13 @@ +testing +testNextPutStringAsHex + | output | + output := String + streamContents: [ :out | + (NeoJSONWriter on: out) + for: #StringAsHex + customDo: [ :mapping | + mapping + encoder: [ :x | x asByteArray hex asUppercase ]; + decoder: [ :x | (ByteArray readHexFrom: x) asString ] ]; + nextPut: 'Foo bar!' as: #StringAsHex ]. + self assert: output equals: '"466F6F2062617221"' \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testNonBMPCharacterEncoding.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testNonBMPCharacterEncoding.st new file mode 100644 index 0000000..5a5990d --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testNonBMPCharacterEncoding.st @@ -0,0 +1,9 @@ +testing +testNonBMPCharacterEncoding + "Characters not in the Basic Multilingual Plane are encoded as a UTF-16 surrogate pair" + + | string json | + string := 16r1D11E asCharacter asString. "MUSICAL SYMBOL G CLEF" + json := String streamContents: [ :out | + (NeoJSONWriter on: out) asciiOnly: true; nextPut: string ]. + self assert: json equals: '"\uD834\uDD1E"' \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testNull.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testNull.st new file mode 100644 index 0000000..e245a75 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testNull.st @@ -0,0 +1,7 @@ +testing +testNull + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) nextPut: object ] ]. + self assert: (writer value: nil) equals: 'null' \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPoint.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPoint.st new file mode 100644 index 0000000..7e034cb --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPoint.st @@ -0,0 +1,7 @@ +testing +testPoint + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) nextPut: object ] ]. + self should: [ writer value: 1@2 ] raise: NeoJSONMappingNotFound \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPoint1.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPoint1.st new file mode 100644 index 0000000..999b742 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPoint1.st @@ -0,0 +1,12 @@ +testing +testPoint1 + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) + for: Point do: [ :mapping | + mapping mapProperty: 'x' getter: [ :point | point x ] setter: [ :point :value | point x: value ]. + mapping mapProperty: 'y' getter: [ :point | point y ] setter: [ :point :value | point y: value ]. ]; + nextPut: object ] ]. + self assert: (writer value: 1@2) equals: '{"x":1,"y":2}'. + self assert: (writer value: Point new) equals: '{}' \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPoint2.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPoint2.st new file mode 100644 index 0000000..a95f303 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPoint2.st @@ -0,0 +1,10 @@ +testing +testPoint2 + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) + mapAllInstVarsFor: Point; + nextPut: object ] ]. + self assert: (writer value: 1@2) equals: '{"x":1,"y":2}'. + self assert: (writer value: Point new) equals: '{}' \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPoint3.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPoint3.st new file mode 100644 index 0000000..092cc14 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPoint3.st @@ -0,0 +1,11 @@ +testing +testPoint3 + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) + for: Point do: [ :mapping | + mapping mapInstVars: #(x y) ]; + nextPut: object ] ]. + self assert: (writer value: 1@2) equals: '{"x":1,"y":2}'. + self assert: (writer value: Point new) equals: '{}' \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPointUsingAsString.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPointUsingAsString.st new file mode 100644 index 0000000..dc45640 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPointUsingAsString.st @@ -0,0 +1,25 @@ +testing +testPointUsingAsString + | output | + output := String + streamContents: [ :out | + (NeoJSONWriter on: out) + for: Point + do: [ :mapping | + (mapping + mapProperty: #x + getter: [ :object | object x ] + setter: [ :object :value | object setX: value setY: object y ]) + valueSchema: #AsString. + (mapping + mapProperty: #y + getter: [ :object | object y ] + setter: [ :object :value | object setX: object x setY: value ]) + valueSchema: #AsString ]; + for: #AsString + customDo: [ :mapping | + mapping + encoder: [ :x | x asString ]; + decoder: [ :x | x asNumber ] ]; + nextPut: 1 @ 2 ]. + self assert: output equals: '{"x":"1","y":"2"}' \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPointWriteNil.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPointWriteNil.st new file mode 100644 index 0000000..de64211 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPointWriteNil.st @@ -0,0 +1,11 @@ +testing +testPointWriteNil + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) + writeNil: true; + mapAllInstVarsFor: Point; + nextPut: object ] ]. + self assert: (writer value: 1@2) equals: '{"x":1,"y":2}'. + self assert: (writer value: Point new) equals: '{"x":null,"y":null}' \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPreservePropertyOrder.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPreservePropertyOrder.st new file mode 100644 index 0000000..42d5bb9 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testPreservePropertyOrder.st @@ -0,0 +1,26 @@ +testing +testPreservePropertyOrder + | writer testObject | + (testObject := NeoJSONTestObject2 new) + id: 123; + width: 100; + height: 50; + data: 'test'. + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) + for: NeoJSONTestObject2 do: [ :mapping | mapping mapInstVars: #(id width height data) ]; + nextPut: object ] ]. + self assert: (writer value: testObject) equals: '{"id":123,"width":100,"height":50,"data":"test"}'. + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) + for: NeoJSONTestObject2 do: [ :mapping | mapping mapInstVars: #(width height data id) ]; + nextPut: object ] ]. + self assert: (writer value: testObject) equals: '{"width":100,"height":50,"data":"test","id":123}'. + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) + for: NeoJSONTestObject2 do: [ :mapping | mapping mapInstVars: #(data id height width) ]; + nextPut: object ] ]. + self assert: (writer value: testObject) equals: '{"data":"test","id":123,"height":50,"width":100}'. diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testStrings.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testStrings.st new file mode 100644 index 0000000..051223e --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testStrings.st @@ -0,0 +1,23 @@ +testing +testStrings + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) nextPut: object ] ]. + self assert: (writer value: 'foo') equals: '"foo"'. + self assert: (writer value: 'Foo BAR') equals: '"Foo BAR"'. + self assert: (writer value: '') equals: '""'. + self + assert: (writer value: (String withAll: ( OrderedCollection new + add: $"; + add: $\; + add: $/; + add: Character tab; + add: Character cr; + add: Character lf; + add: Character newPage; + add: Character backspace; + yourself ))) + equals: '"\"\\/\t\r\n\f\b"' + + diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testSymbol.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testSymbol.st new file mode 100644 index 0000000..b8c038c --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testSymbol.st @@ -0,0 +1,8 @@ +testing +testSymbol + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) nextPut: object ] ]. + self assert: (writer value: #foo) equals: '"foo"'. + self assert: (writer value: #'FOO-1') equals: '"FOO-1"' diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testTime.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testTime.st new file mode 100644 index 0000000..18da0ce --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testTime.st @@ -0,0 +1,10 @@ +testing +testTime + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) + for: Time customDo: [ :mapping | + mapping encoder: [ :time | time printString ] ]; + nextPut: object ] ]. + self assert: ((writer value: (Time fromSeconds: 52208)) includesSubstring: '2:30:08') \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/properties.json b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/properties.json new file mode 100644 index 0000000..02ad9cd --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "Neo-JSON-Tests", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + ], + "name" : "NeoJSONWriterTests", + "pools" : [ + ], + "super" : "TestCase", + "type" : "normal" } diff --git a/filetree/Neo-JSON-Tests.package/properties.json b/filetree/Neo-JSON-Tests.package/properties.json new file mode 100644 index 0000000..a097c63 --- /dev/null +++ b/filetree/Neo-JSON-Tests.package/properties.json @@ -0,0 +1,2 @@ +{ + } \ No newline at end of file diff --git a/filetree/properties.st b/filetree/properties.st new file mode 100644 index 0000000..1d56ae3 --- /dev/null +++ b/filetree/properties.st @@ -0,0 +1,4 @@ +{ + #format : 'filetree', + #convention : 'Monticello' +} diff --git a/repository/.properties b/repository/.properties index 53a5454..13c9868 100644 --- a/repository/.properties +++ b/repository/.properties @@ -1,3 +1,4 @@ { - #format : #tonel + #format : #tonel, + #convention : 'Monticello' } diff --git a/t2f2t/components/Core.ston b/t2f2t/components/Core.ston new file mode 100644 index 0000000..c3a3f03 --- /dev/null +++ b/t2f2t/components/Core.ston @@ -0,0 +1,8 @@ +RwSimpleProjectLoadComponentV2 { + #name : 'Core', + #condition : 'common', + #projectNames : [ ], + #componentNames : [ ], + #packageNames : [ ], + #comment : '' +} \ No newline at end of file diff --git a/t2f2t/filetree.ston b/t2f2t/filetree.ston new file mode 100644 index 0000000..11d88bb --- /dev/null +++ b/t2f2t/filetree.ston @@ -0,0 +1,11 @@ +RwProjectSpecificationV2 { + #specName : 'filetree', + #projectSpecPath : 't2f2t', + #componentsPath : 't2f2t/components', + #packagesPath : 'filetree', + #projectsPath : 't2f2t/projects', + #specsPath : 't2f2t/specs', + #packageFormat : 'filetree', + #packageConvention : 'Monticello', + #comment : '' +} \ No newline at end of file diff --git a/t2f2t/projects/README.md b/t2f2t/projects/README.md new file mode 100644 index 0000000..e69de29 diff --git a/t2f2t/specs/filetree.ston b/t2f2t/specs/filetree.ston new file mode 100644 index 0000000..900f663 --- /dev/null +++ b/t2f2t/specs/filetree.ston @@ -0,0 +1,10 @@ +RwLoadSpecificationV2 { + #specName : 'filetree', + #projectName : 't2f2tMeta', + #diskUrl : 'file:///home/tukan/Libraries/3rdPartyLibraries/neoJSON', + #projectSpecFile : 't2f2t/filetree.ston', + #componentNames : [ + 'Core' + ], + #comment : '' +} \ No newline at end of file diff --git a/t2f2t/specs/tonel.ston b/t2f2t/specs/tonel.ston new file mode 100644 index 0000000..bfa28ff --- /dev/null +++ b/t2f2t/specs/tonel.ston @@ -0,0 +1,10 @@ +RwLoadSpecificationV2 { + #specName : 'tonel', + #projectName : 't2f2tMeta', + #diskUrl : 'file:///home/tukan/Libraries/3rdPartyLibraries/neoJSON', + #projectSpecFile : 't2f2t/tonel.ston', + #componentNames : [ + 'Core' + ], + #comment : '' +} \ No newline at end of file diff --git a/t2f2t/tonel.ston b/t2f2t/tonel.ston new file mode 100644 index 0000000..4ac59d8 --- /dev/null +++ b/t2f2t/tonel.ston @@ -0,0 +1,11 @@ +RwProjectSpecificationV2 { + #specName : 'tonel', + #projectSpecPath : 't2f2t', + #componentsPath : 't2f2t/components', + #packagesPath : 'repository', + #projectsPath : 't2f2t/projects', + #specsPath : 't2f2t/specs', + #packageFormat : 'tonel', + #packageConvention : 'Monticello', + #comment : '' +} \ No newline at end of file From 5d57e9b0d47f3246a49830a0ca7cd97c160a7b6d Mon Sep 17 00:00:00 2001 From: Patrik Date: Tue, 30 Sep 2025 14:57:38 +0000 Subject: [PATCH 51/90] Group specific names should be capitalized - This seems to be standard in other libraries --- .../BaselineOfNeoJSON/BaselineOfNeoJSON.class.st | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/repository/BaselineOfNeoJSON/BaselineOfNeoJSON.class.st b/repository/BaselineOfNeoJSON/BaselineOfNeoJSON.class.st index b8c1e7d..e82dff6 100644 --- a/repository/BaselineOfNeoJSON/BaselineOfNeoJSON.class.st +++ b/repository/BaselineOfNeoJSON/BaselineOfNeoJSON.class.st @@ -17,15 +17,15 @@ BaselineOfNeoJSON >> baseline: spec [ package: 'Neo-JSON-Core'; package: 'Neo-JSON-Tests' with: [ spec requires: #('Neo-JSON-Core') ]; group: 'default' with: #('core' 'tests'); - group: 'core' with: #('Neo-JSON-Core'); - group: 'tests' with: #('Neo-JSON-Tests') ]. + group: 'Core' with: #('Neo-JSON-Core'); + group: 'Tests' with: #('Neo-JSON-Tests') ]. spec for: #pharo do: [ spec package: 'Neo-JSON-Pharo-Core' with: [ spec requires: #('Neo-JSON-Core') ]; package: 'Neo-JSON-Pharo-Tests' with: [ spec requires: #('Neo-JSON-Tests') ]; package: 'Neo-JSON-Pharo-Examples' with: [ spec requires: #('Neo-JSON-Core') ]; - group: 'core' with: #('Neo-JSON-Core' 'Neo-JSON-Pharo-Core'); - group: 'tests' with: #('Neo-JSON-Tests' 'Neo-JSON-Pharo-Tests'); - group: 'examples' with: #('Neo-JSON-Pharo-Examples') ]. + group: 'Core' with: #('Neo-JSON-Core' 'Neo-JSON-Pharo-Core'); + group: 'Tests' with: #('Neo-JSON-Tests' 'Neo-JSON-Pharo-Tests'); + group: 'Examples' with: #('Neo-JSON-Pharo-Examples') ]. ] From 571cc684cfde24eff0e14bd048032813ef3dac90 Mon Sep 17 00:00:00 2001 From: Patrik Date: Wed, 1 Oct 2025 08:15:49 +0000 Subject: [PATCH 52/90] Removing empty files --- .../NeoJSONMappingNotFound.class/instance/signaler..st | 0 .../NeoJSONMappingNotFound.class/instance/signaler.st | 0 2 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/signaler..st delete mode 100644 filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/signaler.st diff --git a/filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/signaler..st b/filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/signaler..st deleted file mode 100644 index e69de29..0000000 diff --git a/filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/signaler.st b/filetree/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/instance/signaler.st deleted file mode 100644 index e69de29..0000000 From 29a8af28aa7513114fd0a7812cab44b129670873 Mon Sep 17 00:00:00 2001 From: Patrik Date: Wed, 1 Oct 2025 08:55:28 +0000 Subject: [PATCH 53/90] Removing obsolete ConfigurationOf --- .../ConfigurationOfNeoJSON.package/.filetree | 4 - .../ConfigurationOfNeoJSON.class/README.md | 3 - .../class/DevelopmentSupport.st | 5 - .../class/baseConfigurationClassIfAbsent..st | 8 - .../class/catalogContactInfo.st | 3 - .../class/catalogDescription.st | 3 - .../class/catalogKeywords.st | 3 - .../class/ensureMetacello.st | 4 - .../class/ensureMetacelloBaseConfiguration.st | 14 - .../class/isMetacelloConfig.st | 5 - .../class/load.st | 8 - .../class/loadBleedingEdge.st | 8 - .../class/loadDevelopment.st | 8 - .../class/project.st | 4 - .../class/validate.st | 12 - .../instance/baseline1..st | 13 - .../instance/baseline2..st | 20 - .../instance/baseline3..st | 44 -- .../instance/bleedingEdge..st | 3 - .../instance/development..st | 3 - .../instance/project.st | 11 - .../instance/stable..st | 7 - .../instance/version1..st | 9 - .../instance/version10..st | 15 - .../instance/version11..st | 9 - .../instance/version12..st | 9 - .../instance/version13..st | 9 - .../instance/version14..st | 9 - .../instance/version15..st | 9 - .../instance/version16..st | 9 - .../instance/version17..st | 9 - .../instance/version2..st | 9 - .../instance/version3..st | 9 - .../instance/version30..st | 7 - .../instance/version4..st | 9 - .../instance/version5..st | 9 - .../instance/version6..st | 9 - .../instance/version7..st | 9 - .../instance/version8..st | 9 - .../instance/version9..st | 9 - .../properties.json | 14 - .../properties.json | 2 - .../instance/stable..st | 6 - .../methodProperties.json | 27 -- .../monticello.meta/version | 1 - .../ConfigurationOfNeoJSON.class.st | 440 ------------------ repository/ConfigurationOfNeoJSON/package.st | 1 - 47 files changed, 850 deletions(-) delete mode 100644 filetree/ConfigurationOfNeoJSON.package/.filetree delete mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/README.md delete mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/DevelopmentSupport.st delete mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/baseConfigurationClassIfAbsent..st delete mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogContactInfo.st delete mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogDescription.st delete mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogKeywords.st delete mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/ensureMetacello.st delete mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/ensureMetacelloBaseConfiguration.st delete mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/isMetacelloConfig.st delete mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/load.st delete mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/loadBleedingEdge.st delete mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/loadDevelopment.st delete mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/project.st delete mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/validate.st delete mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline1..st delete mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline2..st delete mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline3..st delete mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/bleedingEdge..st delete mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/development..st delete mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/project.st delete mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/stable..st delete mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version1..st delete mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version10..st delete mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version11..st delete mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version12..st delete mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version13..st delete mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version14..st delete mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version15..st delete mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version16..st delete mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version17..st delete mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version2..st delete mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version3..st delete mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version30..st delete mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version4..st delete mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version5..st delete mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version6..st delete mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version7..st delete mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version8..st delete mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version9..st delete mode 100644 filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/properties.json delete mode 100644 filetree/ConfigurationOfNeoJSON.package/properties.json delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/stable..st delete mode 100644 repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/methodProperties.json delete mode 100644 repository/ConfigurationOfNeoJSON.package/monticello.meta/version delete mode 100644 repository/ConfigurationOfNeoJSON/ConfigurationOfNeoJSON.class.st delete mode 100644 repository/ConfigurationOfNeoJSON/package.st diff --git a/filetree/ConfigurationOfNeoJSON.package/.filetree b/filetree/ConfigurationOfNeoJSON.package/.filetree deleted file mode 100644 index 8998102..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/.filetree +++ /dev/null @@ -1,4 +0,0 @@ -{ - "noMethodMetaData" : true, - "separateMethodMetaAndSource" : false, - "useCypressPropertiesFile" : true } diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/README.md b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/README.md deleted file mode 100644 index a4abe8c..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/README.md +++ /dev/null @@ -1,3 +0,0 @@ -I am ConfigurationOfNeoJSON, a Metacello configuration for NeoJSON. - -NeoJSON is a flexible and efficient reader and writer for JSON. \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/DevelopmentSupport.st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/DevelopmentSupport.st deleted file mode 100644 index f188387..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/DevelopmentSupport.st +++ /dev/null @@ -1,5 +0,0 @@ -development support -DevelopmentSupport - -"See the methods in the 'development support' category on the class-side of MetacelloBaseConfiguration. Decide what development support methods you would like to use and copy them the the class-side of your configuration." - diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/baseConfigurationClassIfAbsent..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/baseConfigurationClassIfAbsent..st deleted file mode 100644 index e906812..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/baseConfigurationClassIfAbsent..st +++ /dev/null @@ -1,8 +0,0 @@ -private -baseConfigurationClassIfAbsent: aBlock - - ^Smalltalk - at: #MetacelloBaseConfiguration - ifAbsent: [ - self ensureMetacelloBaseConfiguration. - Smalltalk at: #MetacelloBaseConfiguration ifAbsent: aBlock ]. diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogContactInfo.st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogContactInfo.st deleted file mode 100644 index ab72693..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogContactInfo.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -catalogContactInfo - ^ 'Written and maintained by Sven Van Caekenberghe (http://stfx.eu) and the community. Discussions on the Pharo mailing lists.' \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogDescription.st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogDescription.st deleted file mode 100644 index 19d3548..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogDescription.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -catalogDescription - ^ 'JSON (JavaScript Object Notation) is a popular data-interchange format. NeoJSON is an elegant and efficient standalone Smalltalk framework to read and write JSON converting to or from Smalltalk objects.' \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogKeywords.st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogKeywords.st deleted file mode 100644 index 6b63bcb..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/catalogKeywords.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -catalogKeywords - ^ #(format input output json serialization encoding text javascript) \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/ensureMetacello.st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/ensureMetacello.st deleted file mode 100644 index 869b381..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/ensureMetacello.st +++ /dev/null @@ -1,4 +0,0 @@ -private -ensureMetacello - - (self baseConfigurationClassIfAbsent: []) ensureMetacello \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/ensureMetacelloBaseConfiguration.st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/ensureMetacelloBaseConfiguration.st deleted file mode 100644 index 7605398..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/ensureMetacelloBaseConfiguration.st +++ /dev/null @@ -1,14 +0,0 @@ -private -ensureMetacelloBaseConfiguration - - Smalltalk - at: #MetacelloBaseConfiguration - ifAbsent: [ - | repository version | - repository := MCHttpRepository location: 'http://seaside.gemstone.com/ss/metacello' user: '' password: ''. - repository - versionReaderForFileNamed: 'Metacello-Base-DaleHenrichs.2.mcz' - do: [ :reader | - version := reader version. - version load. - version workingCopy repositoryGroup addRepository: repository ] ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/isMetacelloConfig.st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/isMetacelloConfig.st deleted file mode 100644 index 98d81c7..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/isMetacelloConfig.st +++ /dev/null @@ -1,5 +0,0 @@ -metacello tool support -isMetacelloConfig - "Answer true and the Metacello tools will operate on you" - - ^true \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/load.st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/load.st deleted file mode 100644 index cfb70d4..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/load.st +++ /dev/null @@ -1,8 +0,0 @@ -loading -load - "Load the #stable version defined for this platform. The #stable version is the version that is recommended to be used on this platform." - - "self load" - - - ^(self project version: #stable) load \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/loadBleedingEdge.st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/loadBleedingEdge.st deleted file mode 100644 index e780e1d..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/loadBleedingEdge.st +++ /dev/null @@ -1,8 +0,0 @@ -loading -loadBleedingEdge - "Load the latest versions of the mcz files defined for this project. It is not likely that the #bleedingEdge has been tested." - - "self loadBleedingEdge" - - - ^(self project version: #bleedingEdge) load \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/loadDevelopment.st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/loadDevelopment.st deleted file mode 100644 index 2ccd72a..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/loadDevelopment.st +++ /dev/null @@ -1,8 +0,0 @@ -loading -loadDevelopment - "Load the #development version defined for this platform. The #development version will change over time and is not expected to be stable." - - "self loadDevelopment" - - - ^(self project version: #development) load \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/project.st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/project.st deleted file mode 100644 index 925935b..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/project.st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -project - - ^self new project \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/validate.st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/validate.st deleted file mode 100644 index 589fc0b..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/class/validate.st +++ /dev/null @@ -1,12 +0,0 @@ -development support -validate - "Check the configuration for Errors, Critical Warnings, and Warnings (see class comment for MetacelloMCVersionValidator for more information). - Errors identify specification issues that will result in unexpected behaviour when you load the configuration. - Critical Warnings identify specification issues that may result in unexpected behavior when you load the configuration. - Warnings identify specification issues that are technically correct, but are worth take a look at." - - "self validate" - - - self ensureMetacello. - ^ ((Smalltalk at: #MetacelloToolBox) validateConfiguration: self debug: #() recurse: false) explore \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline1..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline1..st deleted file mode 100644 index 85f7a25..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline1..st +++ /dev/null @@ -1,13 +0,0 @@ -baselines -baseline1: spec - - - spec for: #common do: [ - spec - blessing: #baseline; - repository: 'http://mc.stfx.eu/Neo'; - package: 'Neo-JSON-Core'; - package: 'Neo-JSON-Tests' with: [ spec requires: 'Neo-JSON-Core' ]; - group: 'default' with: #('Neo-JSON-Core' 'Neo-JSON-Tests'); - group: 'Core' with: #('Neo-JSON-Core'); - group: 'Tests' with: #('Neo-JSON-Tests') ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline2..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline2..st deleted file mode 100644 index b553d76..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline2..st +++ /dev/null @@ -1,20 +0,0 @@ -baselines -baseline2: spec - - spec - for: #common - do: [ - spec - blessing: #baseline; - repository: 'http://mc.stfx.eu/Neo'; - package: 'Neo-JSON-Core'; - package: 'Neo-JSON-Tests' with: [ spec requires: 'Neo-JSON-Core' ]; - group: 'default' with: #('Neo-JSON-Core' 'Neo-JSON-Tests'); - group: 'Core' with: #('Neo-JSON-Core'); - group: 'Tests' with: #('Neo-JSON-Tests') ]. - spec - for: #gemstone - do: [ - spec - baseline: 'NeoJSON' with: [ spec repository: 'github://GsDevKit/NeoJSON:master/repository' ]; - import: 'NeoJSON' ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline3..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline3..st deleted file mode 100644 index 0ccdffd..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/baseline3..st +++ /dev/null @@ -1,44 +0,0 @@ -baselines -baseline3: spec - - spec - for: #common - do: [ - spec - blessing: #baseline; - repository: 'http://mc.stfx.eu/Neo'; - package: 'Neo-JSON-Core'; - package: 'Neo-JSON-Tests' with: [ spec requires: 'Neo-JSON-Core' ]; - group: 'default' with: #('Core' 'Tests'); - group: 'Core' with: #('Neo-JSON-Core'); - group: 'Tests' with: #('Neo-JSON-Tests') ]. - - - spec - for: #pharo - do: [ - - spec - package: 'Neo-JSON-Pharo-Examples' with: [ spec requires: 'Neo-JSON-Core' ]; - group: 'Examples' with: #('Neo-JSON-Pharo-Examples'). - - "So far, it only contains Pharo-Specific extensions" - spec - package: 'Neo-JSON-Pharo-Core' with: [ spec requires: #( 'Neo-JSON-Core') ]; - package: 'Neo-JSON-Pharo-Tests' with: [ spec requires: #( 'Neo-JSON-Tests') ]; - group: 'Core' with: #('Neo-JSON-Core' 'Neo-JSON-Pharo-Core'). - - "CoreVASTExport group is used when we are exporting code to be later imported in VAST/ENVY via Monticello Importer. 'Neo-JSON-VASTMock' should not be imported in ENVY....its goal is that in 'Neo-JSON-VAST-Core' we can define extension methods to classes defined in VAST but not existing in Pharo. So in 'Neo-JSON-VASTMock' we simply create dummy classes with the sole purpose of being able to define extension methods for it. " - spec - package: 'Neo-JSON-VASTMock'; - package: 'Neo-JSON-VAST-Core' with: [ spec requires: #('Neo-JSON-VASTMock' 'Neo-JSON-Core') ]; - package: 'Neo-JSON-VAST-Tests' with: [ spec requires: #( 'Neo-JSON-Tests') ]; - group: 'CoreVASTExport' with: #('Neo-JSON-Core' 'Neo-JSON-VAST-Core' 'Tests' 'Neo-JSON-VAST-Tests' ). - ]. - - spec - for: #gemstone - do: [ - spec - baseline: 'NeoJSON' with: [ spec repository: 'github://GsDevKit/NeoJSON:master/repository' ]; - import: 'NeoJSON' ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/bleedingEdge..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/bleedingEdge..st deleted file mode 100644 index a61a59c..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/bleedingEdge..st +++ /dev/null @@ -1,3 +0,0 @@ -symbolic versions -bleedingEdge: spec - \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/development..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/development..st deleted file mode 100644 index 0e26382..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/development..st +++ /dev/null @@ -1,3 +0,0 @@ -symbolic versions -development: spec - \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/project.st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/project.st deleted file mode 100644 index 43dcd87..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/project.st +++ /dev/null @@ -1,11 +0,0 @@ -accessing -project - - ^ project ifNil: [ | constructor | - "Bootstrap Metacello if it is not already loaded" - (self class baseConfigurationClassIfAbsent: []) ensureMetacello. - "Construct Metacello project" - constructor := (Smalltalk at: #MetacelloVersionConstructor) on: self. - project := constructor project. - project loadType: #linear. "change to #atomic if desired" - project ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/stable..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/stable..st deleted file mode 100644 index 75b8772..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/stable..st +++ /dev/null @@ -1,7 +0,0 @@ -symbolic versions -stable: spec - - - spec for: #common version: '17'. - - spec for: #gemstone version: '13'. \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version1..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version1..st deleted file mode 100644 index efbc61f..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version1..st +++ /dev/null @@ -1,9 +0,0 @@ -versions -version1: spec - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.17'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.15' ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version10..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version10..st deleted file mode 100644 index 1b56b4b..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version10..st +++ /dev/null @@ -1,15 +0,0 @@ -versions -version10: spec - - spec - for: #common - do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.27'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.24' ]. - spec - for: #'gs3.x' - do: [ - spec import: 'NeoJSON'. - spec baseline: 'NeoJSON' with: [ spec repository: 'github://GsDevKit/NeoJSON:master/repository' ] ] diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version11..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version11..st deleted file mode 100644 index 029a804..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version11..st +++ /dev/null @@ -1,9 +0,0 @@ -versions -version11: spec - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.30'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.30' ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version12..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version12..st deleted file mode 100644 index 5d52f09..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version12..st +++ /dev/null @@ -1,9 +0,0 @@ -versions -version12: spec - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.31'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.31' ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version13..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version13..st deleted file mode 100644 index 83dc556..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version13..st +++ /dev/null @@ -1,9 +0,0 @@ -versions -version13: spec - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.33'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.33' ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version14..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version14..st deleted file mode 100644 index ab5ba02..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version14..st +++ /dev/null @@ -1,9 +0,0 @@ -versions -version14: spec - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.37'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.35' ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version15..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version15..st deleted file mode 100644 index 1b2daac..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version15..st +++ /dev/null @@ -1,9 +0,0 @@ -versions -version15: spec - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.37'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.36' ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version16..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version16..st deleted file mode 100644 index 2da79b3..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version16..st +++ /dev/null @@ -1,9 +0,0 @@ -versions -version16: spec - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.42'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.39' ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version17..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version17..st deleted file mode 100644 index aae7af6..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version17..st +++ /dev/null @@ -1,9 +0,0 @@ -versions -version17: spec - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.46'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.44' ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version2..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version2..st deleted file mode 100644 index 4b57665..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version2..st +++ /dev/null @@ -1,9 +0,0 @@ -versions -version2: spec - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.19'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.16' ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version3..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version3..st deleted file mode 100644 index 7731134..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version3..st +++ /dev/null @@ -1,9 +0,0 @@ -versions -version3: spec - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.20'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.16' ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version30..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version30..st deleted file mode 100644 index a33fb3b..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version30..st +++ /dev/null @@ -1,7 +0,0 @@ -versions -version30: spec - - - spec for: #common do: [ - spec - blessing: #development ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version4..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version4..st deleted file mode 100644 index f356d39..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version4..st +++ /dev/null @@ -1,9 +0,0 @@ -versions -version4: spec - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.23'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.18' ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version5..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version5..st deleted file mode 100644 index ce3a48c..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version5..st +++ /dev/null @@ -1,9 +0,0 @@ -versions -version5: spec - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.24'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.19' ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version6..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version6..st deleted file mode 100644 index 47d529b..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version6..st +++ /dev/null @@ -1,9 +0,0 @@ -versions -version6: spec - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.24'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.20' ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version7..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version7..st deleted file mode 100644 index dc49603..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version7..st +++ /dev/null @@ -1,9 +0,0 @@ -versions -version7: spec - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.24'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.21' ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version8..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version8..st deleted file mode 100644 index e827cd3..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version8..st +++ /dev/null @@ -1,9 +0,0 @@ -versions -version8: spec - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.24'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.22' ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version9..st b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version9..st deleted file mode 100644 index 94a6e04..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/version9..st +++ /dev/null @@ -1,9 +0,0 @@ -versions -version9: spec - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.27'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.24' ] \ No newline at end of file diff --git a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/properties.json b/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/properties.json deleted file mode 100644 index 3556e1f..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/properties.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "category" : "ConfigurationOfNeoJSON", - "classinstvars" : [ - ], - "classvars" : [ - "LastVersionLoad" ], - "commentStamp" : "", - "instvars" : [ - "project" ], - "name" : "ConfigurationOfNeoJSON", - "pools" : [ - ], - "super" : "Object", - "type" : "normal" } diff --git a/filetree/ConfigurationOfNeoJSON.package/properties.json b/filetree/ConfigurationOfNeoJSON.package/properties.json deleted file mode 100644 index a097c63..0000000 --- a/filetree/ConfigurationOfNeoJSON.package/properties.json +++ /dev/null @@ -1,2 +0,0 @@ -{ - } \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/stable..st b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/stable..st deleted file mode 100644 index 30d7696..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/instance/stable..st +++ /dev/null @@ -1,6 +0,0 @@ -symbolic versions -stable: spec - - - spec for: #common version: '9'. - spec for: #gemstone version: '10'. diff --git a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/methodProperties.json b/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/methodProperties.json deleted file mode 100644 index af307b3..0000000 --- a/repository/ConfigurationOfNeoJSON.package/ConfigurationOfNeoJSON.class/methodProperties.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "class" : { - "DevelopmentSupport" : "SvenVanCaekenberghe 6/22/2012 16:48", - "baseConfigurationClassIfAbsent:" : "SvenVanCaekenberghe 6/22/2012 16:48", - "ensureMetacello" : "SvenVanCaekenberghe 6/22/2012 16:48", - "ensureMetacelloBaseConfiguration" : "SvenVanCaekenberghe 6/22/2012 16:48", - "isMetacelloConfig" : "SvenVanCaekenberghe 6/22/2012 16:48", - "load" : "SvenVanCaekenberghe 6/22/2012 16:48", - "loadBleedingEdge" : "SvenVanCaekenberghe 6/22/2012 16:48", - "loadDevelopment" : "SvenVanCaekenberghe 6/22/2012 16:48", - "project" : "SvenVanCaekenberghe 6/22/2012 16:48", - "validate" : "SvenVanCaekenberghe 6/22/2012 16:48" }, - "instance" : { - "baseline1:" : "SvenVanCaekenberghe 6/22/2012 16:53", - "baseline2:" : "PaulDeBruicker 11/2/2014 20:39", - "project" : "SvenVanCaekenberghe 6/22/2012 16:48", - "stable:" : "PaulDeBruicker 11/2/2014 20:39", - "version10:" : "PaulDeBruicker 11/2/2014 20:40", - "version1:" : "SvenVanCaekenberghe 9/27/2012 20:29", - "version2:" : "SvenVanCaekenberghe 12/18/2012 10:27", - "version3:" : "SvenVanCaekenberghe 5/29/2013 15:54", - "version4:" : "SvenVanCaekenberghe 8/30/2013 11:12", - "version5:" : "SvenVanCaekenberghe 9/3/2013 12:22", - "version6:" : "SvenVanCaekenberghe 12/27/2013 19:02", - "version7:" : "SvenVanCaekenberghe 12/27/2013 21:44", - "version8:" : "SvenVanCaekenberghe 1/21/2014 20:08", - "version9:" : "SvenVanCaekenberghe 4/24/2014 13:29" } } diff --git a/repository/ConfigurationOfNeoJSON.package/monticello.meta/version b/repository/ConfigurationOfNeoJSON.package/monticello.meta/version deleted file mode 100644 index 0b2bf29..0000000 --- a/repository/ConfigurationOfNeoJSON.package/monticello.meta/version +++ /dev/null @@ -1 +0,0 @@ -(name 'ConfigurationOfNeoJSON-PaulDeBruicker.11' message 'Added GemStone to the configuration' id '568062a9-b890-418e-91f1-428f5ed94522' date '2 November 2014' time '8:40:58.359238 pm' author 'PaulDeBruicker' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.10' message 'updated to #stable v9' id '14b025d0-da85-481f-924f-39f5fbdbc929' date '24 April 2014' time '1:30:05.463071 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.9' message 'v8' id '7ed1d4a7-e738-401a-9cac-69b85aa16b2e' date '21 January 2014' time '8:08:56.986201 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.8' message 'updated to stable v7' id '679ab4c1-1a64-426f-89ca-21722fc74519' date '27 December 2013' time '9:45:29.870451 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.7' message 'updated to stable v6' id '820b367a-f793-4fac-b5a2-1dd1ac73e48e' date '27 December 2013' time '7:03:35.869612 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.6' message 'New feature: NeoJSONWriter>>#asciiOnly: to escape all non ASCII characters in strings' id '27393a62-ca8a-4ad4-808c-ab2f6af1eff3' date '3 September 2013' time '12:23:21.522443 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.5' message 'updated to v4' id '7a79620f-07ab-4204-b37d-160779d1b946' date '30 August 2013' time '11:12:49.896139 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.4' message 'stable v3' id '8351f635-abd1-44eb-803b-05ae75b962d8' date '29 May 2013' time '3:54:34.113576 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.3' message 'stable version 2' id '4b6f70ed-72be-4f87-82a6-2f9745d99eba' date '18 December 2012' time '10:28:02.924 am' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.2' message 'added spec blessing: #release to all versiosn' id 'da8a252c-180e-4245-84d6-c0f0b3c43d8d' date '27 September 2012' time '8:30:34.121 pm' author 'SvenVanCaekenberghe' ancestors ((name 'ConfigurationOfNeoJSON-SvenVanCaekenberghe.1' message '1st version' id '43b49eb6-24b6-4665-a7b7-88fafe008cf9' date '22 June 2012' time '4:56:37.24 pm' author 'SvenVanCaekenberghe' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ()) \ No newline at end of file diff --git a/repository/ConfigurationOfNeoJSON/ConfigurationOfNeoJSON.class.st b/repository/ConfigurationOfNeoJSON/ConfigurationOfNeoJSON.class.st deleted file mode 100644 index bc352da..0000000 --- a/repository/ConfigurationOfNeoJSON/ConfigurationOfNeoJSON.class.st +++ /dev/null @@ -1,440 +0,0 @@ -" -I am ConfigurationOfNeoJSON, a Metacello configuration for NeoJSON. - -NeoJSON is a flexible and efficient reader and writer for JSON. -" -Class { - #name : #ConfigurationOfNeoJSON, - #superclass : #Object, - #instVars : [ - 'project' - ], - #classVars : [ - 'LastVersionLoad' - ], - #category : 'ConfigurationOfNeoJSON' -} - -{ #category : #'development support' } -ConfigurationOfNeoJSON class >> DevelopmentSupport [ - -"See the methods in the 'development support' category on the class-side of MetacelloBaseConfiguration. Decide what development support methods you would like to use and copy them the the class-side of your configuration." - - -] - -{ #category : #private } -ConfigurationOfNeoJSON class >> baseConfigurationClassIfAbsent: aBlock [ - - ^Smalltalk - at: #MetacelloBaseConfiguration - ifAbsent: [ - self ensureMetacelloBaseConfiguration. - Smalltalk at: #MetacelloBaseConfiguration ifAbsent: aBlock ]. - -] - -{ #category : #accessing } -ConfigurationOfNeoJSON class >> catalogContactInfo [ - ^ 'Written and maintained by Sven Van Caekenberghe (http://stfx.eu) and the community. Discussions on the Pharo mailing lists.' -] - -{ #category : #accessing } -ConfigurationOfNeoJSON class >> catalogDescription [ - ^ 'JSON (JavaScript Object Notation) is a popular data-interchange format. NeoJSON is an elegant and efficient standalone Smalltalk framework to read and write JSON converting to or from Smalltalk objects.' -] - -{ #category : #accessing } -ConfigurationOfNeoJSON class >> catalogKeywords [ - ^ #(format input output json serialization encoding text javascript) -] - -{ #category : #private } -ConfigurationOfNeoJSON class >> ensureMetacello [ - - (self baseConfigurationClassIfAbsent: []) ensureMetacello -] - -{ #category : #private } -ConfigurationOfNeoJSON class >> ensureMetacelloBaseConfiguration [ - - Smalltalk - at: #MetacelloBaseConfiguration - ifAbsent: [ - | repository version | - repository := MCHttpRepository location: 'http://seaside.gemstone.com/ss/metacello' user: '' password: ''. - repository - versionReaderForFileNamed: 'Metacello-Base-DaleHenrichs.2.mcz' - do: [ :reader | - version := reader version. - version load. - version workingCopy repositoryGroup addRepository: repository ] ] -] - -{ #category : #'metacello tool support' } -ConfigurationOfNeoJSON class >> isMetacelloConfig [ - "Answer true and the Metacello tools will operate on you" - - ^true -] - -{ #category : #loading } -ConfigurationOfNeoJSON class >> load [ - "Load the #stable version defined for this platform. The #stable version is the version that is recommended to be used on this platform." - - "self load" - - - ^(self project version: #stable) load -] - -{ #category : #loading } -ConfigurationOfNeoJSON class >> loadBleedingEdge [ - "Load the latest versions of the mcz files defined for this project. It is not likely that the #bleedingEdge has been tested." - - "self loadBleedingEdge" - - - ^(self project version: #bleedingEdge) load -] - -{ #category : #loading } -ConfigurationOfNeoJSON class >> loadDevelopment [ - "Load the #development version defined for this platform. The #development version will change over time and is not expected to be stable." - - "self loadDevelopment" - - - ^(self project version: #development) load -] - -{ #category : #accessing } -ConfigurationOfNeoJSON class >> project [ - - ^self new project -] - -{ #category : #'development support' } -ConfigurationOfNeoJSON class >> validate [ - "Check the configuration for Errors, Critical Warnings, and Warnings (see class comment for MetacelloMCVersionValidator for more information). - Errors identify specification issues that will result in unexpected behaviour when you load the configuration. - Critical Warnings identify specification issues that may result in unexpected behavior when you load the configuration. - Warnings identify specification issues that are technically correct, but are worth take a look at." - - "self validate" - - - self ensureMetacello. - ^ ((Smalltalk at: #MetacelloToolBox) validateConfiguration: self debug: #() recurse: false) explore -] - -{ #category : #baselines } -ConfigurationOfNeoJSON >> baseline1: spec [ - - - spec for: #common do: [ - spec - blessing: #baseline; - repository: 'http://mc.stfx.eu/Neo'; - package: 'Neo-JSON-Core'; - package: 'Neo-JSON-Tests' with: [ spec requires: 'Neo-JSON-Core' ]; - group: 'default' with: #('Neo-JSON-Core' 'Neo-JSON-Tests'); - group: 'Core' with: #('Neo-JSON-Core'); - group: 'Tests' with: #('Neo-JSON-Tests') ] -] - -{ #category : #baselines } -ConfigurationOfNeoJSON >> baseline2: spec [ - - spec - for: #common - do: [ - spec - blessing: #baseline; - repository: 'http://mc.stfx.eu/Neo'; - package: 'Neo-JSON-Core'; - package: 'Neo-JSON-Tests' with: [ spec requires: 'Neo-JSON-Core' ]; - group: 'default' with: #('Neo-JSON-Core' 'Neo-JSON-Tests'); - group: 'Core' with: #('Neo-JSON-Core'); - group: 'Tests' with: #('Neo-JSON-Tests') ]. - spec - for: #gemstone - do: [ - spec - baseline: 'NeoJSON' with: [ spec repository: 'github://GsDevKit/NeoJSON:master/repository' ]; - import: 'NeoJSON' ] -] - -{ #category : #baselines } -ConfigurationOfNeoJSON >> baseline3: spec [ - - spec - for: #common - do: [ - spec - blessing: #baseline; - repository: 'http://mc.stfx.eu/Neo'; - package: 'Neo-JSON-Core'; - package: 'Neo-JSON-Tests' with: [ spec requires: 'Neo-JSON-Core' ]; - group: 'default' with: #('Core' 'Tests'); - group: 'Core' with: #('Neo-JSON-Core'); - group: 'Tests' with: #('Neo-JSON-Tests') ]. - - - spec - for: #pharo - do: [ - - spec - package: 'Neo-JSON-Pharo-Examples' with: [ spec requires: 'Neo-JSON-Core' ]; - group: 'Examples' with: #('Neo-JSON-Pharo-Examples'). - - "So far, it only contains Pharo-Specific extensions" - spec - package: 'Neo-JSON-Pharo-Core' with: [ spec requires: #( 'Neo-JSON-Core') ]; - package: 'Neo-JSON-Pharo-Tests' with: [ spec requires: #( 'Neo-JSON-Tests') ]; - group: 'Core' with: #('Neo-JSON-Core' 'Neo-JSON-Pharo-Core'). - - "CoreVASTExport group is used when we are exporting code to be later imported in VAST/ENVY via Monticello Importer. 'Neo-JSON-VASTMock' should not be imported in ENVY....its goal is that in 'Neo-JSON-VAST-Core' we can define extension methods to classes defined in VAST but not existing in Pharo. So in 'Neo-JSON-VASTMock' we simply create dummy classes with the sole purpose of being able to define extension methods for it. " - spec - package: 'Neo-JSON-VASTMock'; - package: 'Neo-JSON-VAST-Core' with: [ spec requires: #('Neo-JSON-VASTMock' 'Neo-JSON-Core') ]; - package: 'Neo-JSON-VAST-Tests' with: [ spec requires: #( 'Neo-JSON-Tests') ]; - group: 'CoreVASTExport' with: #('Neo-JSON-Core' 'Neo-JSON-VAST-Core' 'Tests' 'Neo-JSON-VAST-Tests' ). - ]. - - spec - for: #gemstone - do: [ - spec - baseline: 'NeoJSON' with: [ spec repository: 'github://GsDevKit/NeoJSON:master/repository' ]; - import: 'NeoJSON' ] -] - -{ #category : #'symbolic versions' } -ConfigurationOfNeoJSON >> bleedingEdge: spec [ - -] - -{ #category : #'symbolic versions' } -ConfigurationOfNeoJSON >> development: spec [ - -] - -{ #category : #accessing } -ConfigurationOfNeoJSON >> project [ - - ^ project ifNil: [ | constructor | - "Bootstrap Metacello if it is not already loaded" - (self class baseConfigurationClassIfAbsent: []) ensureMetacello. - "Construct Metacello project" - constructor := (Smalltalk at: #MetacelloVersionConstructor) on: self. - project := constructor project. - project loadType: #linear. "change to #atomic if desired" - project ] -] - -{ #category : #'symbolic versions' } -ConfigurationOfNeoJSON >> stable: spec [ - - - spec for: #common version: '17'. - - spec for: #gemstone version: '13'. -] - -{ #category : #versions } -ConfigurationOfNeoJSON >> version10: spec [ - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.29'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.26' ] -] - -{ #category : #versions } -ConfigurationOfNeoJSON >> version11: spec [ - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.30'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.30' ] -] - -{ #category : #versions } -ConfigurationOfNeoJSON >> version12: spec [ - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.31'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.31' ] -] - -{ #category : #versions } -ConfigurationOfNeoJSON >> version13: spec [ - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.33'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.33' ] -] - -{ #category : #versions } -ConfigurationOfNeoJSON >> version14: spec [ - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.37'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.35' ] -] - -{ #category : #versions } -ConfigurationOfNeoJSON >> version15: spec [ - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.37'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.36' ] -] - -{ #category : #versions } -ConfigurationOfNeoJSON >> version16: spec [ - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.42'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.39' ] -] - -{ #category : #versions } -ConfigurationOfNeoJSON >> version17: spec [ - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.46'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.44' ] -] - -{ #category : #versions } -ConfigurationOfNeoJSON >> version1: spec [ - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.17'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.15' ] -] - -{ #category : #versions } -ConfigurationOfNeoJSON >> version2: spec [ - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.19'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.16' ] -] - -{ #category : #versions } -ConfigurationOfNeoJSON >> version30: spec [ - - - spec for: #common do: [ - spec - blessing: #development ] -] - -{ #category : #versions } -ConfigurationOfNeoJSON >> version3: spec [ - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.20'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.16' ] -] - -{ #category : #versions } -ConfigurationOfNeoJSON >> version4: spec [ - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.23'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.18' ] -] - -{ #category : #versions } -ConfigurationOfNeoJSON >> version5: spec [ - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.24'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.19' ] -] - -{ #category : #versions } -ConfigurationOfNeoJSON >> version6: spec [ - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.24'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.20' ] -] - -{ #category : #versions } -ConfigurationOfNeoJSON >> version7: spec [ - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.24'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.21' ] -] - -{ #category : #versions } -ConfigurationOfNeoJSON >> version8: spec [ - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.24'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.22' ] -] - -{ #category : #versions } -ConfigurationOfNeoJSON >> version9: spec [ - - - spec for: #common do: [ - spec - blessing: #release; - package: 'Neo-JSON-Core' with: 'Neo-JSON-Core-SvenVanCaekenberghe.27'; - package: 'Neo-JSON-Tests' with: 'Neo-JSON-Tests-SvenVanCaekenberghe.24' ] -] diff --git a/repository/ConfigurationOfNeoJSON/package.st b/repository/ConfigurationOfNeoJSON/package.st deleted file mode 100644 index 759f18e..0000000 --- a/repository/ConfigurationOfNeoJSON/package.st +++ /dev/null @@ -1 +0,0 @@ -Package { #name : #ConfigurationOfNeoJSON } From fc8301fab56fd750a66c8d90faa3eb13419c25c6 Mon Sep 17 00:00:00 2001 From: Patrik Date: Wed, 1 Oct 2025 08:57:06 +0000 Subject: [PATCH 54/90] Adjusting baseline to load all code to GemStone - Creating same -Core -Examples and -Tests packages for GemStone filetree only for now --- .../instance/baseline..st | 11 ++++++- .../Neo-JSON-GemStone-Core.package/.filetree | 4 +++ .../instance/neoJsonOn..st | 3 ++ .../properties.json | 2 ++ .../instance/neoJsonOn..st | 3 ++ .../SmallDictionary.extension/properties.json | 3 ++ .../properties.json | 2 ++ .../.filetree | 4 +++ .../Attachment.class/README.md | 0 .../Attachment.class/instance/fileName..st | 3 ++ .../Attachment.class/instance/url..st | 3 ++ .../Attachment.class/properties.json | 15 +++++++++ .../BittrexResponse.class/README.md | 0 .../BittrexResponse.class/properties.json | 16 ++++++++++ .../Market.class/README.md | 0 .../Market.class/properties.json | 24 ++++++++++++++ .../NeoJSONPharoExamples.class/README.md | 0 .../testAccessingTheNewYorkPublicLibrary.st | 13 ++++++++ .../instance/testAttachmentsExample.st | 31 +++++++++++++++++++ .../testBittrexLitecoinAsDictionary.st | 10 ++++++ .../testBittrexLitecoinAsDomainObjects.st | 16 ++++++++++ .../instance/testDoomtownDBCards.st | 4 +++ .../instance/testFeed.st | 12 +++++++ .../instance/testGetWorldCapitals.st | 4 +++ .../instance/testGoogleMapsAPI.st | 7 +++++ .../instance/testParsingUserAgentStrings.st | 9 ++++++ .../instance/testStackOverflowInfo.st | 6 ++++ .../properties.json | 14 +++++++++ .../properties.json | 2 ++ .../Neo-JSON-GemStone-Tests.package/.filetree | 4 +++ .../properties.json | 2 ++ 31 files changed, 226 insertions(+), 1 deletion(-) create mode 100644 filetree/Neo-JSON-GemStone-Core.package/.filetree create mode 100644 filetree/Neo-JSON-GemStone-Core.package/OrderedDictionary.extension/instance/neoJsonOn..st create mode 100644 filetree/Neo-JSON-GemStone-Core.package/OrderedDictionary.extension/properties.json create mode 100644 filetree/Neo-JSON-GemStone-Core.package/SmallDictionary.extension/instance/neoJsonOn..st create mode 100644 filetree/Neo-JSON-GemStone-Core.package/SmallDictionary.extension/properties.json create mode 100644 filetree/Neo-JSON-GemStone-Core.package/properties.json create mode 100644 filetree/Neo-JSON-GemStone-Examples.package/.filetree create mode 100644 filetree/Neo-JSON-GemStone-Examples.package/Attachment.class/README.md create mode 100644 filetree/Neo-JSON-GemStone-Examples.package/Attachment.class/instance/fileName..st create mode 100644 filetree/Neo-JSON-GemStone-Examples.package/Attachment.class/instance/url..st create mode 100644 filetree/Neo-JSON-GemStone-Examples.package/Attachment.class/properties.json create mode 100644 filetree/Neo-JSON-GemStone-Examples.package/BittrexResponse.class/README.md create mode 100644 filetree/Neo-JSON-GemStone-Examples.package/BittrexResponse.class/properties.json create mode 100644 filetree/Neo-JSON-GemStone-Examples.package/Market.class/README.md create mode 100644 filetree/Neo-JSON-GemStone-Examples.package/Market.class/properties.json create mode 100644 filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/README.md create mode 100644 filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/instance/testAccessingTheNewYorkPublicLibrary.st create mode 100644 filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/instance/testAttachmentsExample.st create mode 100644 filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/instance/testBittrexLitecoinAsDictionary.st create mode 100644 filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/instance/testBittrexLitecoinAsDomainObjects.st create mode 100644 filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/instance/testDoomtownDBCards.st create mode 100644 filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/instance/testFeed.st create mode 100644 filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/instance/testGetWorldCapitals.st create mode 100644 filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/instance/testGoogleMapsAPI.st create mode 100644 filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/instance/testParsingUserAgentStrings.st create mode 100644 filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/instance/testStackOverflowInfo.st create mode 100644 filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/properties.json create mode 100644 filetree/Neo-JSON-GemStone-Examples.package/properties.json create mode 100644 filetree/Neo-JSON-GemStone-Tests.package/.filetree create mode 100644 filetree/Neo-JSON-GemStone-Tests.package/properties.json diff --git a/filetree/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/instance/baseline..st b/filetree/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/instance/baseline..st index 8cc90a8..4581d65 100644 --- a/filetree/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/instance/baseline..st +++ b/filetree/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/instance/baseline..st @@ -17,4 +17,13 @@ baseline: spec package: 'Neo-JSON-Pharo-Examples' with: [ spec requires: #('Neo-JSON-Core') ]; group: 'Core' with: #('Neo-JSON-Core' 'Neo-JSON-Pharo-Core'); group: 'Tests' with: #('Neo-JSON-Tests' 'Neo-JSON-Pharo-Tests'); - group: 'examples' with: #('Neo-JSON-Pharo-Examples') ]. \ No newline at end of file + group: 'Examples' with: #('Neo-JSON-Pharo-Examples') ]. + spec + for: #gemstone + do: [ spec + package: 'Neo-JSON-GemStone-Core' with: [ spec requires: #('Neo-JSON-Core') ]; + package: 'Neo-JSON-GemStone-Tests' with: [ spec requires: #('Neo-JSON-Tests') ]; + package: 'Neo-JSON-GemStone-Examples' with: [ spec requires: #('Neo-JSON-Core') ]; + group: 'Core' with: #('Neo-JSON-Core' 'Neo-JSON-GemStone-Core'); + group: 'Tests' with: #('Neo-JSON-Tests' 'Neo-JSON-GemStone-Tests'); + group: 'Examples' with: #('Neo-JSON-GemStone-Examples') ]. \ No newline at end of file diff --git a/filetree/Neo-JSON-GemStone-Core.package/.filetree b/filetree/Neo-JSON-GemStone-Core.package/.filetree new file mode 100644 index 0000000..8998102 --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Core.package/.filetree @@ -0,0 +1,4 @@ +{ + "noMethodMetaData" : true, + "separateMethodMetaAndSource" : false, + "useCypressPropertiesFile" : true } diff --git a/filetree/Neo-JSON-GemStone-Core.package/OrderedDictionary.extension/instance/neoJsonOn..st b/filetree/Neo-JSON-GemStone-Core.package/OrderedDictionary.extension/instance/neoJsonOn..st new file mode 100644 index 0000000..d439874 --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Core.package/OrderedDictionary.extension/instance/neoJsonOn..st @@ -0,0 +1,3 @@ +*neo-json-gemstone-core +neoJsonOn: neoJSONWriter + neoJSONWriter writeMap: self \ No newline at end of file diff --git a/filetree/Neo-JSON-GemStone-Core.package/OrderedDictionary.extension/properties.json b/filetree/Neo-JSON-GemStone-Core.package/OrderedDictionary.extension/properties.json new file mode 100644 index 0000000..63f7607 --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Core.package/OrderedDictionary.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "OrderedDictionary" } diff --git a/filetree/Neo-JSON-GemStone-Core.package/SmallDictionary.extension/instance/neoJsonOn..st b/filetree/Neo-JSON-GemStone-Core.package/SmallDictionary.extension/instance/neoJsonOn..st new file mode 100644 index 0000000..d439874 --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Core.package/SmallDictionary.extension/instance/neoJsonOn..st @@ -0,0 +1,3 @@ +*neo-json-gemstone-core +neoJsonOn: neoJSONWriter + neoJSONWriter writeMap: self \ No newline at end of file diff --git a/filetree/Neo-JSON-GemStone-Core.package/SmallDictionary.extension/properties.json b/filetree/Neo-JSON-GemStone-Core.package/SmallDictionary.extension/properties.json new file mode 100644 index 0000000..b852ddc --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Core.package/SmallDictionary.extension/properties.json @@ -0,0 +1,3 @@ +{ + "name" : "SmallDictionary" } + diff --git a/filetree/Neo-JSON-GemStone-Core.package/properties.json b/filetree/Neo-JSON-GemStone-Core.package/properties.json new file mode 100644 index 0000000..a097c63 --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Core.package/properties.json @@ -0,0 +1,2 @@ +{ + } \ No newline at end of file diff --git a/filetree/Neo-JSON-GemStone-Examples.package/.filetree b/filetree/Neo-JSON-GemStone-Examples.package/.filetree new file mode 100644 index 0000000..8998102 --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Examples.package/.filetree @@ -0,0 +1,4 @@ +{ + "noMethodMetaData" : true, + "separateMethodMetaAndSource" : false, + "useCypressPropertiesFile" : true } diff --git a/filetree/Neo-JSON-GemStone-Examples.package/Attachment.class/README.md b/filetree/Neo-JSON-GemStone-Examples.package/Attachment.class/README.md new file mode 100644 index 0000000..e69de29 diff --git a/filetree/Neo-JSON-GemStone-Examples.package/Attachment.class/instance/fileName..st b/filetree/Neo-JSON-GemStone-Examples.package/Attachment.class/instance/fileName..st new file mode 100644 index 0000000..3966e08 --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Examples.package/Attachment.class/instance/fileName..st @@ -0,0 +1,3 @@ +accessing +fileName: anObject + fileName := anObject \ No newline at end of file diff --git a/filetree/Neo-JSON-GemStone-Examples.package/Attachment.class/instance/url..st b/filetree/Neo-JSON-GemStone-Examples.package/Attachment.class/instance/url..st new file mode 100644 index 0000000..ca05f95 --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Examples.package/Attachment.class/instance/url..st @@ -0,0 +1,3 @@ +accessing +url: anObject + url := anObject \ No newline at end of file diff --git a/filetree/Neo-JSON-GemStone-Examples.package/Attachment.class/properties.json b/filetree/Neo-JSON-GemStone-Examples.package/Attachment.class/properties.json new file mode 100644 index 0000000..d27738c --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Examples.package/Attachment.class/properties.json @@ -0,0 +1,15 @@ +{ + "category" : "Neo-JSON-Gemstone-Examples", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + "url", + "fileName" ], + "name" : "Attachment", + "pools" : [ + ], + "super" : "Object", + "type" : "normal" } diff --git a/filetree/Neo-JSON-GemStone-Examples.package/BittrexResponse.class/README.md b/filetree/Neo-JSON-GemStone-Examples.package/BittrexResponse.class/README.md new file mode 100644 index 0000000..e69de29 diff --git a/filetree/Neo-JSON-GemStone-Examples.package/BittrexResponse.class/properties.json b/filetree/Neo-JSON-GemStone-Examples.package/BittrexResponse.class/properties.json new file mode 100644 index 0000000..3888853 --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Examples.package/BittrexResponse.class/properties.json @@ -0,0 +1,16 @@ +{ + "category" : "Neo-JSON-Gemstone-Examples", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + "success", + "message", + "result" ], + "name" : "BittrexResponse", + "pools" : [ + ], + "super" : "Object", + "type" : "normal" } diff --git a/filetree/Neo-JSON-GemStone-Examples.package/Market.class/README.md b/filetree/Neo-JSON-GemStone-Examples.package/Market.class/README.md new file mode 100644 index 0000000..e69de29 diff --git a/filetree/Neo-JSON-GemStone-Examples.package/Market.class/properties.json b/filetree/Neo-JSON-GemStone-Examples.package/Market.class/properties.json new file mode 100644 index 0000000..735a637 --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Examples.package/Market.class/properties.json @@ -0,0 +1,24 @@ +{ + "category" : "Neo-JSON-Gemstone-Examples", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + "MarketCurrency", + "BaseCurrency", + "MarketCurrencyLong", + "BaseCurrencyLong", + "MinTradeSize", + "MarketName", + "IsActive", + "Created", + "Notice", + "IsSponsored", + "LogoUrl" ], + "name" : "Market", + "pools" : [ + ], + "super" : "Object", + "type" : "normal" } diff --git a/filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/README.md b/filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/README.md new file mode 100644 index 0000000..e69de29 diff --git a/filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/instance/testAccessingTheNewYorkPublicLibrary.st b/filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/instance/testAccessingTheNewYorkPublicLibrary.st new file mode 100644 index 0000000..5ba6501 --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/instance/testAccessingTheNewYorkPublicLibrary.st @@ -0,0 +1,13 @@ +tests +testAccessingTheNewYorkPublicLibrary + + | client reader data networkStream | + (client := ZnClient new) + streaming: true; + url: 'https://github.com/NYPL-publicdomain/data-and-utilities/blob/master/items/pd_items_1.ndjson?raw=true'; + get. + networkStream := ZnCharacterReadStream on: client contents. + reader := NeoJSONReader on: networkStream. + data := Array streamContents: [ :out | [ reader atEnd ] whileFalse: [ out nextPut: reader next ] ]. + client close. + data \ No newline at end of file diff --git a/filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/instance/testAttachmentsExample.st b/filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/instance/testAttachmentsExample.st new file mode 100644 index 0000000..8ded541 --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/instance/testAttachmentsExample.st @@ -0,0 +1,31 @@ +tests +testAttachmentsExample + | collectionOne json | + "Let's create a collection of two instances:" + collectionOne := {(Attachment new + url: 'http://example.com/random-name.txt' asZnUrl; + fileName: 'chapter-one.txt' yourself). + (Attachment new + url: 'http://example.com/random-name.png' asZnUrl; + fileName: 'image.png'; + yourself)}. + + "And let's map it to a JSON structure:" + json := String + streamContents: [ :aStream | + (NeoJSONWriter on: aStream) + for: #CollectionOfAttachments customDo: [ :mapping | mapping listOfElementSchema: Attachment ]; + mapAllInstVarsFor: Attachment; + for: ZnUrl customDo: [ :mapping | mapping encoder: [ :aZnUrl | aZnUrl asString ] ]; + nextPut: collectionOne as: #CollectionOfAttachments ]. + + + "And read the JSON structure:" + (NeoJSONReader on: json readStream) + for: #CollectionOfAttachments customDo: [ :mapping | mapping listOfElementSchema: Attachment ]; + for: Attachment + do: [ :mapping | + mapping mapInstVar: 'fileName'. + (mapping mapInstVar: 'url') valueSchema: ZnUrl ]; + for: ZnUrl customDo: [ :mapping | mapping decoder: [ :string | string asZnUrl ] ]; + nextAs: #CollectionOfAttachments \ No newline at end of file diff --git a/filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/instance/testBittrexLitecoinAsDictionary.st b/filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/instance/testBittrexLitecoinAsDictionary.st new file mode 100644 index 0000000..82b469f --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/instance/testBittrexLitecoinAsDictionary.st @@ -0,0 +1,10 @@ +tests +testBittrexLitecoinAsDictionary + ZnClient new + url: 'https://bittrex.com/api/v1.1/public/getmarketSummary?market=BTC-LTC'; + accept: ZnMimeType applicationJson; + contentReader: [ :entity | |reader| + reader := (NeoJSONReader on: entity readStream). + reader next ]; + get. + \ No newline at end of file diff --git a/filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/instance/testBittrexLitecoinAsDomainObjects.st b/filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/instance/testBittrexLitecoinAsDomainObjects.st new file mode 100644 index 0000000..f41da9c --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/instance/testBittrexLitecoinAsDomainObjects.st @@ -0,0 +1,16 @@ +tests +testBittrexLitecoinAsDomainObjects + ZnClient new + url: 'https://bittrex.com/api/v1.1/public/getmarkets'; + enforceHttpSuccess: true; + accept: ZnMimeType applicationJson; + contentReader: [ :entity | |reader| + reader := (NeoJSONReader on: entity readStream). + reader for: BittrexResponse do: [:m| + m mapInstVar: #success. + m mapInstVar: #message. + (m mapInstVar: #result) valueSchema: #ArrayOfMarkets]. + reader for: #ArrayOfMarkets customDo: [ :mapping | mapping listOfElementSchema: Market ]. + reader mapInstVarsFor: Market. + reader nextAs: BittrexResponse ]; + get \ No newline at end of file diff --git a/filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/instance/testDoomtownDBCards.st b/filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/instance/testDoomtownDBCards.st new file mode 100644 index 0000000..41531e4 --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/instance/testDoomtownDBCards.st @@ -0,0 +1,4 @@ +tests +testDoomtownDBCards + + NeoJSONReader fromString: 'http://dtdb.co/api/cards/' asUrl retrieveContents \ No newline at end of file diff --git a/filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/instance/testFeed.st b/filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/instance/testFeed.st new file mode 100644 index 0000000..476852d --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/instance/testFeed.st @@ -0,0 +1,12 @@ +tests +testFeed + | json | + json := ZnClient new + systemPolicy; + url: 'https://daringfireball.net/feeds/json'; + accept: ZnMimeType applicationJson; + contentReader: [ :entity | NeoJSONObject fromString: entity contents ]; + get. + json items collect: #title. + json items collect: [ :each | each title -> each url ]. + json \ No newline at end of file diff --git a/filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/instance/testGetWorldCapitals.st b/filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/instance/testGetWorldCapitals.st new file mode 100644 index 0000000..1fe53f1 --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/instance/testGetWorldCapitals.st @@ -0,0 +1,4 @@ +tests +testGetWorldCapitals + ((NeoJSONReader fromString: (ZnEasy get: 'http://api.geonames.org/countryInfoJSON' username: 'demo' password: '') contents) at: #geonames) + collect: [ :d | d at: #capital ] \ No newline at end of file diff --git a/filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/instance/testGoogleMapsAPI.st b/filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/instance/testGoogleMapsAPI.st new file mode 100644 index 0000000..85bb04c --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/instance/testGoogleMapsAPI.st @@ -0,0 +1,7 @@ +tests +testGoogleMapsAPI + + ZnClient new + url: 'http://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&sensor=false'; + contentReader: [ :entity | NeoJSONReader fromString: entity contents ]; + get \ No newline at end of file diff --git a/filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/instance/testParsingUserAgentStrings.st b/filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/instance/testParsingUserAgentStrings.st new file mode 100644 index 0000000..440e03f --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/instance/testParsingUserAgentStrings.st @@ -0,0 +1,9 @@ +tests +testParsingUserAgentStrings + ZnClient new + http; + host: 'useragentstring.com'; + queryAt: 'uas' put: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/601.4.4 (KHTML, like Gecko) Version/9.0.3 Safari/601.4.4'; + queryAt: 'getJSON' put: 'all'; + contentReader: [ :entity | NeoJSONReader fromString: entity contents ]; + get \ No newline at end of file diff --git a/filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/instance/testStackOverflowInfo.st b/filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/instance/testStackOverflowInfo.st new file mode 100644 index 0000000..645a79f --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/instance/testStackOverflowInfo.st @@ -0,0 +1,6 @@ +tests +testStackOverflowInfo + + ZnClient new + contentReader: [ :entity | NeoJSONReader fromString: entity contents ]; + get: 'http://api.stackexchange.com/2.1/info?site=stackoverflow' \ No newline at end of file diff --git a/filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/properties.json b/filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/properties.json new file mode 100644 index 0000000..77da182 --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Examples.package/NeoJSONPharoExamples.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "Neo-JSON-Gemstone-Examples", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + ], + "name" : "NeoJSONGemStoneExamples", + "pools" : [ + ], + "super" : "TestCase", + "type" : "normal" } diff --git a/filetree/Neo-JSON-GemStone-Examples.package/properties.json b/filetree/Neo-JSON-GemStone-Examples.package/properties.json new file mode 100644 index 0000000..a097c63 --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Examples.package/properties.json @@ -0,0 +1,2 @@ +{ + } \ No newline at end of file diff --git a/filetree/Neo-JSON-GemStone-Tests.package/.filetree b/filetree/Neo-JSON-GemStone-Tests.package/.filetree new file mode 100644 index 0000000..8998102 --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Tests.package/.filetree @@ -0,0 +1,4 @@ +{ + "noMethodMetaData" : true, + "separateMethodMetaAndSource" : false, + "useCypressPropertiesFile" : true } diff --git a/filetree/Neo-JSON-GemStone-Tests.package/properties.json b/filetree/Neo-JSON-GemStone-Tests.package/properties.json new file mode 100644 index 0000000..a097c63 --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Tests.package/properties.json @@ -0,0 +1,2 @@ +{ + } \ No newline at end of file From ccd1ec9104838b0a27451897b5cbbb30db8caa09 Mon Sep 17 00:00:00 2001 From: Patrik Date: Wed, 1 Oct 2025 09:07:54 +0000 Subject: [PATCH 55/90] No SmallDictionary or OrderedDictionary in GemStone --- .../OrderedDictionary.extension/instance/neoJsonOn..st | 3 --- .../OrderedDictionary.extension/properties.json | 2 -- .../SmallDictionary.extension/instance/neoJsonOn..st | 3 --- .../SmallDictionary.extension/properties.json | 3 --- 4 files changed, 11 deletions(-) delete mode 100644 filetree/Neo-JSON-GemStone-Core.package/OrderedDictionary.extension/instance/neoJsonOn..st delete mode 100644 filetree/Neo-JSON-GemStone-Core.package/OrderedDictionary.extension/properties.json delete mode 100644 filetree/Neo-JSON-GemStone-Core.package/SmallDictionary.extension/instance/neoJsonOn..st delete mode 100644 filetree/Neo-JSON-GemStone-Core.package/SmallDictionary.extension/properties.json diff --git a/filetree/Neo-JSON-GemStone-Core.package/OrderedDictionary.extension/instance/neoJsonOn..st b/filetree/Neo-JSON-GemStone-Core.package/OrderedDictionary.extension/instance/neoJsonOn..st deleted file mode 100644 index d439874..0000000 --- a/filetree/Neo-JSON-GemStone-Core.package/OrderedDictionary.extension/instance/neoJsonOn..st +++ /dev/null @@ -1,3 +0,0 @@ -*neo-json-gemstone-core -neoJsonOn: neoJSONWriter - neoJSONWriter writeMap: self \ No newline at end of file diff --git a/filetree/Neo-JSON-GemStone-Core.package/OrderedDictionary.extension/properties.json b/filetree/Neo-JSON-GemStone-Core.package/OrderedDictionary.extension/properties.json deleted file mode 100644 index 63f7607..0000000 --- a/filetree/Neo-JSON-GemStone-Core.package/OrderedDictionary.extension/properties.json +++ /dev/null @@ -1,2 +0,0 @@ -{ - "name" : "OrderedDictionary" } diff --git a/filetree/Neo-JSON-GemStone-Core.package/SmallDictionary.extension/instance/neoJsonOn..st b/filetree/Neo-JSON-GemStone-Core.package/SmallDictionary.extension/instance/neoJsonOn..st deleted file mode 100644 index d439874..0000000 --- a/filetree/Neo-JSON-GemStone-Core.package/SmallDictionary.extension/instance/neoJsonOn..st +++ /dev/null @@ -1,3 +0,0 @@ -*neo-json-gemstone-core -neoJsonOn: neoJSONWriter - neoJSONWriter writeMap: self \ No newline at end of file diff --git a/filetree/Neo-JSON-GemStone-Core.package/SmallDictionary.extension/properties.json b/filetree/Neo-JSON-GemStone-Core.package/SmallDictionary.extension/properties.json deleted file mode 100644 index b852ddc..0000000 --- a/filetree/Neo-JSON-GemStone-Core.package/SmallDictionary.extension/properties.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "name" : "SmallDictionary" } - From 8e82df067c12c29b5bc598b1406464246322ef4f Mon Sep 17 00:00:00 2001 From: Patrik Date: Wed, 1 Oct 2025 10:08:15 +0000 Subject: [PATCH 56/90] Making code more portable for other Smalltalk flavours - e.g. OrderedDictionary is not available in GemStone - Adjusting it also in tonel repository so Pharo code would behave identically - Modifying a readme text to match the code --- filetree/Neo-JSON-Core.package/NeoJSONObject.class/README.md | 2 +- .../Neo-JSON-Core.package/NeoJSONObject.class/properties.json | 2 +- repository/Neo-JSON-Core/NeoJSONObject.class.st | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/README.md b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/README.md index 51fe8d3..77bd663 100644 --- a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/README.md +++ b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/README.md @@ -35,5 +35,5 @@ The first is special because it returns nil as soon as a key is missing. The sec NeoJSONObject new atPath: #(one two three) put: 42; yourself. NeoJSONObject new atPath: #(one two three) put: 42; atPath: #(one two three). -The fact that I am an OrderedDictionary means to I maintain the order of keys. This is meant as a convenience feature only as the official JSON specification clearly states "An object is an unordered set of name/value pairs". +I am an Dictionary. The official JSON specification clearly states ""An object is an unordered set of name/value pairs"". I work together with NeoJSONArray. \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/properties.json b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/properties.json index c1a3486..8e5e5e3 100644 --- a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/properties.json +++ b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/properties.json @@ -10,5 +10,5 @@ "name" : "NeoJSONObject", "pools" : [ ], - "super" : "OrderedDictionary", + "super" : "Dictionary", "type" : "normal" } diff --git a/repository/Neo-JSON-Core/NeoJSONObject.class.st b/repository/Neo-JSON-Core/NeoJSONObject.class.st index 07abf5a..50a3568 100644 --- a/repository/Neo-JSON-Core/NeoJSONObject.class.st +++ b/repository/Neo-JSON-Core/NeoJSONObject.class.st @@ -36,12 +36,12 @@ The first is special because it returns nil as soon as a key is missing. The sec NeoJSONObject new atPath: #(one two three) put: 42; yourself. NeoJSONObject new atPath: #(one two three) put: 42; atPath: #(one two three). -The fact that I am an OrderedDictionary means to I maintain the order of keys. This is meant as a convenience feature only as the official JSON specification clearly states ""An object is an unordered set of name/value pairs"". +I am an Dictionary. The official JSON specification clearly states ""An object is an unordered set of name/value pairs"". I work together with NeoJSONArray. " Class { #name : #NeoJSONObject, - #superclass : #OrderedDictionary, + #superclass : #Dictionary, #category : #'Neo-JSON-Core' } From 86a91906525796623ed380fbba6e01f804bde8b2 Mon Sep 17 00:00:00 2001 From: Patrik Date: Wed, 1 Oct 2025 11:09:04 +0000 Subject: [PATCH 57/90] Removing rouge filetree code from tonel repository --- .../BaselineOfNeoJSON.package/.filetree | 4 -- .../BaselineOfNeoJSON.class/README.md | 0 .../instance/baseline..st | 22 ---------- .../methodProperties.json | 5 --- .../BaselineOfNeoJSON.class/properties.json | 14 ------ .../monticello.meta/categories.st | 1 - .../monticello.meta/initializers.st | 0 .../monticello.meta/package | 1 - .../monticello.meta/version | 1 - .../BaselineOfNeoJSON.package/properties.json | 2 - .../instance/neoJsonOn..st | 3 -- .../methodProperties.json | 5 --- .../properties.json | 2 - .../instance/listOfType..st | 11 ----- .../class/signalFor.in..st | 8 ---- .../methodProperties.json | 12 ------ .../instance/mapInstVar.to..st | 10 ----- .../instance/propertyNamed.ifAbsent..st | 3 -- .../methodProperties.json | 20 --------- .../instance/writeObject.on..st | 6 --- .../instance/parseString.st | 10 ----- .../NeoJSONReader.class/methodProperties.json | 43 ------------------- .../instance/initialize.st | 7 --- .../instance/writeString..st | 5 --- .../NeoJSONWriter.class/methodProperties.json | 36 ---------------- .../Object.extension/methodProperties.json | 6 --- .../monticello.meta/version | 1 - 27 files changed, 238 deletions(-) delete mode 100644 repository/BaselineOfNeoJSON.package/.filetree delete mode 100644 repository/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/README.md delete mode 100644 repository/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/instance/baseline..st delete mode 100644 repository/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/methodProperties.json delete mode 100644 repository/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/properties.json delete mode 100644 repository/BaselineOfNeoJSON.package/monticello.meta/categories.st delete mode 100644 repository/BaselineOfNeoJSON.package/monticello.meta/initializers.st delete mode 100644 repository/BaselineOfNeoJSON.package/monticello.meta/package delete mode 100644 repository/BaselineOfNeoJSON.package/monticello.meta/version delete mode 100644 repository/BaselineOfNeoJSON.package/properties.json delete mode 100644 repository/Neo-JSON-Core.package/CharacterCollection.extension/instance/neoJsonOn..st delete mode 100644 repository/Neo-JSON-Core.package/CharacterCollection.extension/methodProperties.json delete mode 100644 repository/Neo-JSON-Core.package/CharacterCollection.extension/properties.json delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfType..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/class/signalFor.in..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/methodProperties.json delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVar.to..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/propertyNamed.ifAbsent..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/methodProperties.json delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/writeObject.on..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseString.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONReader.class/methodProperties.json delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/initialize.st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeString..st delete mode 100644 repository/Neo-JSON-Core.package/NeoJSONWriter.class/methodProperties.json delete mode 100644 repository/Neo-JSON-Core.package/Object.extension/methodProperties.json delete mode 100644 repository/Neo-JSON-Core.package/monticello.meta/version diff --git a/repository/BaselineOfNeoJSON.package/.filetree b/repository/BaselineOfNeoJSON.package/.filetree deleted file mode 100644 index 8998102..0000000 --- a/repository/BaselineOfNeoJSON.package/.filetree +++ /dev/null @@ -1,4 +0,0 @@ -{ - "noMethodMetaData" : true, - "separateMethodMetaAndSource" : false, - "useCypressPropertiesFile" : true } diff --git a/repository/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/README.md b/repository/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/README.md deleted file mode 100644 index e69de29..0000000 diff --git a/repository/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/instance/baseline..st b/repository/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/instance/baseline..st deleted file mode 100644 index c1df617..0000000 --- a/repository/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/instance/baseline..st +++ /dev/null @@ -1,22 +0,0 @@ -baselines -baseline: spec - - spec - for: #'common' - do: [ - spec - baseline: 'GLASS1' - with: [ - spec - loads: #('GsSqueakCommon'); - repository: 'github://glassdb/glass:master/repository' ]; - yourself. - spec - package: 'Neo-JSON-Core' with: [ spec requires: 'GLASS1' ]; - package: 'Neo-JSON-Tests' with: [ spec requires: 'Neo-JSON-Core' ]; - yourself. - spec - group: 'default' with: #('Neo-JSON-Core' 'Neo-JSON-Tests'); - group: 'Core' with: #('Neo-JSON-Core'); - group: 'Tests' with: #('Neo-JSON-Tests'); - yourself ] \ No newline at end of file diff --git a/repository/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/methodProperties.json b/repository/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/methodProperties.json deleted file mode 100644 index d9dabe6..0000000 --- a/repository/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/methodProperties.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "baseline:" : "dkh 11/21/2014 21:39" } } diff --git a/repository/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/properties.json b/repository/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/properties.json deleted file mode 100644 index d5f0fa2..0000000 --- a/repository/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/properties.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "category" : "BaselineOfNeoJSON", - "classinstvars" : [ - ], - "classvars" : [ - ], - "commentStamp" : "", - "instvars" : [ - ], - "name" : "BaselineOfNeoJSON", - "pools" : [ - ], - "super" : "BaselineOf", - "type" : "normal" } diff --git a/repository/BaselineOfNeoJSON.package/monticello.meta/categories.st b/repository/BaselineOfNeoJSON.package/monticello.meta/categories.st deleted file mode 100644 index 5ae7bf7..0000000 --- a/repository/BaselineOfNeoJSON.package/monticello.meta/categories.st +++ /dev/null @@ -1 +0,0 @@ -SystemOrganization addCategory: #'BaselineOfNeoJSON'! diff --git a/repository/BaselineOfNeoJSON.package/monticello.meta/initializers.st b/repository/BaselineOfNeoJSON.package/monticello.meta/initializers.st deleted file mode 100644 index e69de29..0000000 diff --git a/repository/BaselineOfNeoJSON.package/monticello.meta/package b/repository/BaselineOfNeoJSON.package/monticello.meta/package deleted file mode 100644 index 11d829c..0000000 --- a/repository/BaselineOfNeoJSON.package/monticello.meta/package +++ /dev/null @@ -1 +0,0 @@ -(name 'BaselineOfNeoJSON') \ No newline at end of file diff --git a/repository/BaselineOfNeoJSON.package/monticello.meta/version b/repository/BaselineOfNeoJSON.package/monticello.meta/version deleted file mode 100644 index 433d9d7..0000000 --- a/repository/BaselineOfNeoJSON.package/monticello.meta/version +++ /dev/null @@ -1 +0,0 @@ -(name 'BaselineOfNeoJSON-dkh.2' message 'move some methods to GsSqueakCommon ... tweak baseline' id '8c59d8da-bd33-4675-948e-6db92c78c7d8' date '11/21/2014' time '21:39:49' author 'dkh' ancestors ((name 'BaselineOfNeoJSON-PaulDeBruicker.1' message 'Copy of Dale''s BaselineOfNeoJSON from the glassdb repo' id '8b37955b-ce25-41f7-8190-7f69d6b3828c' date '11/02/2014' time '19:58:37' author 'PaulDeBruicker' ancestors () stepChildren ())) stepChildren ()) \ No newline at end of file diff --git a/repository/BaselineOfNeoJSON.package/properties.json b/repository/BaselineOfNeoJSON.package/properties.json deleted file mode 100644 index f037444..0000000 --- a/repository/BaselineOfNeoJSON.package/properties.json +++ /dev/null @@ -1,2 +0,0 @@ -{ - } diff --git a/repository/Neo-JSON-Core.package/CharacterCollection.extension/instance/neoJsonOn..st b/repository/Neo-JSON-Core.package/CharacterCollection.extension/instance/neoJsonOn..st deleted file mode 100644 index b41f066..0000000 --- a/repository/Neo-JSON-Core.package/CharacterCollection.extension/instance/neoJsonOn..st +++ /dev/null @@ -1,3 +0,0 @@ -*neo-json-core -neoJsonOn: neoJSONWriter - neoJSONWriter writeString: self \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/CharacterCollection.extension/methodProperties.json b/repository/Neo-JSON-Core.package/CharacterCollection.extension/methodProperties.json deleted file mode 100644 index 5868ec8..0000000 --- a/repository/Neo-JSON-Core.package/CharacterCollection.extension/methodProperties.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "neoJsonOn:" : "dkh 11/24/2014 21:39" } } diff --git a/repository/Neo-JSON-Core.package/CharacterCollection.extension/properties.json b/repository/Neo-JSON-Core.package/CharacterCollection.extension/properties.json deleted file mode 100644 index c85a513..0000000 --- a/repository/Neo-JSON-Core.package/CharacterCollection.extension/properties.json +++ /dev/null @@ -1,2 +0,0 @@ -{ - "name" : "CharacterCollection" } diff --git a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfType..st b/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfType..st deleted file mode 100644 index 6187090..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfType..st +++ /dev/null @@ -1,11 +0,0 @@ -mapping -listOfType: collectionClass - "Set the reader to a block that will create an instance of collectionClass - using #streamContents: while reading a list of elements" - - self reader: [ :jsonReader | - collectionClass streamContents: [ :stream | - jsonReader parseListDo: [ | element | - element := jsonReader next. - stream nextPut: element ] ] ] - "we do not set a writer, #neoJsonOn: should be sufficient" \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/class/signalFor.in..st b/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/class/signalFor.in..st deleted file mode 100644 index 2679f96..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/class/signalFor.in..st +++ /dev/null @@ -1,8 +0,0 @@ -as yet unclassified -signalFor: anObject in: aCollection - "Create and signal a NotFound exception for anObject in aCollection." - - ^ self new - object: anObject; - collection: aCollection; - signal \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/methodProperties.json b/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/methodProperties.json deleted file mode 100644 index 3207dba..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONMappingNotFound.class/methodProperties.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "class" : { - "signalFor:in:" : "PaulDeBruicker 11/01/2014 13:25" }, - "instance" : { - "collection" : "PaulDeBruicker 11/01/2014 13:27", - "collection:" : "PaulDeBruicker 11/01/2014 13:27", - "messageText" : "PaulDeBruicker 11/01/2014 13:30", - "object" : "PaulDeBruicker 11/01/2014 13:27", - "object:" : "PaulDeBruicker 11/01/2014 13:27", - "signaler" : "PaulDeBruicker 11/01/2014 13:27", - "signaler:" : "PaulDeBruicker 11/01/2014 13:27", - "standardMessageText" : "SvenVanCaekenberghe 6/12/2012 15:47" } } diff --git a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVar.to..st b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVar.to..st deleted file mode 100644 index b2ff072..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/mapInstVar.to..st +++ /dev/null @@ -1,10 +0,0 @@ -mapping -mapInstVar: instVarName to: propertyName - | index | - index := subjectClass - instVarIndexFor: instVarName asString - ifAbsent: [ self error: 'Inst var not found: ' , instVarName printString ]. - ^ self - mapProperty: propertyName asString - getter: [ :object | object instVarAt: index ] - setter: [ :object :value | object instVarAt: index put: value ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/propertyNamed.ifAbsent..st b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/propertyNamed.ifAbsent..st deleted file mode 100644 index 1fd204e..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/instance/propertyNamed.ifAbsent..st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -propertyNamed: propertyName ifAbsent: block - ^ properties at: propertyName ifAbsent: block \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/methodProperties.json b/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/methodProperties.json deleted file mode 100644 index 70952a0..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONObjectMapping.class/methodProperties.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "identifier" : "SvenVanCaekenberghe 3/23/2014 19:25", - "initialize" : "SvenVanCaekenberghe 6/5/2012 22:50", - "mapAccessor:" : "SvenVanCaekenberghe 6/12/2012 13:13", - "mapAccessor:mutator:to:" : "SvenVanCaekenberghe 6/12/2012 13:12", - "mapAccessor:to:" : "SvenVanCaekenberghe 6/12/2012 13:13", - "mapAccessors:" : "SvenVanCaekenberghe 6/12/2012 13:14", - "mapAllInstVars" : "SvenVanCaekenberghe 6/6/2012 16:00", - "mapInstVar:" : "SvenVanCaekenberghe 6/9/2012 18:37", - "mapInstVar:to:" : "PaulDeBruicker 11/02/2014 19:13", - "mapInstVars" : "SvenVanCaekenberghe 6/6/2012 15:59", - "mapInstVars:" : "SvenVanCaekenberghe 6/6/2012 16:00", - "mapProperty:getter:setter:" : "PaulDeBruicker 11/02/2014 18:32", - "propertyNamed:ifAbsent:" : "PaulDeBruicker 11/02/2014 18:53", - "readFrom:" : "PaulDeBruicker 11/02/2014 19:36", - "subjectClass:" : "SvenVanCaekenberghe 6/6/2012 15:32", - "writeObject:on:" : "SvenVanCaekenberghe 6/6/2012 14:55" } } diff --git a/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/writeObject.on..st b/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/writeObject.on..st deleted file mode 100644 index 603cdc1..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONPropertyMapping.class/instance/writeObject.on..st +++ /dev/null @@ -1,6 +0,0 @@ -writing -writeObject: anObject on: jsonMapWriter - | value | - value := getter value: anObject. - value - ifNotNil: [ jsonMapWriter writeKey: propertyName value: value as: valueSchema ] \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseString.st b/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseString.st deleted file mode 100644 index a54ff8f..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/instance/parseString.st +++ /dev/null @@ -1,10 +0,0 @@ -parsing -parseString - | result | - self expectChar: $". - result := self - stringStreamContents: [ :stream | - [ readStream atEnd or: [ readStream peek = $" ] ] - whileFalse: [ stream nextPut: self parseCharacter ] ]. - self expectChar: $". - ^ result \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONReader.class/methodProperties.json b/repository/Neo-JSON-Core.package/NeoJSONReader.class/methodProperties.json deleted file mode 100644 index b3ff81e..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONReader.class/methodProperties.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "class" : { - "fromString:" : "SvenVanCaekenberghe 6/9/2012 18:26", - "fromString:as:" : "SvenVanCaekenberghe 6/9/2012 18:30", - "on:" : "SvenVanCaekenberghe 6/13/2012 16:10" }, - "instance" : { - "atEnd" : "SvenVanCaekenberghe 3/6/2013 14:46", - "close" : "SvenVanCaekenberghe 6/2/2012 13:50", - "consumeWhitespace" : "SvenVanCaekenberghe 6/2/2012 21:26", - "error:" : "SvenVanCaekenberghe 6/12/2012 15:54", - "expectChar:" : "SvenVanCaekenberghe 6/2/2012 14:01", - "initialize" : "SvenVanCaekenberghe 6/13/2012 09:39", - "listClass" : "SvenVanCaekenberghe 6/13/2012 09:37", - "listClass:" : "SvenVanCaekenberghe 6/13/2012 09:38", - "mapClass" : "SvenVanCaekenberghe 6/13/2012 09:37", - "mapClass:" : "SvenVanCaekenberghe 6/13/2012 09:38", - "match:do:" : "SvenVanCaekenberghe 12/3/2012 10:57", - "matchChar:" : "SvenVanCaekenberghe 12/3/2012 10:51", - "next" : "SvenVanCaekenberghe 6/7/2012 16:56", - "nextAs:" : "SvenVanCaekenberghe 6/7/2012 22:21", - "on:" : "SvenVanCaekenberghe 6/13/2012 16:10", - "parseCharacter" : "SvenVanCaekenberghe 6/7/2012 16:59", - "parseCharacterHex" : "dkh 11/25/2014 16:41", - "parseCharacterHexDigit" : "SvenVanCaekenberghe 6/2/2012 14:21", - "parseConstantDo:" : "SvenVanCaekenberghe 6/2/2012 14:16", - "parseList" : "SvenVanCaekenberghe 6/7/2012 17:17", - "parseListDo:" : "SvenVanCaekenberghe 6/7/2012 17:15", - "parseListElementsDo:" : "SvenVanCaekenberghe 6/7/2012 17:16", - "parseMap" : "SvenVanCaekenberghe 6/7/2012 17:23", - "parseMapDo:" : "SvenVanCaekenberghe 6/7/2012 17:23", - "parseMapKeysAndValuesDo:" : "SvenVanCaekenberghe 6/7/2012 17:22", - "parseMapKeysDo:" : "SvenVanCaekenberghe 6/7/2012 17:23", - "parseNumber" : "SvenVanCaekenberghe 12/3/2012 11:08", - "parseNumberExponent" : "SvenVanCaekenberghe 12/3/2012 11:08", - "parseNumberFraction" : "SvenVanCaekenberghe 6/2/2012 14:00", - "parseNumberInteger" : "SvenVanCaekenberghe 6/12/2012 16:15", - "parsePropertyName" : "SvenVanCaekenberghe 6/13/2012 09:40", - "parseString" : "dkh 11/25/2014 15:33", - "parseTrailingSurrogateHex" : "dkh 11/25/2014 16:14", - "parseValue" : "SvenVanCaekenberghe 6/12/2012 15:56", - "propertyNamesAsSymbols:" : "SvenVanCaekenberghe 6/13/2012 09:39", - "stringStreamContents:" : "SvenVanCaekenberghe 6/7/2012 16:54", - "unescapeChar:" : "SvenVanCaekenberghe 6/7/2012 16:55" } } diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/initialize.st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/initialize.st deleted file mode 100644 index c0cf599..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/initialize.st +++ /dev/null @@ -1,7 +0,0 @@ -initialize-release -initialize - super initialize. - self newLine: String cr. - self prettyPrint: false. - self asciiOnly: false. - level := 0 \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeString..st b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeString..st deleted file mode 100644 index 1c6e006..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/instance/writeString..st +++ /dev/null @@ -1,5 +0,0 @@ -writing -writeString: string - writeStream nextPut: $". - string do: [ :each | self encodeChar: each ]. - writeStream nextPut: $" \ No newline at end of file diff --git a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/methodProperties.json b/repository/Neo-JSON-Core.package/NeoJSONWriter.class/methodProperties.json deleted file mode 100644 index fb4fd82..0000000 --- a/repository/Neo-JSON-Core.package/NeoJSONWriter.class/methodProperties.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "class" : { - "on:" : "SvenVanCaekenberghe 6/14/2012 09:54", - "toString:" : "SvenVanCaekenberghe 6/9/2012 18:27", - "toStringPretty:" : "SvenVanCaekenberghe 6/9/2012 18:28" }, - "instance" : { - "asciiOnly:" : "SvenVanCaekenberghe 9/3/2013 12:00", - "close" : "SvenVanCaekenberghe 6/2/2012 22:06", - "doesCodePointNeedEscaping:" : "SvenVanCaekenberghe 9/3/2013 11:58", - "encodeChar:" : "SvenVanCaekenberghe 9/3/2013 11:55", - "encodeKey:value:" : "SvenVanCaekenberghe 6/3/2012 19:41", - "encodeKey:value:as:" : "SvenVanCaekenberghe 3/23/2014 21:53", - "escapeChar:" : "dkh 11/25/2014 16:36", - "indentedDo:" : "SvenVanCaekenberghe 6/3/2012 19:31", - "initialize" : "dkh 11/25/2014 15:36", - "listElementSeparator" : "SvenVanCaekenberghe 6/3/2012 19:32", - "mapElementSeparator" : "SvenVanCaekenberghe 6/3/2012 19:32", - "newLine:" : "SvenVanCaekenberghe 12/10/2012 16:27", - "newline" : "SvenVanCaekenberghe 4/17/2014 11:58", - "newlineIndent" : "SvenVanCaekenberghe 4/17/2014 11:55", - "nextPut:" : "SvenVanCaekenberghe 6/2/2012 22:11", - "nextPut:as:" : "SvenVanCaekenberghe 3/23/2014 21:57", - "on:" : "SvenVanCaekenberghe 6/14/2012 09:54", - "prettyPrint:" : "SvenVanCaekenberghe 6/2/2012 22:06", - "prettyPrintSpace" : "SvenVanCaekenberghe 12/10/2012 16:33", - "writeBoolean:" : "SvenVanCaekenberghe 6/2/2012 22:18", - "writeFloat:" : "SvenVanCaekenberghe 6/2/2012 22:19", - "writeInteger:" : "SvenVanCaekenberghe 6/2/2012 22:18", - "writeList:" : "SvenVanCaekenberghe 6/6/2012 15:20", - "writeListStreamingDo:" : "SvenVanCaekenberghe 6/6/2012 15:19", - "writeMap:" : "SvenVanCaekenberghe 6/6/2012 15:04", - "writeMapStreamingDo:" : "SvenVanCaekenberghe 6/6/2012 15:19", - "writeNull" : "SvenVanCaekenberghe 6/2/2012 22:15", - "writeObject:" : "SvenVanCaekenberghe 6/7/2012 15:55", - "writeStreamingDo:" : "SvenVanCaekenberghe 6/6/2012 15:19", - "writeString:" : "dkh 11/25/2014 15:36" } } diff --git a/repository/Neo-JSON-Core.package/Object.extension/methodProperties.json b/repository/Neo-JSON-Core.package/Object.extension/methodProperties.json deleted file mode 100644 index 0e240ef..0000000 --- a/repository/Neo-JSON-Core.package/Object.extension/methodProperties.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "instVarIndexFor:ifAbsent:" : "PaulDeBruicker 11/01/2014 20:43", - "neoJsonOn:" : "SvenVanCaekenberghe 6/5/2012 22:29" } } diff --git a/repository/Neo-JSON-Core.package/monticello.meta/version b/repository/Neo-JSON-Core.package/monticello.meta/version deleted file mode 100644 index f707204..0000000 --- a/repository/Neo-JSON-Core.package/monticello.meta/version +++ /dev/null @@ -1 +0,0 @@ -(name 'Neo-JSON-Core-dkh.33' message 'Issue #5: turns out that what was missing from the NeoJSON implementation was the handling of code points greater than 0xFFFF (as noted in my original comment) ... I had misinterpretted the solution to be to use UTF8 encoding ... the proper answer was to use UTF-16 surrogate pairs for code points > 16rFFFF... which I''ve done ' id '262e5ad7-dd42-48aa-869d-05ffd6021def' date '11/25/2014' time '16:50:14' author 'dkh' ancestors ((name 'Neo-JSON-Core-dkh.32' message 'Issue #5: expand test suite to cover Unicode16 and Unicode32 strings. Move String>>neoJsonOn: to CharacterCollection>>neoJsonOn: so that multi-byte strings are covered. Unicode32 string test cases are failing: 74 run, 71 passes, 0 expected defects, 3 failures, 0 errors, 0 unexpected passes 75 tests 74 run [''done''] 71 passes 0 expected defects 3 failures 0 errors 0 unexpected passes ' id '5e565bf6-4a97-4314-a35f-c7edd0b8804c' date '11/24/2014' time '22:46:28' author 'dkh' ancestors ((name 'Neo-JSON-Core-dkh.31' message 'tests should be green now ...' id '50a08add-a37e-412c-ac3a-1f2ece1212f2' date '11/22/2014' time '09:52:41' author 'dkh' ancestors ((name 'Neo-JSON-Core-dkh.30' message 'move some methods to GsSqueakCommon ... tweak baseline' id 'e3ed0d1f-578b-4ca4-82f5-9649a31d7562' date '11/21/2014' time '21:39:49' author 'dkh' ancestors ((name 'Neo-JSON-Core-PaulDeBruicker.29' message 'All tests but one pass. GemStone does not treat Strings and Symbols that are made up of the same characters as equal. So there may be issues because of that but things seem to work' id '9b3a8d41-6da7-404c-9dd3-b2c4e1820c12' date '11/02/2014' time '19:55:39' author 'PaulDeBruicker' ancestors ((name 'Neo-JSON-Core-PaulDeBruicker.28' message 'stashing changes because I just found the other gemstone port ' id 'f84c7c06-f798-44bd-8ec2-1aca0b57e049' date '11/02/2014' time '19:06:46' author 'PaulDeBruicker' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.27' message 'Added NeoJSONWriter>>#newline to write an end of line on the wrapped stream depending on the #newLine: setting' id '5a262fd6-a42d-4102-b554-26e4f1eade3d' date '04/17/2014' time '12:12:47' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.26' message 'Added new feature NeoJSONWriter>>#nextPutAs: symmetrical to NeoJSONReader>>#next:as: More specifically NeoJSONPropertyMapping>>#writeObjectOn: now respects the valueSchema if it exists using NeoJSONStreamingWriter>>#writeKey:value:as: and NeoJSONWriter>>#encodeKey:value:as: Made both the reader and writer blocks in NeoJSONCustomMapping optional with a fallback to default behavior Refactoring: added NeoJSONMapping abstract superclass above NeoJSONObjectMapping and NeoJSONCustomMapping to better clarify the design' id '41d2075d-bca4-4c08-bdf8-ed0c8da9bcf2' date '03/24/2014' time '12:18:21' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.25' message 'Added basic support for mapping using inheritance when using #neoJonMapping : (see #testObject3) Renamed #new[Custom|Object]MappingFor: to [custom|object]MappingFor: to better reflect the new behavior Thanks Philippe Back for making these suggestions!' id '3051cd7d-a857-4aee-b5ba-d56a4085517b' date '03/22/2014' time '11:03:31' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.24' message 'New feature: NeoJSONWriter>>#asciiOnly: to escape all non ASCII characters in strings' id '9f2d3ef6-abbb-46c1-bce7-95a6bd8b4954' date '09/03/2013' time '12:21:28' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.23' message 'Added NeoJSONCustomMapping>>#mapWithValueSchema:' id '6d0d538b-6fb1-41ac-92ee-05721924c5c4' date '08/30/2013' time '11:09:17' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.22' message 'Fix more double dots in the source code of #printOn: that hampered Gemstone compatibility (thx Sebastian Heidbrink)' id 'd15895fc-5743-4ec8-b99f-76fa5f72baf4' date '07/04/2013' time '07:25:56' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.21' message 'Fix a double dot in the source code of NeoJSONCustomWrapper>>#printOn: that hampered Gemstone compatibility (thx Sebastian Heidbrink)' id '3fcb3755-32a9-4c17-ac08-6721bf37a301' date '07/04/2013' time '06:41:52' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.20' message 'Added NeoJSONReader>>#atEnd' id 'afd8e136-e594-4bef-ad4b-7d3bc48fc36e' date '03/06/2013' time '03:24:11' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.19' message 'added NeoJSONWriter>>#newLine: to customize the end of line convention when pretty printing' id 'bf3e7e59-8300-44a6-889e-1f866c8d2977' date '12/10/2012' time '05:11:36' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.18' message 'minor refactoring using #peekFor:' id 'e1330b1e-87f4-4ea3-b81c-5deb03652c0d' date '12/03/2012' time '11:10:22' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.17' message 'modified by accident, not really changed' id 'a18f519f-c220-4ea1-a6bb-163e2c70eab7' date '06/14/2012' time '10:01:07' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.16' message 'documented the character stream API being used' id '5ba3bcd2-e7a6-4b07-91af-af04c7f98624' date '06/13/2012' time '04:29:08' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.15' message 'bugfix in NeoJSONReader>>#match:do: added examples to class comments' id '89ad4ee7-3035-43af-9d5c-cbbef6bcb3f0' date '06/13/2012' time '02:58:00' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.14' message 'extended NeoJSONReader with settable listClass and mapClass as well as a propertyNamesAsSymbols option extended class and method comments' id '3f749c2c-b53b-4d56-bb65-bfe964b5a69b' date '06/13/2012' time '11:56:19' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.13' message 'made NeoJSONReader>>parseNumberInteger more strict' id '5233f22a-8653-43c2-8651-bf5fa274b3da' date '06/12/2012' time '04:19:27' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.12' message 'introduced some custom exceptions' id 'bb6ec6aa-4e5d-4fac-9aa4-629ea6f068b6' date '06/12/2012' time '03:57:32' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.11' message 'major simplification: removed NeoJSON[Composite|List|Map]Mapping, all to be handled by blocks in NeoJSONCustomMapping renamed forCustom:do: to for:customDo: accessor based mapping to NeoJSONObjectMapping ' id '82a72131-e968-4ffe-af32-60085b4ecc67' date '06/12/2012' time '01:36:03' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.10' message 'optimized NeoJSONWriter>>#encodeChar: to do minimal work' id 'a684bb8c-d2d0-4a4b-8af2-da24c3f5fda4' date '06/10/2012' time '09:27:46' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.9' message 'added NeoJSONTestObject1 with class side #neoJsonMapping: method' id '49129177-ee36-4e4b-890e-314e92f23d76' date '06/09/2012' time '06:56:12' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.8' message 'added custom mapping' id 'b02af4e3-7a91-471f-81a0-57db8b43a87d' date '06/08/2012' time '10:09:41' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.7' message 'adding valueSchema to propertyMapping' id '61c29ad0-e2a6-40af-8360-24952a5e6633' date '06/08/2012' time '20:35:55' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.6' message '1st version where list mapping works on some simple examples' id 'e3250e47-9c16-461e-8d2e-e8031e4cc2be' date '06/08/2012' time '16:40:26' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.5' message 'introduced NeoJSONMapper 1st simplified version of NeoJSONReader>>#nextAs:' id '8a4a2338-c728-4ec5-bae9-8232abd6d7f6' date '06/07/2012' time '15:52:29' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.4' message '1st version with working object mapping for writer' id '0208c7c7-3ab1-4081-9061-9c6ca9d7e7cf' date '06/06/2012' time '20:47:04' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.3' message 'added more tests and a simple benchmark' id '2567c409-eb97-428e-a865-e6d078d23dff' date '06/04/2012' time '18:52:34' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.2' message 'first simple version of NeoJSONWriter' id '7e6474b7-70ed-4cb0-8348-05adddc17853' date '06/03/2012' time '19:57:41' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Core-SvenVanCaekenberghe.1' message 'first simple version of NeoJSONReader' id 'e0039613-c57d-47ae-8838-db64917ca722' date '06/02/2012' time '21:59:42' author 'SvenVanCaekenberghe' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ()) From 3681bb339e33f701295db35316836527470806f1 Mon Sep 17 00:00:00 2001 From: Patrik Date: Wed, 1 Oct 2025 12:52:25 +0000 Subject: [PATCH 58/90] Code portability and index is expected to be a Symbol - Symbol is expected based on test - insert:before: internally uses add:before: --- .../NeoJSONArray.class/instance/at.add..st | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/at.add..st b/filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/at.add..st index f0cc6be..3a4aa36 100644 --- a/filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/at.add..st +++ b/filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/at.add..st @@ -1,5 +1,5 @@ adding at: index add: object - ^ index = '-' + ^ index = #'-' ifTrue: [ self addLast: object ] - ifFalse: [ self insert: object before: index ] \ No newline at end of file + ifFalse: [ self add: object before: index ] \ No newline at end of file From 6d09570e902e7b2620e5ff774ca835a2c0caa39b Mon Sep 17 00:00:00 2001 From: Patrik Date: Wed, 1 Oct 2025 12:58:56 +0000 Subject: [PATCH 59/90] Refactoring tests to expose what is actually being tested - Previous compared elements from two different objects. Why? - Testing #'-' as GemStone expects it - Adding negative number to the testing Array --- .../instance/testArray.st | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testArray.st b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testArray.st index c512f21..986ed56 100644 --- a/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testArray.st +++ b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testArray.st @@ -1,13 +1,14 @@ testing testArray - | jsonArray array | - jsonArray := '[1,2,3]'. + + jsonArray := '[-2,1,2,3]'. array := NeoJSONObject fromString: jsonArray. self assert: array asString equals: jsonArray. - self assertCollection: array hasSameElements: #(1 2 3). - array at: 1 add: 0. - array at: #- add: 4. - self assertCollection: array hasSameElements: #(0 1 2 3 4). - array removeKey: 5. + + self assertCollection: array equals: (NeoJSONArray withAll: {-2. 1. 2. 3.}). + array at: -2 add: 0. + array at: #'-' add: 4. + self assertCollection: array equals: (NeoJSONArray withAll: {0. -2. 1. 2. 3. 4.}). + array removeKey: 6. array removeKey: 1. - self assertCollection: array hasSameElements: #(1 2 3) \ No newline at end of file + self assertCollection: array equals: (NeoJSONArray withAll: {-2. 1. 2. 3.}) \ No newline at end of file From f4924c210ddfb045588aa7f9e8999f78bae071bc Mon Sep 17 00:00:00 2001 From: Patrik Date: Wed, 1 Oct 2025 13:02:30 +0000 Subject: [PATCH 60/90] Enable converting NeoJSONArray values into a String --- .../NeoJSONArray.class/instance/asString.st | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/asString.st diff --git a/filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/asString.st b/filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/asString.st new file mode 100644 index 0000000..0fe9c6d --- /dev/null +++ b/filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/asString.st @@ -0,0 +1,4 @@ +print +asString + + ^self printString From ee0a5d5204d0c8b677774c43cce15c0a95886615 Mon Sep 17 00:00:00 2001 From: Patrik Date: Wed, 1 Oct 2025 13:30:45 +0000 Subject: [PATCH 61/90] readStream message is superfluous on GemSTone --- .../NeoJSONObject.class/class/fromStream..st | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/fromStream..st b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/fromStream..st index 248ad17..404da9a 100644 --- a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/fromStream..st +++ b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/fromStream..st @@ -2,7 +2,7 @@ convenience fromStream: readStream "Parse stream as JSON, so that maps become instances of me and lists instances of NeoJSONArray" - ^ (NeoJSONReader on: readStream readStream) + ^ (NeoJSONReader on: readStream) mapClass: self; listClass: NeoJSONArray; propertyNamesAsSymbols: true; From 56d3ab549b02df1f04efa017916f79fd8e6f9bf9 Mon Sep 17 00:00:00 2001 From: Patrik Date: Wed, 1 Oct 2025 13:33:48 +0000 Subject: [PATCH 62/90] Refactoring for code portability between different Smalltalk dialects --- .../NeoJSONArray.class/instance/atPath.add..st | 2 +- .../NeoJSONArray.class/instance/atPath.put..st | 2 +- .../NeoJSONObject.class/instance/atPath.add..st | 2 +- .../NeoJSONObject.class/instance/atPath.put..st | 2 +- .../NeoJSONObject.class/instance/removeAtPath..st | 2 +- repository/Neo-JSON-Core/NeoJSONArray.class.st | 4 ++-- repository/Neo-JSON-Core/NeoJSONObject.class.st | 6 +++--- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/atPath.add..st b/filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/atPath.add..st index 72057ff..96a6ec9 100644 --- a/filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/atPath.add..st +++ b/filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/atPath.add..st @@ -7,7 +7,7 @@ atPath: keyCollection add: newValue | target | keyCollection ifEmpty: [ ^ self ]. target := self. - keyCollection allButLastDo: [ :each | + keyCollection allButLast do: [ :each | target := target at: each ifAbsent: [ target at: each add: target species new ] ]. diff --git a/filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/atPath.put..st b/filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/atPath.put..st index 1cff8da..13f29de 100644 --- a/filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/atPath.put..st +++ b/filetree/Neo-JSON-Core.package/NeoJSONArray.class/instance/atPath.put..st @@ -6,7 +6,7 @@ atPath: keyCollection put: newValue | target | keyCollection ifEmpty: [ ^ self ]. target := self. - keyCollection allButLastDo: [ :each | + keyCollection allButLast do: [ :each | target := target at: each ifAbsent: [ target at: each put: target species new ] ]. diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/atPath.add..st b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/atPath.add..st index 117bde3..bfc0d88 100644 --- a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/atPath.add..st +++ b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/atPath.add..st @@ -7,7 +7,7 @@ atPath: keyCollection add: newValue | target | keyCollection ifEmpty: [ ^ self ]. target := self. - keyCollection allButLastDo: [ :each | + keyCollection allButLast do: [ :each | target := target at: each ifAbsent: [ target at: each add: target species new ] ]. diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/atPath.put..st b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/atPath.put..st index 1cff8da..13f29de 100644 --- a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/atPath.put..st +++ b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/atPath.put..st @@ -6,7 +6,7 @@ atPath: keyCollection put: newValue | target | keyCollection ifEmpty: [ ^ self ]. target := self. - keyCollection allButLastDo: [ :each | + keyCollection allButLast do: [ :each | target := target at: each ifAbsent: [ target at: each put: target species new ] ]. diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/removeAtPath..st b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/removeAtPath..st index dd80241..3c216fe 100644 --- a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/removeAtPath..st +++ b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/instance/removeAtPath..st @@ -6,6 +6,6 @@ removeAtPath: keyCollection | target | keyCollection ifEmpty: [ ^ self ]. target := self. - keyCollection allButLastDo: [ :each | + keyCollection allButLast do: [ :each | target := target at: each ifAbsent: [ ^ self ] ]. ^ target removeKey: keyCollection last \ No newline at end of file diff --git a/repository/Neo-JSON-Core/NeoJSONArray.class.st b/repository/Neo-JSON-Core/NeoJSONArray.class.st index 3ef0026..1282b39 100644 --- a/repository/Neo-JSON-Core/NeoJSONArray.class.st +++ b/repository/Neo-JSON-Core/NeoJSONArray.class.st @@ -71,7 +71,7 @@ NeoJSONArray >> atPath: keyCollection add: newValue [ | target | keyCollection ifEmpty: [ ^ self ]. target := self. - keyCollection allButLastDo: [ :each | + keyCollection allButLast do: [ :each | target := target at: each ifAbsent: [ target at: each add: target species new ] ]. @@ -86,7 +86,7 @@ NeoJSONArray >> atPath: keyCollection put: newValue [ | target | keyCollection ifEmpty: [ ^ self ]. target := self. - keyCollection allButLastDo: [ :each | + keyCollection allButLast do: [ :each | target := target at: each ifAbsent: [ target at: each put: target species new ] ]. diff --git a/repository/Neo-JSON-Core/NeoJSONObject.class.st b/repository/Neo-JSON-Core/NeoJSONObject.class.st index 50a3568..883b4d1 100644 --- a/repository/Neo-JSON-Core/NeoJSONObject.class.st +++ b/repository/Neo-JSON-Core/NeoJSONObject.class.st @@ -236,7 +236,7 @@ NeoJSONObject >> atPath: keyCollection add: newValue [ | target | keyCollection ifEmpty: [ ^ self ]. target := self. - keyCollection allButLastDo: [ :each | + keyCollection allButLast do: [ :each | target := target at: each ifAbsent: [ target at: each add: target species new ] ]. @@ -251,7 +251,7 @@ NeoJSONObject >> atPath: keyCollection put: newValue [ | target | keyCollection ifEmpty: [ ^ self ]. target := self. - keyCollection allButLastDo: [ :each | + keyCollection allButLast do: [ :each | target := target at: each ifAbsent: [ target at: each put: target species new ] ]. @@ -328,7 +328,7 @@ NeoJSONObject >> removeAtPath: keyCollection [ | target | keyCollection ifEmpty: [ ^ self ]. target := self. - keyCollection allButLastDo: [ :each | + keyCollection allButLast do: [ :each | target := target at: each ifAbsent: [ ^ self ] ]. ^ target removeKey: keyCollection last ] From e3cf28e5965c642c100899058bb39bbe543f035e Mon Sep 17 00:00:00 2001 From: Patrik Date: Wed, 1 Oct 2025 13:46:58 +0000 Subject: [PATCH 63/90] Skipping platform detection --- .../NeoJSONWriter.class/instance/initialize.st | 2 +- repository/Neo-JSON-Core/NeoJSONWriter.class.st | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/initialize.st b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/initialize.st index 11954cf..a63f3bb 100644 --- a/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/initialize.st +++ b/filetree/Neo-JSON-Core.package/NeoJSONWriter.class/instance/initialize.st @@ -1,7 +1,7 @@ initialize-release initialize super initialize. - self newLine: OSPlatform current lineEnding. + self newLine: String lf. self prettyPrint: false. self asciiOnly: false. self writeNil: false. diff --git a/repository/Neo-JSON-Core/NeoJSONWriter.class.st b/repository/Neo-JSON-Core/NeoJSONWriter.class.st index 50a6c9b..ba3fb1d 100644 --- a/repository/Neo-JSON-Core/NeoJSONWriter.class.st +++ b/repository/Neo-JSON-Core/NeoJSONWriter.class.st @@ -204,7 +204,7 @@ NeoJSONWriter >> indentedDo: block [ { #category : #'initialize-release' } NeoJSONWriter >> initialize [ super initialize. - self newLine: OSPlatform current lineEnding. + self newLine: String lf. self prettyPrint: false. self asciiOnly: false. self writeNil: false. From 152f3cc7987bae31fd613f369074f18ef45d4587 Mon Sep 17 00:00:00 2001 From: Patrik Date: Thu, 2 Oct 2025 06:48:30 +0000 Subject: [PATCH 64/90] Making the code to work in both Pharo and Gemstone Refix ee0a5d --- .../NeoJSONObject.class/class/fromStream..st | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/fromStream..st b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/fromStream..st index 404da9a..4ed8db4 100644 --- a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/fromStream..st +++ b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/fromStream..st @@ -2,8 +2,16 @@ convenience fromStream: readStream "Parse stream as JSON, so that maps become instances of me and lists instances of NeoJSONArray" - ^ (NeoJSONReader on: readStream) - mapClass: self; - listClass: NeoJSONArray; - propertyNamesAsSymbols: true; - next \ No newline at end of file + Smalltalk globals isDictionary + ifTrue: [ "Pharo" + ^ (NeoJSONReader on: readStream readStream) + mapClass: self; + listClass: NeoJSONArray; + propertyNamesAsSymbols: true; + next ] + ifFalse: [ "GemStone" + ^ (NeoJSONReader on: readStream) + mapClass: self; + listClass: NeoJSONArray; + propertyNamesAsSymbols: true; + next ] \ No newline at end of file From 8a772110afdcfed86bfe7589b57bd5b3d3c0c867 Mon Sep 17 00:00:00 2001 From: Patrik Date: Thu, 2 Oct 2025 08:17:27 +0000 Subject: [PATCH 65/90] Making tests GemStone compatible --- .../{instance => class}/exampleJSONSchema.st | 0 .../instance/testArray.st | 2 +- .../instance/testAtAt.st | 16 +++++------ .../instance/testAtPath.st | 25 ++++++++--------- .../instance/testAtPathPut.st | 23 ++++++++------- .../instance/testCRUD.st | 4 +-- .../instance/testFindPath.st | 18 ++++++------ .../instance/testFindPaths.st | 18 ++++++------ .../instance/testJSON.st | 2 +- .../instance/testPathAccess.st | 28 +++++++++---------- 10 files changed, 67 insertions(+), 69 deletions(-) rename filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/{instance => class}/exampleJSONSchema.st (100%) diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/exampleJSONSchema.st b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/class/exampleJSONSchema.st similarity index 100% rename from filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/exampleJSONSchema.st rename to filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/class/exampleJSONSchema.st diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testArray.st b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testArray.st index 986ed56..aac1974 100644 --- a/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testArray.st +++ b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testArray.st @@ -1,6 +1,6 @@ testing testArray - + | jsonArray array | jsonArray := '[-2,1,2,3]'. array := NeoJSONObject fromString: jsonArray. self assert: array asString equals: jsonArray. diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testAtAt.st b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testAtAt.st index c32d78d..a88112b 100644 --- a/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testAtAt.st +++ b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testAtAt.st @@ -2,12 +2,12 @@ testing testAtAt | object | object := NeoJSONObject new. - self assert: (object at: #foo) isNil. - self assert: (object at: #foo at: #bar) isNil. - object at: #foo at: #bar put: 123. - self assert: (object at: #foo) notNil. - self assert: (object at: #foo at: #bar) equals: 123. + self assert: (object at: #'foo') isNil. + self assert: (object at: #'foo' at: #'bar') isNil. + object at: #'foo' at: #'bar' put: 123. + self assert: (object at: #'foo') notNil. + self assert: (object at: #'foo' at: #'bar') equals: 123. self assert: object foo bar equals: 123. - object at: #foo at: #bar put: -1. - self assert: (object at: #foo at: #bar) equals: -1. - self assert: (object at: #foo at: #foo) isNil \ No newline at end of file + object at: #'foo' at: #'bar' put: -1. + self assert: (object at: #'foo' at: #'bar') equals: -1. + self assert: (object at: #'foo' at: #'foo') isNil \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testAtPath.st b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testAtPath.st index 79ed9dd..c5196c2 100644 --- a/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testAtPath.st +++ b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testAtPath.st @@ -1,17 +1,16 @@ testing testAtPath | object | - object := NeoJSONObject newFrom: (Array with: #one -> ( NeoJSONObject newFrom: (Array with: #two -> ( NeoJSONObject newFrom: (Array with: #three -> 42) ) ) )). - self assert: (object atPath: #(one two three)) equals: 42. - self assert: (object atPath: #(one two three)) equals: object one two three. - self assert: (object atPath: #(missing)) equals: nil. - self assert: (object atPath: #(one missing)) equals: nil. - self assert: (object atPath: #(one two missing)) equals: nil. - self assert: (object atPath: #(one two missing)) equals: object one two missing. - - object := NeoJSONObject newFrom: (Array with: #foo -> 42). - self assert: (object atPath: #(foo)) equals: 42. - self assert: (object atPath: #(foo)) equals: object foo. - self assert: (object atPath: #(foo)) equals: (object at: #foo). - self assert: (object atPath: #()) equals: object. + object := NeoJSONObject newFrom: (Array with: #'one' -> (NeoJSONObject newFrom: (Array with: #'two' -> (NeoJSONObject newFrom: (Array with: #'three' -> 42))))). + self assert: (object atPath: #(#'one' #'two' #'three')) equals: 42. + self assert: (object atPath: #(#'one' #'two' #'three')) equals: object one two three. + self assert: (object atPath: #(#'missing')) equals: nil. + self assert: (object atPath: #(#'one' #'missing')) equals: nil. + self assert: (object atPath: #(#'one' #'two' #'missing')) equals: nil. + self assert: (object atPath: #(#'one' #'two' #'missing')) equals: object one two missing. + object := NeoJSONObject newFrom: (Array with: #'foo' -> 42). + self assert: (object atPath: #(#'foo')) equals: 42. + self assert: (object atPath: #(#'foo')) equals: object foo. + self assert: (object atPath: #(#'foo')) equals: (object at: #'foo'). + self assert: (object atPath: #()) equals: object. \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testAtPathPut.st b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testAtPathPut.st index bcdbb21..7f55e65 100644 --- a/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testAtPathPut.st +++ b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testAtPathPut.st @@ -2,19 +2,18 @@ testing testAtPathPut | object | object := NeoJSONObject new. - object atPath: #(one test) put: 42. - self assert: (object atPath: #(one test)) equals: 42. + object atPath: #(#'one' #'test') put: 42. + self assert: (object atPath: #(#'one' #'test')) equals: 42. self assert: object one test equals: 42. - object atPath: #(one two three) put: #foo. - self assert: (object atPath: #(one two three)) equals: #foo. - self assert: object one two three equals: #foo. - object atPath: #(one two threeBis) put: #bar. - self assert: (object atPath: #(one two threeBis)) equals: #bar. - self assert: object one two threeBis equals: #bar. + object atPath: #(#'one' #'two' #'three') put: #'foo'. + self assert: (object atPath: #(#'one' #'two' #'three')) equals: #'foo'. + self assert: object one two three equals: #'foo'. + object atPath: #(#'one' #'two' #'threeBis') put: #'bar'. + self assert: (object atPath: #(#'one' #'two' #'threeBis')) equals: #'bar'. + self assert: object one two threeBis equals: #'bar'. self assert: object foo isNil. self assert: (object atPath: #() put: 1) equals: object. - self assert: (object atPath: #(foo) put: 1) equals: 1. - self assert: (object atPath: #(foo)) equals: 1. - self assert: object foo equals: 1 - + self assert: (object atPath: #(#'foo') put: 1) equals: 1. + self assert: (object atPath: #(#'foo')) equals: 1. + self assert: object foo equals: 1 \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testCRUD.st b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testCRUD.st index 43d355e..51c3da0 100644 --- a/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testCRUD.st +++ b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testCRUD.st @@ -11,8 +11,8 @@ testCRUD object value: Float pi. self assert: object name equals: 'test'. self assert: (object value closeTo: Float pi). - self assert: object keys asSet equals: #(foo name value) asSet. - object removeKey: #foo. + self assert: object keys asSet equals: #(#'foo' #'name' #'value') asSet. + object removeKey: #'foo'. self assert: object foo equals: nil. object removeAll. self assert: object isEmpty \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testFindPath.st b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testFindPath.st index d20c638..a297d62 100644 --- a/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testFindPath.st +++ b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testFindPath.st @@ -1,22 +1,22 @@ testing testFindPath | json path | - json := self exampleJSONSchema. + json := self class exampleJSONSchema. - path := json findPath: [ :object | object isDictionary and: [ (object at: '$anchor') = 'street_address' ] ]. + path := json findPath: [ :object | object isDictionary and: [ (object at: #'$anchor') = 'street_address' ] ]. self deny: path isNil. self assert: path equals: #(properties street_address). - self assert: ((json atPath: path) at: '$anchor') equals: 'street_address'. + self assert: ((json atPath: path) at: #'$anchor') equals: 'street_address'. - path := json findPath: [ :object | object isDictionary and: [ (object at: 'foo') = 'bar' ] ]. + path := json findPath: [ :object | object isDictionary and: [ (object at: #'foo') = 'bar' ] ]. self assert: path isNil. - path := json findPath: [ :object | object isDictionary and: [ (object at: '$anchor') = 'country' ] ]. + path := json findPath: [ :object | object isDictionary and: [ (object at: #'$anchor') = 'country' ] ]. self deny: path isNil. - self assert: path equals: #('$defs' country). - self assert: ((json atPath: path) at: '$anchor') equals: 'country'. + self assert: path equals: #(#'$defs' #'country'). + self assert: ((json atPath: path) at: #'$anchor') equals: 'country'. - json := NeoJSONObject new at: '$anchor' put: 'top'; yourself. + json := NeoJSONObject new at: #'$anchor' put: 'top'; yourself. self - assert: (json findPath: [ :object | object isDictionary and: [ (object at: '$anchor') = 'top' ] ]) + assert: (json findPath: [ :object | object isDictionary and: [ (object at: #'$anchor') = 'top' ] ]) equals: #(()) \ No newline at end of file diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testFindPaths.st b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testFindPaths.st index df937b1..87e317d 100644 --- a/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testFindPaths.st +++ b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testFindPaths.st @@ -1,22 +1,22 @@ testing testFindPaths | json paths | - json := self exampleJSONSchema. + json := self class exampleJSONSchema. - paths := json findPaths: [ :object | object isDictionary and: [ object includesKey: '$anchor' ] ]. + paths := json findPaths: [ :object | object isDictionary and: [ object includesKey: #'$anchor' ] ]. self deny: paths isEmpty. - self assert: paths asArray equals: #((properties street_address) ('$defs' country)). - self assert: ((json atPath: paths first) at: '$anchor') equals: 'street_address'. - self assert: ((json atPath: paths second) at: '$anchor') equals: 'country'. + self assert: paths asArray equals: #((properties street_address) (#'$defs' #'country')). + self assert: ((json atPath: paths first) at: #'$anchor') equals: 'street_address'. + self assert: ((json atPath: paths second) at: #'$anchor') equals: 'country'. - paths := json findPaths: [ :object | object isDictionary and: [ (object at: 'foo') = 'bar' ] ]. + paths := json findPaths: [ :object | object isDictionary and: [ (object at: #'foo') = 'bar' ] ]. self assert: paths isEmpty. - paths := json findPaths: [ :object | object isDictionary and: [ object includesKey: #type ] ]. + paths := json findPaths: [ :object | object isDictionary and: [ object includesKey: #'type' ] ]. self deny: paths isEmpty. paths do: [ :path | - self assert: (#(string object) includes: ((json atPath: path) at: #type)) ]. + self assert: (#('string' 'object') includes: ((json atPath: path) at: #'type')) ]. paths := json findPaths: [ :_ | true ]. paths do: [ :each | - self assert: (json atPath: each) notNil ] \ No newline at end of file + self assert: (json atPath: each) notNil ] diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testJSON.st b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testJSON.st index 3cb012f..0513aae 100644 --- a/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testJSON.st +++ b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testJSON.st @@ -1,7 +1,7 @@ testing testJSON | data json object | - data := NeoJSONObject newFrom: (Array with: #foo->1 with: #bar->2 with: #str->'Str!' with: #bool->true with: #flt->1.5). + data := NeoJSONObject newFrom: (Array with: #'foo'->1 with: #'bar'->2 with: #'str'->'Str!' with: #'bool'->true with: #'flt'->1.5). json := NeoJSONWriter toString: data . object := NeoJSONObject fromString: json. self assert: object class equals: NeoJSONObject. diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testPathAccess.st b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testPathAccess.st index 21793c0..655e410 100644 --- a/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testPathAccess.st +++ b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testPathAccess.st @@ -2,19 +2,19 @@ testing testPathAccess | data | data := NeoJSONObject fromString: '{"foo":1,"bar":2,"array":[{"a":1},{"b":2}]}'. - self assert: (data atPath: #(array 1 a)) equals: 1. - self assert: (data atPath: #(array 2 b)) equals: 2. - self assert: (data atPath: #(missing 1)) equals: nil. - data atPath: #(missing) put: 7. - self assert: (data atPath: #(missing)) equals: 7. - self assert: (data atPath: #(array 3)) equals: nil. + self assert: (data atPath: #(#'array' 1 #'a')) equals: 1. + self assert: (data atPath: #(#'array' 2 #'b')) equals: 2. + self assert: (data atPath: #(#'missing' 1)) equals: nil. + data atPath: #(#'missing') put: 7. + self assert: (data atPath: #(#'missing')) equals: 7. + self assert: (data atPath: #(#'array' 3)) equals: nil. data := NeoJSONObject fromString: '[{"c":1},{"c":2},{"c":3}]'. - self assert: (data atPath: #(2 c)) equals: 2. - self assert: (data atPath: #(10 c)) equals: nil. - self assert: (data atPath: #(3 missing)) equals: nil. - data atPath: #(3 missing) put: #found. - self assert: (data atPath: #(3 missing)) equals: #found. + self assert: (data atPath: #(2 #'c')) equals: 2. + self assert: (data atPath: #(10 #'c')) equals: nil. + self assert: (data atPath: #(3 #'missing')) equals: nil. + data atPath: #(3 #'missing') put: #found. + self assert: (data atPath: #(3 #'missing')) equals: #found. (data at: 3) removeKey: #missing. - self assert: (data atPath: #(3 missing)) equals: nil. - data atPath: #(3 missing x) put: #found. - self assert: (data atPath: #(3 missing x)) equals: #found. \ No newline at end of file + self assert: (data atPath: #(3 #'missing')) equals: nil. + data atPath: #(3 #'missing' #'x') put: #found. + self assert: (data atPath: #(3 #'missing' #'x')) equals: #found. \ No newline at end of file From ad6142ebf16ec572a14904c5ca59b005181d04be Mon Sep 17 00:00:00 2001 From: Patrik Date: Thu, 2 Oct 2025 08:53:59 +0000 Subject: [PATCH 66/90] Symbol is not the same thing as String --- .../NeoJSONExamplesTests.class/instance/testMultiInstances.st | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testMultiInstances.st b/filetree/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testMultiInstances.st index 02b10a1..296b4e0 100644 --- a/filetree/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testMultiInstances.st +++ b/filetree/Neo-JSON-Tests.package/NeoJSONExamplesTests.class/instance/testMultiInstances.st @@ -6,7 +6,7 @@ testMultiInstances | data json | data := (1 to: 10) collect: [ :each | - { #number -> each } asDictionary ]. + { 'number' -> each } asDictionary ]. json := String streamContents: [ :out | (NeoJSONWriter on: out) nextPutAll: data ]. From 0d023064adaa012df245929592dfa0ff893b33ba Mon Sep 17 00:00:00 2001 From: Patrik Date: Thu, 2 Oct 2025 09:30:56 +0000 Subject: [PATCH 67/90] Adding used methods to as extensions --- .../Float.extension/instance/isFinite.st | 5 +++++ .../Float.extension/properties.json | 2 ++ .../Integer.extension/instance/asCharacterDigit.st | 4 ++++ .../Integer.extension/instance/digitAt.base..st | 11 +++++++++++ .../Integer.extension/properties.json | 2 ++ 5 files changed, 24 insertions(+) create mode 100644 filetree/Neo-JSON-GemStone-Core.package/Float.extension/instance/isFinite.st create mode 100644 filetree/Neo-JSON-GemStone-Core.package/Float.extension/properties.json create mode 100644 filetree/Neo-JSON-GemStone-Core.package/Integer.extension/instance/asCharacterDigit.st create mode 100644 filetree/Neo-JSON-GemStone-Core.package/Integer.extension/instance/digitAt.base..st create mode 100644 filetree/Neo-JSON-GemStone-Core.package/Integer.extension/properties.json diff --git a/filetree/Neo-JSON-GemStone-Core.package/Float.extension/instance/isFinite.st b/filetree/Neo-JSON-GemStone-Core.package/Float.extension/instance/isFinite.st new file mode 100644 index 0000000..9b308a1 --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Core.package/Float.extension/instance/isFinite.st @@ -0,0 +1,5 @@ +*neo-json-gemstone-core +isFinite + "simple, byte-order independent test for rejecting Not-a-Number and (Negative)Infinity" + + ^(self - self) = 0.0 \ No newline at end of file diff --git a/filetree/Neo-JSON-GemStone-Core.package/Float.extension/properties.json b/filetree/Neo-JSON-GemStone-Core.package/Float.extension/properties.json new file mode 100644 index 0000000..761fb56 --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Core.package/Float.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "Float" } diff --git a/filetree/Neo-JSON-GemStone-Core.package/Integer.extension/instance/asCharacterDigit.st b/filetree/Neo-JSON-GemStone-Core.package/Integer.extension/instance/asCharacterDigit.st new file mode 100644 index 0000000..01e73db --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Core.package/Integer.extension/instance/asCharacterDigit.st @@ -0,0 +1,4 @@ +*neo-json-gemstone-core +asCharacterDigit + "Answer the Character whose string representation is the receiver." + ^ Character digitValue: self \ No newline at end of file diff --git a/filetree/Neo-JSON-GemStone-Core.package/Integer.extension/instance/digitAt.base..st b/filetree/Neo-JSON-GemStone-Core.package/Integer.extension/instance/digitAt.base..st new file mode 100644 index 0000000..7f36f15 --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Core.package/Integer.extension/instance/digitAt.base..st @@ -0,0 +1,11 @@ +*neo-json-gemstone-core +digitAt: anExponent base: base + "Return number that represents digit at given position." + "(42 digitAt: 2 base: 10) >>> 4" + "(42 digitAt: 1 base: 10) >>> 2" + "It is always a number or zero:" + "(16rFF digitAt: 1 base: 16) >>> 15" + "(1 digitAt: 2 base: 10) >>> 0" + "Results are not defined for base smaller than 2 and non-integer arguments." + + ^ self // (base raisedToInteger: anExponent - 1) \\ base diff --git a/filetree/Neo-JSON-GemStone-Core.package/Integer.extension/properties.json b/filetree/Neo-JSON-GemStone-Core.package/Integer.extension/properties.json new file mode 100644 index 0000000..d27420b --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Core.package/Integer.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "Integer" } From 538652cf9654a974ef7c5f37a158f8b1b3d300d2 Mon Sep 17 00:00:00 2001 From: Patrik Date: Thu, 2 Oct 2025 10:21:49 +0000 Subject: [PATCH 68/90] Adding special variables for NeoJSON --- .../BinaryFloat.extension/class/negativeInfinity.st | 4 ++++ .../BinaryFloat.extension/class/zero.st | 4 ++++ .../BinaryFloat.extension/instance/isFinite.st | 4 ++++ .../BinaryFloat.extension/instance/isZero.st | 4 ++++ .../BinaryFloat.extension/properties.json | 2 ++ .../Float.extension/instance/isFinite.st | 5 ----- .../Float.extension/properties.json | 2 -- .../Integer.extension/instance/asCharacterDigit.st | 2 +- .../Integer.extension/instance/digitAt.base..st | 7 ------- 9 files changed, 19 insertions(+), 15 deletions(-) create mode 100644 filetree/Neo-JSON-GemStone-Core.package/BinaryFloat.extension/class/negativeInfinity.st create mode 100644 filetree/Neo-JSON-GemStone-Core.package/BinaryFloat.extension/class/zero.st create mode 100644 filetree/Neo-JSON-GemStone-Core.package/BinaryFloat.extension/instance/isFinite.st create mode 100644 filetree/Neo-JSON-GemStone-Core.package/BinaryFloat.extension/instance/isZero.st create mode 100644 filetree/Neo-JSON-GemStone-Core.package/BinaryFloat.extension/properties.json delete mode 100644 filetree/Neo-JSON-GemStone-Core.package/Float.extension/instance/isFinite.st delete mode 100644 filetree/Neo-JSON-GemStone-Core.package/Float.extension/properties.json diff --git a/filetree/Neo-JSON-GemStone-Core.package/BinaryFloat.extension/class/negativeInfinity.st b/filetree/Neo-JSON-GemStone-Core.package/BinaryFloat.extension/class/negativeInfinity.st new file mode 100644 index 0000000..79f7aeb --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Core.package/BinaryFloat.extension/class/negativeInfinity.st @@ -0,0 +1,4 @@ +*neo-json-gemstone-core +negativeInfinity + + ^ self fromString: 'MinusInfinity' \ No newline at end of file diff --git a/filetree/Neo-JSON-GemStone-Core.package/BinaryFloat.extension/class/zero.st b/filetree/Neo-JSON-GemStone-Core.package/BinaryFloat.extension/class/zero.st new file mode 100644 index 0000000..c4b78c1 --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Core.package/BinaryFloat.extension/class/zero.st @@ -0,0 +1,4 @@ +*neo-json-gemstone-core +zero + + ^ 0.0 \ No newline at end of file diff --git a/filetree/Neo-JSON-GemStone-Core.package/BinaryFloat.extension/instance/isFinite.st b/filetree/Neo-JSON-GemStone-Core.package/BinaryFloat.extension/instance/isFinite.st new file mode 100644 index 0000000..a9f5c8e --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Core.package/BinaryFloat.extension/instance/isFinite.st @@ -0,0 +1,4 @@ +*neo-json-gemstone-core +isFinite + + ^(self - self) = 0.0 \ No newline at end of file diff --git a/filetree/Neo-JSON-GemStone-Core.package/BinaryFloat.extension/instance/isZero.st b/filetree/Neo-JSON-GemStone-Core.package/BinaryFloat.extension/instance/isZero.st new file mode 100644 index 0000000..7f88ea6 --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Core.package/BinaryFloat.extension/instance/isZero.st @@ -0,0 +1,4 @@ +*neo-json-gemstone-core +isZero + + ^ self = 0.0 \ No newline at end of file diff --git a/filetree/Neo-JSON-GemStone-Core.package/BinaryFloat.extension/properties.json b/filetree/Neo-JSON-GemStone-Core.package/BinaryFloat.extension/properties.json new file mode 100644 index 0000000..b3b882e --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Core.package/BinaryFloat.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "BinaryFloat" } diff --git a/filetree/Neo-JSON-GemStone-Core.package/Float.extension/instance/isFinite.st b/filetree/Neo-JSON-GemStone-Core.package/Float.extension/instance/isFinite.st deleted file mode 100644 index 9b308a1..0000000 --- a/filetree/Neo-JSON-GemStone-Core.package/Float.extension/instance/isFinite.st +++ /dev/null @@ -1,5 +0,0 @@ -*neo-json-gemstone-core -isFinite - "simple, byte-order independent test for rejecting Not-a-Number and (Negative)Infinity" - - ^(self - self) = 0.0 \ No newline at end of file diff --git a/filetree/Neo-JSON-GemStone-Core.package/Float.extension/properties.json b/filetree/Neo-JSON-GemStone-Core.package/Float.extension/properties.json deleted file mode 100644 index 761fb56..0000000 --- a/filetree/Neo-JSON-GemStone-Core.package/Float.extension/properties.json +++ /dev/null @@ -1,2 +0,0 @@ -{ - "name" : "Float" } diff --git a/filetree/Neo-JSON-GemStone-Core.package/Integer.extension/instance/asCharacterDigit.st b/filetree/Neo-JSON-GemStone-Core.package/Integer.extension/instance/asCharacterDigit.st index 01e73db..edb0732 100644 --- a/filetree/Neo-JSON-GemStone-Core.package/Integer.extension/instance/asCharacterDigit.st +++ b/filetree/Neo-JSON-GemStone-Core.package/Integer.extension/instance/asCharacterDigit.st @@ -1,4 +1,4 @@ *neo-json-gemstone-core asCharacterDigit - "Answer the Character whose string representation is the receiver." + ^ Character digitValue: self \ No newline at end of file diff --git a/filetree/Neo-JSON-GemStone-Core.package/Integer.extension/instance/digitAt.base..st b/filetree/Neo-JSON-GemStone-Core.package/Integer.extension/instance/digitAt.base..st index 7f36f15..2cc9604 100644 --- a/filetree/Neo-JSON-GemStone-Core.package/Integer.extension/instance/digitAt.base..st +++ b/filetree/Neo-JSON-GemStone-Core.package/Integer.extension/instance/digitAt.base..st @@ -1,11 +1,4 @@ *neo-json-gemstone-core digitAt: anExponent base: base - "Return number that represents digit at given position." - "(42 digitAt: 2 base: 10) >>> 4" - "(42 digitAt: 1 base: 10) >>> 2" - "It is always a number or zero:" - "(16rFF digitAt: 1 base: 16) >>> 15" - "(1 digitAt: 2 base: 10) >>> 0" - "Results are not defined for base smaller than 2 and non-integer arguments." ^ self // (base raisedToInteger: anExponent - 1) \\ base From 7822024c4663fa5a193803b8f19b355ec34326f6 Mon Sep 17 00:00:00 2001 From: Patrik Date: Thu, 2 Oct 2025 10:59:52 +0000 Subject: [PATCH 69/90] Changing the test using one from the upstream --- .../instance/testStrings.st | 56 +++++++------------ 1 file changed, 19 insertions(+), 37 deletions(-) diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testStrings.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testStrings.st index add010b..e85cdf2 100644 --- a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testStrings.st +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testStrings.st @@ -1,38 +1,20 @@ testing -testStrings - | writer | - writer := [ :object | String streamContents: [ :stream | (NeoJSONWriter on: stream) nextPut: object ] ]. - self assert: (writer value: 'foo') equals: '"foo"'. - self assert: (writer value: 'Foo BAR') equals: '"Foo BAR"'. - self assert: (writer value: '') equals: '""'. - self assert: (writer value: 'élève français') equals: '"élève français"'. - self - assert: - (writer - value: - (String - withAll: - {$". - $\. - $/. - (Character tab). - (Character cr). - (Character lf). - (Character newPage). - (Character backspace)})) - equals: '"\"\\/\t\r\n\f\b"'. - self - assert: - (writer - value: - 'Я можу їсти скло, і воно мені не зашкодить.' - decodeFromUTF8) - equals: - '"' - , - 'Я можу їсти скло, і воно мені не зашкодить.' - decodeFromUTF8 - , '"'. - self - assert: (writer value: '𣎏' decodeFromUTF8) - equals: '"' , '𣎏' decodeFromUTF8 , '"' + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) nextPut: object ] ]. + self assert: (writer value: 'foo') equals: '"foo"'. + self assert: (writer value: 'Foo BAR') equals: '"Foo BAR"'. + self assert: (writer value: '') equals: '""'. + self + assert: (writer value: (String withAll: ( OrderedCollection new + add: $"; + add: $\; + add: $/; + add: Character tab; + add: Character cr; + add: Character lf; + add: Character newPage; + add: Character backspace; + yourself ))) + equals: '"\"\\/\t\r\n\f\b"' \ No newline at end of file From 9a066a8836c03d318eed1c0ddddf79a88d3122fa Mon Sep 17 00:00:00 2001 From: Patrik Date: Thu, 2 Oct 2025 12:51:19 +0000 Subject: [PATCH 70/90] Adding compatibility method --- .../class/newFromPairs..st | 12 ++++++++++++ .../KeyValueDictionary.extension/properties.json | 2 ++ 2 files changed, 14 insertions(+) create mode 100644 filetree/Neo-JSON-GemStone-Core.package/KeyValueDictionary.extension/class/newFromPairs..st create mode 100644 filetree/Neo-JSON-GemStone-Core.package/KeyValueDictionary.extension/properties.json diff --git a/filetree/Neo-JSON-GemStone-Core.package/KeyValueDictionary.extension/class/newFromPairs..st b/filetree/Neo-JSON-GemStone-Core.package/KeyValueDictionary.extension/class/newFromPairs..st new file mode 100644 index 0000000..1c78715 --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Core.package/KeyValueDictionary.extension/class/newFromPairs..st @@ -0,0 +1,12 @@ +*neo-json-gemstone-core +newFromPairs: anArray + "Answer an instance of me associating (anArray at:i) to (anArray at: i+i) + for each odd i. anArray must have an even number of entries. + Dictionary newFromPairs: {'Red' . Color red . 'Blue' . Color blue . 'Green' . Color green}. " + | newDictionary | + + newDictionary := self new: (anArray size/2). + 1 to: (anArray size-1) by: 2 do: [ :i| + newDictionary at: (anArray at: i) put: (anArray at: i+1). + ]. + ^ newDictionary diff --git a/filetree/Neo-JSON-GemStone-Core.package/KeyValueDictionary.extension/properties.json b/filetree/Neo-JSON-GemStone-Core.package/KeyValueDictionary.extension/properties.json new file mode 100644 index 0000000..564db8e --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Core.package/KeyValueDictionary.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "KeyValueDictionary" } From 8142df41447d835d851bbf75afcca8906958205d Mon Sep 17 00:00:00 2001 From: Patrik Date: Thu, 2 Oct 2025 12:56:15 +0000 Subject: [PATCH 71/90] Changing the test using one from the upstream --- .../instance/testAsciiOnlyStrings.st | 59 +++++++------------ 1 file changed, 22 insertions(+), 37 deletions(-) diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testAsciiOnlyStrings.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testAsciiOnlyStrings.st index 58edabf..1291ba6 100644 --- a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testAsciiOnlyStrings.st +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testAsciiOnlyStrings.st @@ -1,39 +1,24 @@ testing testAsciiOnlyStrings - | writer | - writer := [ :object | - String - streamContents: [ :stream | - (NeoJSONWriter on: stream) - asciiOnly: true; - nextPut: object ] ]. - self - assert: (writer value: 'élève français') - equals: '"\u00E9l\u00E8ve fran\u00E7ais"'. - self assert: (writer value: 'foo') equals: '"foo"'. - self assert: (writer value: 'Foo BAR') equals: '"Foo BAR"'. - self assert: (writer value: '') equals: '""'. - self - assert: - (writer - value: - (String - withAll: - {$". - $\. - $/. - (Character tab). - (Character cr). - (Character lf). - (Character newPage). - (Character backspace)})) - equals: '"\"\\/\t\r\n\f\b"'. - self - assert: - (writer - value: - 'Я можу їсти скло, і воно мені не зашкодить.' - decodeFromUTF8) - equals: - '"\u042F \u043C\u043E\u0436\u0443 \u0457\u0441\u0442\u0438 \u0441\u043A\u043B\u043E, \u0456 \u0432\u043E\u043D\u043E \u043C\u0435\u043D\u0456 \u043D\u0435 \u0437\u0430\u0448\u043A\u043E\u0434\u0438\u0442\u044C."'. - self assert: (writer value: '𣎏' decodeFromUTF8) equals: '"\uD84C\uDF8F"' + | writer | + writer := [ :object | + String streamContents: [ :stream | + (NeoJSONWriter on: stream) + asciiOnly: true; + nextPut: object ] ]. + self assert: (writer value: 'élève français') equals: '"\u00E9l\u00E8ve fran\u00E7ais"'. + self assert: (writer value: 'foo') equals: '"foo"'. + self assert: (writer value: 'Foo BAR') equals: '"Foo BAR"'. + self assert: (writer value: '') equals: '""'. + self + assert: (writer value: (String withAll: ( OrderedCollection new + add: $"; + add: $\; + add: $/; + add: Character tab; + add: Character cr; + add: Character lf; + add: Character newPage; + add: Character backspace; + yourself ))) + equals: '"\"\\/\t\r\n\f\b"' \ No newline at end of file From 84a330713c4264f95c46fadbef713262a133fe9d Mon Sep 17 00:00:00 2001 From: Patrik Date: Thu, 2 Oct 2025 13:00:54 +0000 Subject: [PATCH 72/90] Improving Time test compatibility - Checking if SmallTime class is available, if yes use it, if no stick to the standard one - Making the test work with 24-hour or 12-hour format --- .../NeoJSONWriterTests.class/instance/testTime.st | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testTime.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testTime.st index 18da0ce..acf60da 100644 --- a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testTime.st +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testTime.st @@ -1,10 +1,13 @@ testing testTime - | writer | +testTime + | timeClassType hourFormat writer | + timeClassType := (Smalltalk globals at: #'SmallTime' ifAbsent: [ nil ]) ifNil: [ Time ] ifNotNil: [ SmallTime ]. + "Hours could be in 12-hour format or 24-hour format" + hourFormat := (Time hour: 14 minute: 0 second: 0) hours = 2 ifTrue: [ '2' ] ifFalse: [ '14' ]. writer := [ :object | String streamContents: [ :stream | - (NeoJSONWriter on: stream) - for: Time customDo: [ :mapping | - mapping encoder: [ :time | time printString ] ]; - nextPut: object ] ]. - self assert: ((writer value: (Time fromSeconds: 52208)) includesSubstring: '2:30:08') \ No newline at end of file + (NeoJSONWriter on: stream) for: timeClassType customDo: [ :mapping | + mapping encoder: [ :time | time printString ] ]; + nextPut: object ] ]. + self assert: ((writer value: (Time fromSeconds: 52208)) includesSubstring: hourFormat, ':30:08') \ No newline at end of file From 5992a3b155d276d5c9c7b5e1b25a184642f98ea6 Mon Sep 17 00:00:00 2001 From: Patrik Date: Thu, 2 Oct 2025 13:01:38 +0000 Subject: [PATCH 73/90] Date test takes into account the existence of SmallDate --- .../NeoJSONWriterTests.class/instance/testDate.st | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testDate.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testDate.st index 5162f00..a4116d4 100644 --- a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testDate.st +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testDate.st @@ -1,10 +1,11 @@ testing testDate - | writer | + | dateClassType writer | + dateClassType := (Smalltalk globals at: #'SmallTime' ifAbsent: [ nil ]) ifNil: [ Date ] ifNotNil: [ SmallDate ]. writer := [ :object | String streamContents: [ :stream | (NeoJSONWriter on: stream) - for: Date customDo: [ :mapping | + for: dateClassType customDo: [ :mapping | mapping encoder: [ :date | date yyyymmdd ] ]; nextPut: object ] ]. - self assert: (writer value: (Date newDay: 8 month: 'June' year: 2012)) equals: '"2012-06-08"' + self assert: (writer value: (Date newDay: 8 month: 'June' year: 2012)) equals: '"2012-06-08"' \ No newline at end of file From 7cd453c13adbfb429ba5b7a9cab60e43f09f8f3a Mon Sep 17 00:00:00 2001 From: Patrik Date: Thu, 2 Oct 2025 13:01:52 +0000 Subject: [PATCH 74/90] DateAndtime test takes into account the existence of SmallDateAndTime --- .../NeoJSONWriterTests.class/instance/testDateAndTime.st | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testDateAndTime.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testDateAndTime.st index 9ba04ea..b7fe2b5 100644 --- a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testDateAndTime.st +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testDateAndTime.st @@ -1,10 +1,11 @@ testing testDateAndTime - | writer | + | dateAndTimeClassType writer | + dateAndTimeClassType := (Smalltalk globals at: #'SmallTime' ifAbsent: [ nil ]) ifNil: [ DateAndTime ] ifNotNil: [ SmallDateAndTime ]. writer := [ :object | String streamContents: [ :stream | (NeoJSONWriter on: stream) - for: DateAndTime customDo: [ :mapping | + for: SmallDateAndTime customDo: [ :mapping | mapping encoder: [ :dateAndTime | dateAndTime printString ] ]; nextPut: object ] ]. self From 3b2755a87feadbe60e2150da6c1c4d1ca017681f Mon Sep 17 00:00:00 2001 From: Patrik Date: Thu, 2 Oct 2025 13:19:59 +0000 Subject: [PATCH 75/90] Defining method twice breaks the load --- .../NeoJSONWriterTests.class/instance/testTime.st | 1 - 1 file changed, 1 deletion(-) diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testTime.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testTime.st index acf60da..0681855 100644 --- a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testTime.st +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testTime.st @@ -1,5 +1,4 @@ testing -testTime testTime | timeClassType hourFormat writer | timeClassType := (Smalltalk globals at: #'SmallTime' ifAbsent: [ nil ]) ifNil: [ Time ] ifNotNil: [ SmallTime ]. From 384838eabe434ea9feef12197449ed4cfb1feb11 Mon Sep 17 00:00:00 2001 From: Patrik Date: Thu, 2 Oct 2025 13:54:36 +0000 Subject: [PATCH 76/90] Adding missing method name --- .../NeoJSONWriterTests.class/instance/testStrings.st | 1 + 1 file changed, 1 insertion(+) diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testStrings.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testStrings.st index e85cdf2..f267894 100644 --- a/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testStrings.st +++ b/filetree/Neo-JSON-Tests.package/NeoJSONWriterTests.class/instance/testStrings.st @@ -1,4 +1,5 @@ testing +testStrings | writer | writer := [ :object | String streamContents: [ :stream | From 0db08ff9c4ae2a6fa3ad4604b91cfe1616aa9f7b Mon Sep 17 00:00:00 2001 From: Patrik Date: Fri, 3 Oct 2025 07:02:32 +0000 Subject: [PATCH 77/90] Enable running SmalltalkCI job --- .smalltalk_gemstone.ston | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .smalltalk_gemstone.ston diff --git a/.smalltalk_gemstone.ston b/.smalltalk_gemstone.ston new file mode 100644 index 0000000..c376a87 --- /dev/null +++ b/.smalltalk_gemstone.ston @@ -0,0 +1,10 @@ +SmalltalkCISpec { + #loading : [ + SCIMetacelloLoadSpec { + #baseline : 'NeoJSON', + #directory : 'filetree', + #load : [ 'Tests' ], + #platforms : [ #gemstone] + } + ] +} From 13b640363f2f18746f6bb6ab1006559c407bd91a Mon Sep 17 00:00:00 2001 From: Patrik Date: Fri, 3 Oct 2025 08:15:23 +0000 Subject: [PATCH 78/90] Compensating for different IdentityDictionary inheritance in GemStone In Pharo IdentityDictionary is a subclass of Dictionary, but in GemStone it is a KeyValueDictionary. Need to create method to get correct results. --- .../KeyValueDictionary.extension/instance/neoJsonOn..st | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 filetree/Neo-JSON-GemStone-Core.package/KeyValueDictionary.extension/instance/neoJsonOn..st diff --git a/filetree/Neo-JSON-GemStone-Core.package/KeyValueDictionary.extension/instance/neoJsonOn..st b/filetree/Neo-JSON-GemStone-Core.package/KeyValueDictionary.extension/instance/neoJsonOn..st new file mode 100644 index 0000000..d439874 --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Core.package/KeyValueDictionary.extension/instance/neoJsonOn..st @@ -0,0 +1,3 @@ +*neo-json-gemstone-core +neoJsonOn: neoJSONWriter + neoJSONWriter writeMap: self \ No newline at end of file From 37f910b72051042c871f03fe273b441954221ead Mon Sep 17 00:00:00 2001 From: Patrik Date: Fri, 3 Oct 2025 08:56:17 +0000 Subject: [PATCH 79/90] Adding extensions for NeoJSON escapeUnicode4: functionality --- .../instance/isPowerOfTwo.st | 4 +++ .../instance/numberOfDigitsInBase..st | 30 +++++++++++++++++ .../instance/printOn.base.length.padded..st | 15 +++++++++ .../printOn.on.prefix.length.padded..st | 14 ++++++++ .../instance/numberOfDigitsInBase..st | 8 +++++ .../instance/printOn.base.length.padded..st | 33 +++++++++++++++++++ .../instance/printOn.base.nDigits..st | 6 ++++ .../SmallInteger.extension/properties.json | 2 ++ 8 files changed, 112 insertions(+) create mode 100644 filetree/Neo-JSON-GemStone-Core.package/Integer.extension/instance/isPowerOfTwo.st create mode 100644 filetree/Neo-JSON-GemStone-Core.package/Integer.extension/instance/numberOfDigitsInBase..st create mode 100644 filetree/Neo-JSON-GemStone-Core.package/Integer.extension/instance/printOn.base.length.padded..st create mode 100644 filetree/Neo-JSON-GemStone-Core.package/Integer.extension/instance/printOn.on.prefix.length.padded..st create mode 100644 filetree/Neo-JSON-GemStone-Core.package/SmallInteger.extension/instance/numberOfDigitsInBase..st create mode 100644 filetree/Neo-JSON-GemStone-Core.package/SmallInteger.extension/instance/printOn.base.length.padded..st create mode 100644 filetree/Neo-JSON-GemStone-Core.package/SmallInteger.extension/instance/printOn.base.nDigits..st create mode 100644 filetree/Neo-JSON-GemStone-Core.package/SmallInteger.extension/properties.json diff --git a/filetree/Neo-JSON-GemStone-Core.package/Integer.extension/instance/isPowerOfTwo.st b/filetree/Neo-JSON-GemStone-Core.package/Integer.extension/instance/isPowerOfTwo.st new file mode 100644 index 0000000..0b420a8 --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Core.package/Integer.extension/instance/isPowerOfTwo.st @@ -0,0 +1,4 @@ +*neo-json-gemstone-core +isPowerOfTwo + "Return true if the receiver is an integral power of two." + ^ self ~= 0 and: [ (self bitAnd: self-1) = 0 ] \ No newline at end of file diff --git a/filetree/Neo-JSON-GemStone-Core.package/Integer.extension/instance/numberOfDigitsInBase..st b/filetree/Neo-JSON-GemStone-Core.package/Integer.extension/instance/numberOfDigitsInBase..st new file mode 100644 index 0000000..4995891 --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Core.package/Integer.extension/instance/numberOfDigitsInBase..st @@ -0,0 +1,30 @@ +*neo-json-gemstone-core +numberOfDigitsInBase: b + "Return how many digits are necessary to print this number in base b. + This does not count any place for minus sign, radix prefix or whatever. + Note that this algorithm may cost a few operations on LargeInteger." + + | nDigits q total | + self negative ifTrue: [^self negated numberOfDigitsInBase: b]. + self < b ifTrue: [^1]. + b isPowerOfTwo ifTrue: [^self highBit + b highBit - 2 quo: b highBit - 1]. + + "A conversion from base 2 to base b has to be performed. + This algorithm avoids Float computations like (self log: b) floor + 1, + 1) because they are inexact + 2) because LargeInteger might overflow + 3) because this algorithm might be cheaper than conversion" + + q := self. + total := 0. + ["Make an initial nDigits guess that is lower than or equal to required number of digits" + nDigits := b = 10 + ifTrue: [((q highBit - 1) * 1233 >> 12) + 1. "This is because (2 log)/(10 log)*4096 is slightly greater than 1233"] + ifFalse: [q highBit quo: b highBit]. + total := total + nDigits. + + "See how many digits remains above these first nDigits guess" + (q := q quo: (b raisedToInteger: nDigits)) < b] whileFalse. + ^q = 0 + ifTrue: [total] + ifFalse: [total + 1] \ No newline at end of file diff --git a/filetree/Neo-JSON-GemStone-Core.package/Integer.extension/instance/printOn.base.length.padded..st b/filetree/Neo-JSON-GemStone-Core.package/Integer.extension/instance/printOn.base.length.padded..st new file mode 100644 index 0000000..8d93f4d --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Core.package/Integer.extension/instance/printOn.base.length.padded..st @@ -0,0 +1,15 @@ +*neo-json-gemstone-core +printOn: aStream base: base length: minimum padded: zeroFlag + "Return a String representation of this number in base b with a minimum length and padded by 0 if zeroFlag is set" + + "(String streamContents: [ :s | 10 printOn: s base: 10 length: 4 padded: true] ) >>> '0010'" + "(String streamContents: [ :s | -10 printOn: s base: 10 length: 4 padded: true] ) >>> '-010'" + + | prefix | + prefix := self negative ifTrue: ['-'] ifFalse: [ '' ]. + self + print: (self abs printStringBase: base) + on: aStream + prefix: prefix + length: minimum + padded: zeroFlag \ No newline at end of file diff --git a/filetree/Neo-JSON-GemStone-Core.package/Integer.extension/instance/printOn.on.prefix.length.padded..st b/filetree/Neo-JSON-GemStone-Core.package/Integer.extension/instance/printOn.on.prefix.length.padded..st new file mode 100644 index 0000000..65bc397 --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Core.package/Integer.extension/instance/printOn.on.prefix.length.padded..st @@ -0,0 +1,14 @@ +*neo-json-gemstone-core +print: positiveNumberString on: aStream prefix: prefix length: minimum padded: zeroFlag + "Return a String based on concatenation of positiveNumberString with prefix then padded by 0 is zeroFlag is set for a minimum length." + + "(String streamContents: [ :s | 10 print: '10' on: s prefix: 'zz' length: 4 padded: true ] ) >>> 'zz10'" + + | padLength | + padLength := minimum - positiveNumberString size - prefix size. + padLength > 0 + ifTrue: [ zeroFlag + ifTrue: [ aStream nextPutAll: prefix; nextPutAll: (String new: padLength withAll: $0) ] + ifFalse: [ aStream nextPutAll: (String new: padLength withAll: Character space); nextPutAll: prefix ] ] + ifFalse: [ aStream nextPutAll: prefix ]. + aStream nextPutAll: positiveNumberString \ No newline at end of file diff --git a/filetree/Neo-JSON-GemStone-Core.package/SmallInteger.extension/instance/numberOfDigitsInBase..st b/filetree/Neo-JSON-GemStone-Core.package/SmallInteger.extension/instance/numberOfDigitsInBase..st new file mode 100644 index 0000000..67567b0 --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Core.package/SmallInteger.extension/instance/numberOfDigitsInBase..st @@ -0,0 +1,8 @@ +*neo-json-gemstone-core +numberOfDigitsInBase: b + "Return how many digits are necessary to print this number in base b. + Mostly same as super but an optimized version for base 10 case" + + b = 10 ifFalse: [^super numberOfDigitsInBase: b]. + self < 0 ifTrue: [^self negated numberOfDigitsInBase: b]. + ^self decimalDigitLength diff --git a/filetree/Neo-JSON-GemStone-Core.package/SmallInteger.extension/instance/printOn.base.length.padded..st b/filetree/Neo-JSON-GemStone-Core.package/SmallInteger.extension/instance/printOn.base.length.padded..st new file mode 100644 index 0000000..cf6b585 --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Core.package/SmallInteger.extension/instance/printOn.base.length.padded..st @@ -0,0 +1,33 @@ +*neo-json-gemstone-core +printOn: stream base: base length: minimumLength padded: padWithZeroes + "Return a String representation of this number in base b with a minimum length and padded by 0 if zeroFlag is set" + + "(String streamContents: [ :s | 10 printOn: s base: 10 length: 4 padded: true] ) >>> '0010'" + "(String streamContents: [ :s | -10 printOn: s base: 10 length: 4 padded: true] ) >>> '-010'" + + | n numberOfDigits totalLength divisor | + self < 0 + ifTrue: [ + n := self negated. + totalLength := 1 ] + ifFalse: [ + n := self. + totalLength := 0 ]. + numberOfDigits := n numberOfDigitsInBase: base. + totalLength := totalLength + numberOfDigits. + padWithZeroes ifFalse: [ + [ totalLength < minimumLength ] whileTrue: [ + stream space. + totalLength := totalLength + 1 ] ]. + n = self ifFalse: [ stream nextPut: $- ]. + padWithZeroes ifTrue: [ + [ totalLength < minimumLength ] whileTrue: [ + stream nextPut: $0. + totalLength := totalLength + 1 ] ]. + divisor := (base raisedToInteger: numberOfDigits - 1). + [ divisor > 0 ] whileTrue: [ + | digit | + digit := n // divisor. + stream nextPut: ('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' at: digit + 1). + n := n - (digit * divisor). + divisor := divisor // base ] \ No newline at end of file diff --git a/filetree/Neo-JSON-GemStone-Core.package/SmallInteger.extension/instance/printOn.base.nDigits..st b/filetree/Neo-JSON-GemStone-Core.package/SmallInteger.extension/instance/printOn.base.nDigits..st new file mode 100644 index 0000000..17b778f --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Core.package/SmallInteger.extension/instance/printOn.base.nDigits..st @@ -0,0 +1,6 @@ +*neo-json-gemstone-core +printOn: aStream base: b nDigits: n + "Append a representation of this number in base b on aStream using nDigits. + self must be positive." + + self printOn: aStream base: b length: n padded: true \ No newline at end of file diff --git a/filetree/Neo-JSON-GemStone-Core.package/SmallInteger.extension/properties.json b/filetree/Neo-JSON-GemStone-Core.package/SmallInteger.extension/properties.json new file mode 100644 index 0000000..d2d9ab4 --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Core.package/SmallInteger.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "SmallInteger" } From 5e1082183e9874b5102c43cd821cac87b03fc686 Mon Sep 17 00:00:00 2001 From: Patrik Date: Fri, 3 Oct 2025 09:12:44 +0000 Subject: [PATCH 80/90] Compensating for different String structure in GemStone In Pharo String is a subclass of Arraycollection, but in GemStone it is CharacterCollection. In case MultiByteString is used we need to have neoJsonOn: for those too. --- .../MultiByteString.extension/instance/neoJsonOn..st | 3 +++ .../MultiByteString.extension/properties.json | 2 ++ 2 files changed, 5 insertions(+) create mode 100644 filetree/Neo-JSON-GemStone-Core.package/MultiByteString.extension/instance/neoJsonOn..st create mode 100644 filetree/Neo-JSON-GemStone-Core.package/MultiByteString.extension/properties.json diff --git a/filetree/Neo-JSON-GemStone-Core.package/MultiByteString.extension/instance/neoJsonOn..st b/filetree/Neo-JSON-GemStone-Core.package/MultiByteString.extension/instance/neoJsonOn..st new file mode 100644 index 0000000..d439874 --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Core.package/MultiByteString.extension/instance/neoJsonOn..st @@ -0,0 +1,3 @@ +*neo-json-gemstone-core +neoJsonOn: neoJSONWriter + neoJSONWriter writeMap: self \ No newline at end of file diff --git a/filetree/Neo-JSON-GemStone-Core.package/MultiByteString.extension/properties.json b/filetree/Neo-JSON-GemStone-Core.package/MultiByteString.extension/properties.json new file mode 100644 index 0000000..274cdff --- /dev/null +++ b/filetree/Neo-JSON-GemStone-Core.package/MultiByteString.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "MultiByteString" } From 5ed17a8e2b5f8166332ef7c0a8bcef03d2f58857 Mon Sep 17 00:00:00 2001 From: Patrik Date: Fri, 3 Oct 2025 10:43:14 +0000 Subject: [PATCH 81/90] It appears that #neoJsonOn: is not sufficient anymore --- .../instance/listOfElementSchema..st | 7 +++++-- .../instance/listOfType.andElementSchema..st | 12 ++++++++---- .../instance/mapWithValueSchema..st | 7 +++++-- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfElementSchema..st b/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfElementSchema..st index af2194f..97c02ab 100644 --- a/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfElementSchema..st +++ b/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfElementSchema..st @@ -8,5 +8,8 @@ listOfElementSchema: elementSchema jsonReader listClass streamContents: [ :stream | jsonReader parseListDo: [ | element | element := jsonReader nextAs: elementSchema. - stream nextPut: element ] ] ] - "we do not set a writer, #neoJsonOn: should be sufficient" + stream nextPut: element ] ] ]. + self writer: [ :jsonWriter :list | + jsonWriter writeListStreamingDo: [ :listWriter | + list do: [ :each | + listWriter writeElement: each as: elementSchema ] ] ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfType.andElementSchema..st b/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfType.andElementSchema..st index 3b2c98e..fa7bcbf 100644 --- a/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfType.andElementSchema..st +++ b/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/listOfType.andElementSchema..st @@ -1,11 +1,15 @@ mapping listOfType: collectionClass andElementSchema: elementSchema - "Set the reader to a block that will create an instance of collectionClass - using #streamContents: while reading a list of elements of type elementSchema" + "Set the reader to a block that will create an instance of collectionClass + using #streamContents: while reading a list of elements of type elementSchema. + Pass down the elementSchema to the elements in the writer." self reader: [ :jsonReader | collectionClass streamContents: [ :stream | jsonReader parseListDo: [ | element | element := jsonReader nextAs: elementSchema. - stream nextPut: element ] ] ] - "we do not set a writer, #neoJsonOn: should be sufficient" + stream nextPut: element ] ] ]. + self writer: [ :jsonWriter :list | + jsonWriter writeListStreamingDo: [ :listWriter | + list do: [ :each | + listWriter writeElement: each as: elementSchema ] ] ] \ No newline at end of file diff --git a/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/mapWithValueSchema..st b/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/mapWithValueSchema..st index 154f4cb..ec3d3c0 100644 --- a/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/mapWithValueSchema..st +++ b/filetree/Neo-JSON-Core.package/NeoJSONCustomMapping.class/instance/mapWithValueSchema..st @@ -9,5 +9,8 @@ mapWithValueSchema: valueSchema jsonReader parseMapKeysDo: [ :key | | value | value := jsonReader nextAs: valueSchema. map at: key put: value ]. - map ] - "we do not set a writer, #neoJsonOn: should be sufficient" + map ]. + self writer: [ :jsonWriter :map | + jsonWriter writeMapStreamingDo: [ :mapWriter | + map keysAndValuesDo: [ :key :value | + mapWriter writeKey: key value: value as: valueSchema ] ] ] \ No newline at end of file From c9450453b9dbf3dd2b9a2a017842b0f44bf59721 Mon Sep 17 00:00:00 2001 From: Patrik Date: Fri, 3 Oct 2025 12:17:42 +0000 Subject: [PATCH 82/90] This tests is here by mistake --- .../instance/testAsciiOnlyStrings.st | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testAsciiOnlyStrings.st diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testAsciiOnlyStrings.st b/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testAsciiOnlyStrings.st deleted file mode 100644 index 58acde8..0000000 --- a/filetree/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testAsciiOnlyStrings.st +++ /dev/null @@ -1,12 +0,0 @@ -testing -testAsciiOnlyStrings - | objects | - objects := {'foo'. - 'Foo BAR'. - ''. - ' \\'''. - 'élève en Français'. - ('Я можу їсти скло, і воно мені не зашкодить.' - decodeFromUTF8). - ('𣎏' decodeFromUTF8)}. - self assert: (self writeReadAsciiOnly: objects) equals: objects From e2fc05c07ab5718ecf3803b1801d8f449484e750 Mon Sep 17 00:00:00 2001 From: Patrik Date: Fri, 3 Oct 2025 12:30:23 +0000 Subject: [PATCH 83/90] Sending correct message --- .../MultiByteString.extension/instance/neoJsonOn..st | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filetree/Neo-JSON-GemStone-Core.package/MultiByteString.extension/instance/neoJsonOn..st b/filetree/Neo-JSON-GemStone-Core.package/MultiByteString.extension/instance/neoJsonOn..st index d439874..7269bb0 100644 --- a/filetree/Neo-JSON-GemStone-Core.package/MultiByteString.extension/instance/neoJsonOn..st +++ b/filetree/Neo-JSON-GemStone-Core.package/MultiByteString.extension/instance/neoJsonOn..st @@ -1,3 +1,3 @@ *neo-json-gemstone-core neoJsonOn: neoJSONWriter - neoJSONWriter writeMap: self \ No newline at end of file + neoJSONWriter writeString: self \ No newline at end of file From 0707bb243c3d9129c815ad468a4ad09b2531743c Mon Sep 17 00:00:00 2001 From: Patrik Date: Fri, 3 Oct 2025 17:11:21 +0200 Subject: [PATCH 84/90] Adding CI stuff --- .github/workflows/CI.yml | 19 ---------------- .github/workflows/build.yml | 27 +++++++++++++++++++++++ .github/workflows/ci.yml | 41 +++++++++++++++++++++++++++++++++++ .smalltalk_gemstone.ston | 4 ++-- .smalltalkci/.unit-tests.ston | 16 ++++++++++++++ 5 files changed, 86 insertions(+), 21 deletions(-) delete mode 100644 .github/workflows/CI.yml create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/ci.yml create mode 100644 .smalltalkci/.unit-tests.ston diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml deleted file mode 100644 index e4c7e57..0000000 --- a/.github/workflows/CI.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: CI - -on: [ push, pull_request, workflow_dispatch ] - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - smalltalk: [ Pharo64-13, Pharo64-12, Pharo64-11, Pharo64-10, Pharo64-9.0, Pharo64-8.0, Pharo64-7.0 ] - name: ${{ matrix.smalltalk }} - steps: - - uses: actions/checkout@v2 - - uses: hpi-swa/setup-smalltalkCI@v1 - with: - smalltalk-version: ${{ matrix.smalltalk }} - - run: smalltalkci -s ${{ matrix.smalltalk }} - shell: bash - timeout-minutes: 1 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..5090fce --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,27 @@ +name: Unit Tests + +on: [ push, pull_request, workflow_dispatch ] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + smalltalk: [ Pharo64-13, Pharo64-12, Pharo64-11, Pharo64-10, Pharo64-9.0, Pharo64-8.0, Pharo64-7.0 ] + name: ${{ matrix.smalltalk }} + steps: + - uses: actions/checkout@v2 + - name: Set up Smalltalk CI + uses: hpi-swa/setup-smalltalkCI@v1 + with: + smalltalk-image: ${{ matrix.smalltalk }} + - name: Load Image and Run Tests + run: smalltalkci -s ${{ matrix.smalltalk }} .smalltalkci/.unit-tests.ston + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + timeout-minutes: 15 + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 + with: + name: ${{matrix.os}}-${{matrix.smalltalk}} + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..44f888f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,41 @@ +name: smalltalkCI + +on: + push: + pull_request: + branches: + gemstone + schedule: + - cron: "15 2 9 * *" #run job on the 9th day of every month on the 15th minute of the 2nd hour + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: [ ubuntu-latest ] + smalltalk: [ GemStone64-3.7.2, GemStone64-3.7.4.3 ] + runs-on: ${{ matrix.os }} + name: ${{ matrix.smalltalk }} + steps: + - uses: actions/checkout@v2 + - uses: hpi-swa/setup-smalltalkCI@v1 + with: + smalltalk-image: ${{ matrix.smalltalk }} + - name: Run tests + run: smalltalkci -s ${{ matrix.smalltalk }} + shell: bash + timeout-minutes: 20 + slack-workflow-status: + if: always() + name: Post Workflow Status To Slack + needs: + - build + runs-on: ubuntu-latest + steps: + - name: Slack Workflow Notification + uses: Gamesight/slack-workflow-status@master + with: + repo_token: ${{secrets.GITHUB_TOKEN}} + slack_webhook_url: ${{secrets.SLACK_DALEHENRICH}} + name: 'action run' diff --git a/.smalltalk_gemstone.ston b/.smalltalk_gemstone.ston index c376a87..790a06b 100644 --- a/.smalltalk_gemstone.ston +++ b/.smalltalk_gemstone.ston @@ -3,8 +3,8 @@ SmalltalkCISpec { SCIMetacelloLoadSpec { #baseline : 'NeoJSON', #directory : 'filetree', - #load : [ 'Tests' ], - #platforms : [ #gemstone] + #load : [ 'Core', 'Tests' ], + #platforms : [ #gemstone ] } ] } diff --git a/.smalltalkci/.unit-tests.ston b/.smalltalkci/.unit-tests.ston new file mode 100644 index 0000000..c5b9853 --- /dev/null +++ b/.smalltalkci/.unit-tests.ston @@ -0,0 +1,16 @@ +SmalltalkCISpec { + #loading : [ + SCIMetacelloLoadSpec { + #baseline : 'NeoJSON', + #directory : '../repository', + #load : [ 'build' ], + #platforms : [ #pharo ] + } + ], + #testing : { + #coverage : { + #packages : [ 'Neo-JSON*' ], + #format: #lcov + } + } +} From 0f88d3494530be81f32e5196b2b42afd41d6b623 Mon Sep 17 00:00:00 2001 From: Patrik Date: Mon, 6 Oct 2025 15:03:30 +0200 Subject: [PATCH 85/90] Eliminating duplicate code --- .../NeoJSONObject.class/class/fromStream..st | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/fromStream..st b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/fromStream..st index 4ed8db4..4a20817 100644 --- a/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/fromStream..st +++ b/filetree/Neo-JSON-Core.package/NeoJSONObject.class/class/fromStream..st @@ -1,17 +1,16 @@ convenience fromStream: readStream "Parse stream as JSON, so that maps become instances of me and lists instances of NeoJSONArray" + | jsonReader | - Smalltalk globals isDictionary + jsonReader := Smalltalk globals isDictionary ifTrue: [ "Pharo" - ^ (NeoJSONReader on: readStream readStream) - mapClass: self; - listClass: NeoJSONArray; - propertyNamesAsSymbols: true; - next ] + NeoJSONReader on: readStream readStream ] ifFalse: [ "GemStone" - ^ (NeoJSONReader on: readStream) - mapClass: self; - listClass: NeoJSONArray; - propertyNamesAsSymbols: true; - next ] \ No newline at end of file + NeoJSONReader on: readStream ]. + + ^ jsonReader + mapClass: self; + listClass: NeoJSONArray; + propertyNamesAsSymbols: true; + next \ No newline at end of file From 113d03451fce66774b4be78e1539366cf929fe63 Mon Sep 17 00:00:00 2001 From: Patrik Date: Mon, 6 Oct 2025 15:08:03 +0200 Subject: [PATCH 86/90] GemStone does not have OrderedDictionary only Dictionary To quote RFC8259, which defines JSON format: An object is an *unordered* collection of zero or more name/value pairs, where a name is a string and a value is a string, number, boolean, null, object, or array. --- .../NeoJSONObjectTests.class/instance/testFindPaths.st | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testFindPaths.st b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testFindPaths.st index 87e317d..423c16c 100644 --- a/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testFindPaths.st +++ b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testFindPaths.st @@ -4,8 +4,11 @@ testFindPaths json := self class exampleJSONSchema. paths := json findPaths: [ :object | object isDictionary and: [ object includesKey: #'$anchor' ] ]. + "GemStone reverse order due to it having Dictionary only" + Smalltalk globals isDictionary ifFalse: [ paths := paths copy reverse ]. self deny: paths isEmpty. - self assert: paths asArray equals: #((properties street_address) (#'$defs' #'country')). + "Testing order - NeoJSONObject was OrderedDictionary originally in Pharo, but in GemStone we have only Dictionary" + self assert: paths asArray equals: #((#'properties' #'street_address') (#'$defs' #'country')). self assert: ((json atPath: paths first) at: #'$anchor') equals: 'street_address'. self assert: ((json atPath: paths second) at: #'$anchor') equals: 'country'. @@ -20,3 +23,4 @@ testFindPaths paths := json findPaths: [ :_ | true ]. paths do: [ :each | self assert: (json atPath: each) notNil ] + From 02f0ca2f60c7eb9540158f664d081ba31ed30afa Mon Sep 17 00:00:00 2001 From: Patrik Date: Mon, 6 Oct 2025 15:23:33 +0200 Subject: [PATCH 87/90] Refactoring CI stuff --- .filetree | 2 -- .gitattributes | 3 +++ .github/workflows/build.yml | 2 +- .smalltalk.ston | 15 ++++++++------- .smalltalk_pharo.ston | 9 +++++++++ 5 files changed, 21 insertions(+), 10 deletions(-) delete mode 100644 .filetree create mode 100644 .gitattributes create mode 100644 .smalltalk_pharo.ston diff --git a/.filetree b/.filetree deleted file mode 100644 index c6704e5..0000000 --- a/.filetree +++ /dev/null @@ -1,2 +0,0 @@ -{"packageExtension" : ".package", -"propertyFileExtension" : ".json" } \ No newline at end of file diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..7868e80 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +# inform linguist that files with these extensions are indeed smalltalk files +*.st linguist-language=Smalltalk +*.gs linguist-language=Smalltalk diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5090fce..774b17d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Unit Tests +name: Build on: [ push, pull_request, workflow_dispatch ] diff --git a/.smalltalk.ston b/.smalltalk.ston index 65d9618..790a06b 100644 --- a/.smalltalk.ston +++ b/.smalltalk.ston @@ -1,9 +1,10 @@ SmalltalkCISpec { - #loading : [ - SCIMetacelloLoadSpec { - #baseline : 'NeoJSON', - #directory : 'repository', - #platforms : [ #pharo ] - } - ] + #loading : [ + SCIMetacelloLoadSpec { + #baseline : 'NeoJSON', + #directory : 'filetree', + #load : [ 'Core', 'Tests' ], + #platforms : [ #gemstone ] + } + ] } diff --git a/.smalltalk_pharo.ston b/.smalltalk_pharo.ston new file mode 100644 index 0000000..65d9618 --- /dev/null +++ b/.smalltalk_pharo.ston @@ -0,0 +1,9 @@ +SmalltalkCISpec { + #loading : [ + SCIMetacelloLoadSpec { + #baseline : 'NeoJSON', + #directory : 'repository', + #platforms : [ #pharo ] + } + ] +} From a09349d373d4ba6cfdde561c4e2fbad1f2284921 Mon Sep 17 00:00:00 2001 From: Patrik Date: Mon, 6 Oct 2025 17:20:47 +0200 Subject: [PATCH 88/90] Testing JSON without relying on order of objects --- .../instance/testFindPaths.st | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testFindPaths.st b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testFindPaths.st index 423c16c..c25e3e9 100644 --- a/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testFindPaths.st +++ b/filetree/Neo-JSON-Tests.package/NeoJSONObjectTests.class/instance/testFindPaths.st @@ -1,17 +1,18 @@ testing testFindPaths - | json paths | + | json paths testingArray | json := self class exampleJSONSchema. + testingArray := #((#'properties' #'street_address') (#'$defs' #'country')). paths := json findPaths: [ :object | object isDictionary and: [ object includesKey: #'$anchor' ] ]. - "GemStone reverse order due to it having Dictionary only" - Smalltalk globals isDictionary ifFalse: [ paths := paths copy reverse ]. self deny: paths isEmpty. - "Testing order - NeoJSONObject was OrderedDictionary originally in Pharo, but in GemStone we have only Dictionary" - self assert: paths asArray equals: #((#'properties' #'street_address') (#'$defs' #'country')). - self assert: ((json atPath: paths first) at: #'$anchor') equals: 'street_address'. - self assert: ((json atPath: paths second) at: #'$anchor') equals: 'country'. - + (paths asArray) do: [ :eachArray | + self assert: (testingArray includes: eachArray) ]. + paths := json findPaths: [ :object | object isDictionary and: [ (object at: #'$anchor') = 'street_address' ] ]. + self assert: (testingArray includes: paths flattened). + paths := json findPaths: [ :object | object isDictionary and: [ (object at: #'$anchor') = 'country' ] ]. + self assert: (testingArray includes: paths flattened). + paths := json findPaths: [ :object | object isDictionary and: [ (object at: #'foo') = 'bar' ] ]. self assert: paths isEmpty. @@ -23,4 +24,3 @@ testFindPaths paths := json findPaths: [ :_ | true ]. paths do: [ :each | self assert: (json atPath: each) notNil ] - From 4e835753a874c1b68064d9ddbf0e67379aa0472c Mon Sep 17 00:00:00 2001 From: Patrik Date: Tue, 7 Oct 2025 11:13:44 +0200 Subject: [PATCH 89/90] File cleanup --- .../methodProperties.json | 29 ------------------- .../methodProperties.json | 17 ----------- .../methodProperties.json | 9 ------ .../instance/testStrings.st | 12 -------- .../methodProperties.json | 17 ----------- .../methodProperties.json | 24 --------------- .../monticello.meta/version | 1 - 7 files changed, 109 deletions(-) delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/methodProperties.json delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/methodProperties.json delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/methodProperties.json delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testStrings.st delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/methodProperties.json delete mode 100644 repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/methodProperties.json delete mode 100644 repository/Neo-JSON-Tests.package/monticello.meta/version diff --git a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/methodProperties.json b/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/methodProperties.json deleted file mode 100644 index 19f6020..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONReaderTests.class/methodProperties.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "testArrayOfPoints" : "SvenVanCaekenberghe 6/12/2012 12:32", - "testAssociation" : "SvenVanCaekenberghe 6/12/2012 13:18", - "testBooleans" : "SvenVanCaekenberghe 6/13/2012 14:44", - "testByteArray" : "dkh 11/17/2014 17:54", - "testDate" : "PaulDeBruicker 11/02/2014 19:47", - "testDateAndTime" : "SvenVanCaekenberghe 6/12/2012 12:02", - "testFloats" : "SvenVanCaekenberghe 6/2/2012 21:49", - "testIntegers" : "SvenVanCaekenberghe 6/12/2012 16:08", - "testLists" : "SvenVanCaekenberghe 6/12/2012 16:16", - "testMaps" : "SvenVanCaekenberghe 6/12/2012 16:16", - "testNextStringAsHex" : "SvenVanCaekenberghe 3/24/2014 11:58", - "testNull" : "SvenVanCaekenberghe 6/13/2012 14:29", - "testOrderedCollection" : "SvenVanCaekenberghe 6/13/2012 10:18", - "testOrderedCollectionOfPoints" : "SvenVanCaekenberghe 6/12/2012 12:33", - "testParseErrors" : "SvenVanCaekenberghe 6/12/2012 16:01", - "testPoint" : "SvenVanCaekenberghe 6/12/2012 15:58", - "testPoint1" : "SvenVanCaekenberghe 6/8/2012 14:04", - "testPoint2" : "SebastianHeidbrink 08/05/2013 09:01", - "testPoint3" : "SvenVanCaekenberghe 6/8/2012 14:04", - "testPointUsingAsString" : "SvenVanCaekenberghe 3/24/2014 10:43", - "testPropertyNamesAsSymbols" : "SvenVanCaekenberghe 6/13/2012 10:00", - "testSmallDictionary" : "PaulDeBruicker 11/02/2014 19:25", - "testStrings" : "dkh 11/25/2014 18:44", - "testSymbol" : "SvenVanCaekenberghe 6/12/2012 12:02", - "testTime" : "SvenVanCaekenberghe 6/12/2012 12:02" } } diff --git a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/methodProperties.json b/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/methodProperties.json deleted file mode 100644 index 006cb6f..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONTestObject1.class/methodProperties.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "class" : { - "example1" : "dkh 11/17/2014 17:08", - "neoJsonMapping:" : "SvenVanCaekenberghe 6/12/2012 12:34" }, - "instance" : { - "=" : "SvenVanCaekenberghe 6/9/2012 18:45", - "bytes" : "SvenVanCaekenberghe 6/9/2012 18:03", - "bytes:" : "SvenVanCaekenberghe 6/9/2012 18:04", - "hash" : "SvenVanCaekenberghe 6/9/2012 18:46", - "id" : "SvenVanCaekenberghe 6/9/2012 18:02", - "id:" : "SvenVanCaekenberghe 6/9/2012 18:03", - "name" : "SvenVanCaekenberghe 6/9/2012 18:02", - "name:" : "SvenVanCaekenberghe 6/9/2012 18:03", - "points" : "SvenVanCaekenberghe 6/9/2012 18:03", - "points:" : "SvenVanCaekenberghe 6/9/2012 18:04", - "timestamp" : "SvenVanCaekenberghe 6/9/2012 18:03", - "timestamp:" : "SvenVanCaekenberghe 6/9/2012 18:03" } } diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/methodProperties.json b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/methodProperties.json deleted file mode 100644 index a578cda..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadPrettyPrintedTests.class/methodProperties.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "testDictionaryOfObject2" : "PaulDeBruicker 11/02/2014 19:16", - "testObject1" : "SvenVanCaekenberghe 6/9/2012 18:49", - "testObject2" : "SvenVanCaekenberghe 8/30/2013 11:05", - "testObject3" : "SvenVanCaekenberghe 3/22/2014 10:59", - "writeRead:" : "SvenVanCaekenberghe 6/4/2012 15:45" } } diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testStrings.st b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testStrings.st deleted file mode 100644 index d676fdd..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/instance/testStrings.st +++ /dev/null @@ -1,12 +0,0 @@ -testing -testStrings - | objects | - objects := {'foo'. - 'Foo BAR'. - ''. - ' \\'''. - 'élève en Français'. - ('Я можу їсти скло, і воно мені не зашкодить.' - decodeFromUTF8). - ('𣎏' decodeFromUTF8)}. - self assert: (self writeRead: objects) equals: objects \ No newline at end of file diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/methodProperties.json b/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/methodProperties.json deleted file mode 100644 index 98004ea..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriteReadTests.class/methodProperties.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "testAsciiOnlyStrings" : "dkh 11/25/2014 18:45", - "testDictionaryOfObject2" : "PaulDeBruicker 11/02/2014 19:16", - "testFloats" : "SvenVanCaekenberghe 6/4/2012 15:51", - "testIntegers" : "SvenVanCaekenberghe 6/4/2012 15:46", - "testLists" : "SvenVanCaekenberghe 6/4/2012 15:51", - "testMaps" : "SvenVanCaekenberghe 6/4/2012 15:53", - "testObject1" : "SvenVanCaekenberghe 6/9/2012 18:48", - "testObject2" : "SvenVanCaekenberghe 8/30/2013 10:12", - "testObject3" : "SvenVanCaekenberghe 3/22/2014 10:14", - "testSpecials" : "SvenVanCaekenberghe 6/4/2012 15:46", - "testStrings" : "dkh 11/25/2014 18:44", - "writeRead:" : "dkh 11/25/2014 15:40", - "writeReadAsciiOnly:" : "dkh 11/25/2014 15:40" } } diff --git a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/methodProperties.json b/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/methodProperties.json deleted file mode 100644 index 153b668..0000000 --- a/repository/Neo-JSON-Tests.package/NeoJSONWriterTests.class/methodProperties.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "testAsciiOnlyStrings" : "dkh 11/25/2014 18:46", - "testAssociation" : "PaulDeBruicker 11/02/2014 19:26", - "testBooleans" : "SvenVanCaekenberghe 6/3/2012 19:56", - "testByteArray" : "dkh 11/17/2014 18:04", - "testDate" : "PaulDeBruicker 11/02/2014 19:47", - "testDateAndTime" : "SvenVanCaekenberghe 6/12/2012 12:02", - "testFloats" : "PaulDeBruicker 11/02/2014 19:48", - "testIntegers" : "SvenVanCaekenberghe 6/2/2012 22:24", - "testLists" : "SvenVanCaekenberghe 6/3/2012 19:39", - "testMaps" : "SvenVanCaekenberghe 6/3/2012 19:40", - "testNextPutStringAsHex" : "SvenVanCaekenberghe 3/24/2014 11:57", - "testNull" : "SvenVanCaekenberghe 6/2/2012 22:23", - "testPoint" : "SvenVanCaekenberghe 6/12/2012 15:58", - "testPoint1" : "SvenVanCaekenberghe 6/8/2012 14:04", - "testPoint2" : "SvenVanCaekenberghe 6/6/2012 17:29", - "testPoint3" : "SvenVanCaekenberghe 6/8/2012 14:04", - "testPointUsingAsString" : "dkh 11/22/2014 09:28", - "testStrings" : "dkh 11/25/2014 18:44", - "testSymbol" : "SvenVanCaekenberghe 6/8/2012 21:56", - "testTime" : "SvenVanCaekenberghe 6/12/2012 12:02" } } diff --git a/repository/Neo-JSON-Tests.package/monticello.meta/version b/repository/Neo-JSON-Tests.package/monticello.meta/version deleted file mode 100644 index fc8044f..0000000 --- a/repository/Neo-JSON-Tests.package/monticello.meta/version +++ /dev/null @@ -1 +0,0 @@ -(name 'Neo-JSON-Tests-dkh.35' message 'Issue #5: have to use UTF8 encoded Strings in method source instead of Unicode strings, because GemStone 2.x does not compile methods with some flavors of MultiByte strings ...' id 'c3f1b9f1-7c61-4217-8a8a-5ac43231db7e' date '11/25/2014' time '18:47:48' author 'dkh' ancestors ((name 'Neo-JSON-Tests-dkh.34' message 'Issue #5: restore a test case' id '3ad4c7ed-9113-456e-8e54-2805cf3f166e' date '11/25/2014' time '16:53:38' author 'dkh' ancestors ((name 'Neo-JSON-Tests-dkh.33' message 'Issue #5: turns out that what was missing from the NeoJSON implementation was the handling of code points greater than 0xFFFF (as noted in my original comment) ... I had misinterpretted the solution to be to use UTF8 encoding ... the proper answer was to use UTF-16 surrogate pairs for code points > 16rFFFF... which I''ve done ' id 'a4c5f489-04e5-4117-981a-27aaadb0c40e' date '11/25/2014' time '16:50:15' author 'dkh' ancestors ((name 'Neo-JSON-Tests-dkh.32' message 'Issue #5: expand test suite to cover Unicode16 and Unicode32 strings. Move String>>neoJsonOn: to CharacterCollection>>neoJsonOn: so that multi-byte strings are covered. Unicode32 string test cases are failing: 74 run, 71 passes, 0 expected defects, 3 failures, 0 errors, 0 unexpected passes 75 tests 74 run [''done''] 71 passes 0 expected defects 3 failures 0 errors 0 unexpected passes ' id '6e050037-a240-4c81-8c3f-c7ff2da8a0f2' date '11/24/2014' time '22:46:28' author 'dkh' ancestors ((name 'Neo-JSON-Tests-dkh.31' message 'tests should be green now ...' id '864dad8d-d957-4166-8a00-13332418f259' date '11/22/2014' time '09:52:42' author 'dkh' ancestors ((name 'Neo-JSON-Tests-dkh.30' message 'Issue #2: and more 2.x portability' id '6ba38801-d919-4243-a27c-c97cdd76a6d8' date '11/17/2014' time '18:04:58' author 'dkh' ancestors ((name 'Neo-JSON-Tests-dkh.29' message 'Issue #2: more 2.x portability' id '609ae8ec-5e5d-4ab0-9025-ef49e5c838c8' date '11/17/2014' time '17:54:53' author 'dkh' ancestors ((name 'Neo-JSON-Tests-dkh.28' message 'Issue #2: getting tests to load in GemStone 2.x' id 'cfae8ad5-56a4-4ac7-8fa0-98f4f676b6ce' date '11/17/2014' time '17:48:36' author 'dkh' ancestors ((name 'Neo-JSON-Tests-PaulDeBruicker.27' message 'One test has an error, all others pass.' id '0cdeaeeb-a2ce-4c3c-9651-4b5338dc3aa3' date '11/02/2014' time '19:54:25' author 'PaulDeBruicker' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.24' message 'Added new feature NeoJSONWriter>>#nextPutAs: symmetrical to NeoJSONReader>>#next:as: Added 4 unit test to exercise the new options' id '4c7461c1-82ea-4126-8b5c-ef307168120a' date '03/24/2014' time '12:19:53' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.23' message 'Added basic support for mapping using inheritance when using #neoJonMapping : (see #testObject3) Renamed #new[Custom|Object]MappingFor: to [custom|object]MappingFor: to better reflect the new behavior Thanks Philippe Back for making these suggestions!' id '27fad240-c6b9-4d00-a4e6-6e49fd612dfb' date '03/22/2014' time '11:04:11' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.22' message 'remove timing assertions from NeoJSONBenchmarkTests sinc they occasionally fail on the CI servers' id '3a07a705-816f-4981-9269-8d20620a00e2' date '01/15/2014' time '07:31:53' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.21' message 'Increase the NeoJSONBenchmarkTests>>#testPrettyPrinter timeout even more' id '90807026-211d-4644-b211-1ea5bfd92bd6' date '12/27/2013' time '09:44:01' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.20' message 'Give NeoJSONBenchmarksTests some more time to finish (on slow CI build slaves)' id 'f5f8f820-40d4-44ea-b5b6-8634e4cb7c5e' date '12/27/2013' time '07:01:23' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.19' message 'New feature: NeoJSONWriter>>#asciiOnly: to escape all non ASCII characters in strings' id 'e1a69fdb-7e41-46f7-9f52-312eae3fab61' date '09/03/2013' time '12:21:56' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.18' message 'Added tests for NeoJSONCustomMapping>>#mapWithValueSchema:' id '3f001444-6572-47d5-b656-96363c695522' date '08/30/2013' time '11:09:49' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.17' message 'Make SmallDictionary optional in NeoJSONReaderTests>>#testSmallDictionary' id '5fa85190-9a4c-4b91-9747-f5e6a547e5ad' date '07/04/2013' time '06:43:12' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.16' message 'add NeoJSONMockStream>>#peekFor:' id 'baadfdb3-b8b4-4ce5-b072-0ebf67edd45f' date '12/03/2012' time '11:14:13' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.15' message 'added code to test the character stream API being used' id '696b4956-43ef-4fb8-a295-aa0bcc16685c' date '06/13/2012' time '04:29:41' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.14' message 'bugfix in NeoJSONReader>>#match:do: ' id '7e664c0d-c5c3-4e64-a784-c274a85a8230' date '06/13/2012' time '02:58:28' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.13' message 'extended NeoJSONReader with settable listClass and mapClass as well as a propertyNamesAsSymbols option extended class and method comments' id '4c90aab7-73c6-47fe-b52f-46954c06bf19' date '06/13/2012' time '11:57:09' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.12' message 'added tests for bogus input' id '50e7e260-7299-4ff8-880b-cbfd7bc8b30a' date '06/12/2012' time '04:20:02' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.11' message 'major simplification: removed NeoJSON[Composite|List|Map]Mapping, all to be handled by blocks in NeoJSONCustomMapping renamed forCustom:do: to for:customDo: accessor based mapping to NeoJSONObjectMapping ' id 'fcdc4252-6e15-4832-984f-84fbe1486163' date '06/12/2012' time '01:36:40' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.10' message 'added another benchmark' id '0f01e8f8-a367-4cb9-b730-1d8c0b411743' date '06/10/2012' time '09:28:30' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.9' message 'added NeoJSONTestObject1 with class side #neoJsonMapping: method' id 'ac3db680-73e6-4358-882c-e237697a7db4' date '06/09/2012' time '06:56:55' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.8' message 'added custom mapping tests' id '015e7c92-0411-4c7f-80b3-2d18a445250e' date '06/08/2012' time '10:10:24' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.7' message 'adding valueSchema to propertyMapping' id '9723e179-f1b9-4641-85ea-45ba89487b07' date '06/08/2012' time '20:36:25' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.6' message '1st version where list mapping works on some simple examples' id '6dbd0ade-2632-42a1-bd3c-45ef3fc0b596' date '06/08/2012' time '16:41:04' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.5' message '1st version with working object mapping for writer' id '59e0739f-bd31-4057-a366-2b5d27cf304c' date '06/06/2012' time '20:47:29' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.4' message 'added NeoJSONBenchmarkTests' id 'f36901e7-bb6d-4d6c-b4e8-5e70db8cce97' date '06/05/2012' time '17:30:17' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.3' message 'added more tests and a simple benchmark' id '5396d3f6-f1f0-46bc-961a-72a5919a9b79' date '06/04/2012' time '18:53:25' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.2' message 'first simple version of NeoJSONWriter' id '4b84c7e9-74d5-4b8b-bf9e-4be5fda1eb10' date '06/03/2012' time '19:58:06' author 'SvenVanCaekenberghe' ancestors ((name 'Neo-JSON-Tests-SvenVanCaekenberghe.1' message 'first simple version of NeoJSONReader' id '6927fec5-5a02-4ad2-8d4a-7be492da47da' date '06/02/2012' time '22:00:14' author 'SvenVanCaekenberghe' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ()) \ No newline at end of file From 1dd27806a4eae6e38dcf1335f232a3cd25d05430 Mon Sep 17 00:00:00 2001 From: Patrik Date: Mon, 13 Oct 2025 15:47:08 +0200 Subject: [PATCH 90/90] Bug prevents a defalt group load --- .../BaselineOfNeoJSON.class/instance/baseline..st | 2 +- repository/BaselineOfNeoJSON/BaselineOfNeoJSON.class.st | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/filetree/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/instance/baseline..st b/filetree/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/instance/baseline..st index 4581d65..82257eb 100644 --- a/filetree/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/instance/baseline..st +++ b/filetree/BaselineOfNeoJSON.package/BaselineOfNeoJSON.class/instance/baseline..st @@ -6,7 +6,7 @@ baseline: spec do: [ spec package: 'Neo-JSON-Core'; package: 'Neo-JSON-Tests' with: [ spec requires: #('Neo-JSON-Core') ]; - group: 'default' with: #('core' 'tests'); + group: 'default' with: #('Core' 'Tests'); group: 'Core' with: #('Neo-JSON-Core'); group: 'Tests' with: #('Neo-JSON-Tests') ]. spec diff --git a/repository/BaselineOfNeoJSON/BaselineOfNeoJSON.class.st b/repository/BaselineOfNeoJSON/BaselineOfNeoJSON.class.st index e82dff6..eef15a6 100644 --- a/repository/BaselineOfNeoJSON/BaselineOfNeoJSON.class.st +++ b/repository/BaselineOfNeoJSON/BaselineOfNeoJSON.class.st @@ -16,7 +16,7 @@ BaselineOfNeoJSON >> baseline: spec [ do: [ spec package: 'Neo-JSON-Core'; package: 'Neo-JSON-Tests' with: [ spec requires: #('Neo-JSON-Core') ]; - group: 'default' with: #('core' 'tests'); + group: 'default' with: #('Core' 'Tests'); group: 'Core' with: #('Neo-JSON-Core'); group: 'Tests' with: #('Neo-JSON-Tests') ]. spec