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,9 +18,14 @@ Class {
|
|||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
TiddlyWiki class >> fromJSONUrl: anUrlString [
|
TiddlyWiki class >> fromJSONUrl: anUrlString [
|
||||||
|
| rawContents contentsString |
|
||||||
|
rawContents := anUrlString asUrl retrieveContents.
|
||||||
|
rawContents class = ByteArray
|
||||||
|
ifTrue: [ contentsString := rawContents utf8Decoded ]
|
||||||
|
ifFalse: [ contentsString := rawContents ].
|
||||||
^ self new
|
^ self new
|
||||||
fromDictionary: (STONJSON fromString: anUrlString asUrl retrieveContents utf8Decoded);
|
fromDictionary: (STONJSON fromString: contentsString);
|
||||||
|
remote: anUrlString;
|
||||||
name: anUrlString
|
name: anUrlString
|
||||||
]
|
]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user