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
1 changed files with 8 additions and 3 deletions

View File

@ -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 }