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.