diff --git a/repository/TiddlyWiki/TiddlyWiki.class.st b/repository/TiddlyWiki/TiddlyWiki.class.st index 56a2568..6ed8b19 100644 --- a/repository/TiddlyWiki/TiddlyWiki.class.st +++ b/repository/TiddlyWiki/TiddlyWiki.class.st @@ -18,10 +18,15 @@ Class { { #category : #accessing } TiddlyWiki class >> fromJSONUrl: anUrlString [ - + | rawContents contentsString | + rawContents := anUrlString asUrl retrieveContents. + rawContents class = ByteArray + ifTrue: [ contentsString := rawContents utf8Decoded ] + ifFalse: [ contentsString := rawContents ]. ^ self new - fromDictionary: (STONJSON fromString: anUrlString asUrl retrieveContents utf8Decoded); - name: anUrlString + fromDictionary: (STONJSON fromString: contentsString); + remote: anUrlString; + name: anUrlString ] { #category : #accessing }