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:
Offray Vladimir Luna Cárdenas 2021-11-05 17:19:09 -05:00
parent 941d042570
commit 745a7e028e

View File

@ -18,9 +18,14 @@ 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);
fromDictionary: (STONJSON fromString: contentsString);
remote: anUrlString;
name: anUrlString
]