Christoph Thiede uploaded a new version of JSON to project The Trunk: http://source.squeak.org/trunk/JSON-ct.58.mcz
==================== Summary ====================
Name: JSON-ct.58 Author: ct Time: 10 November 2023, 9:25:24.28745 pm UUID: 204b1ced-8cc9-5b4e-9d05-7fcfbd52bb8f Ancestors: JSON-ul.57
Minor refactoring: Extracts #readFromString: from String>>#parseAsJsonWithDictionaryClass:.
=============== Diff against JSON-ul.57 ===============
Item was added: + ----- Method: Json class>>readFromString: (in category 'instance creation') ----- + readFromString: aStream + ^ self new readFromString: aStream!
Item was added: + ----- Method: Json>>readFromString: (in category 'parsing') ----- + readFromString: aString + + | result | + result := self readFrom: aString readStream. + stream atEnd ifFalse: [self invalid: 'Unexpected data at end of input']. + ^ result!
Item was changed: ----- Method: String>>parseAsJsonWithDictionaryClass: (in category '*JSON') ----- parseAsJsonWithDictionaryClass: aClassOrNil "Convenience"
+ | parser | - | input parser result | parser := Json new. aClassOrNil ifNotNil: [ parser dictionaryClass: aClassOrNil ]. + ^ parser readFromString: self! - input := self readStream. - result := parser readFrom: input. - input atEnd ifFalse: [ parser invalid: 'Unexpected data at end of input' ]. - ^result!
packages@lists.squeakfoundation.org