Improving JSON importing and config file storage. What should we do when wikis have repeated names to store them on the config file?
This commit is contained in:
parent
941d042570
commit
745a7e028e
@ -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 }
|
||||
|
Loading…
Reference in New Issue
Block a user