On 17 Oct 2016, at 21:14, Sean P. DeNigris <sean@clipperadams.com> wrote:
Sean P. DeNigris wrote
I copy pasted them from the latest STON package. Thanks.
Ugh.
FileLocator home / 'Downloads' / 'myfile.ston' writeStreamDo: [ :s | STON put: myDB onStream: s].
and then
FileLocator home / 'Downloads' / 'myfile.ston' readStreamDo: [ :s | STON fromStream: s ]
resulted in: "STONReaderError: At character 978274: unexpected property name type"
Any thoughts on how to debug?
That obviously depends on what 'myDB' contains, the basic call is OK though: FileLocator home / 'Downloads' / 'myfile.ston' writeStreamDo: [ :s | STON put: STONTestUser dummy onStream: s ]. FileLocator home / 'Downloads' / 'myfile.ston' readStreamDo: [ :s | STON fromStream: s ]. The error you get basically means that something non-simple was used as property name. You could try doing: FileLocator home / 'Downloads' / 'myfile.ston' readStreamDo: [ :s | (STON reader on: s) allowComplexMapKeys: true; next ].
From the class comment of STONReader
- allowComplexMapKeys <Boolean> default is false if true, any object is allowed as map key if false, only strings, symbols and numbers are allowed as map keys
----- Cheers, Sean -- View this message in context: http://forum.world.st/Spur-VM-Bug-for-Chinese-Characters-tp4918883p4919109.h... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.