I can parse the file data you provided:

STON fromString: 
'{#entryName:''Housekeeping'',#entryDate:Date[''2021-02-25Z''],#transactionID:''2021022501'',#entryAmount:-400/1s8,#entryCategory:''Housekeeping'',#entryDescription:''Housekeeping'',#match:nil}ousekeeping'',#match:nil}'
 

"a Dictionary(#entryAmount->-400.00000000s8 #entryCategory->'Housekeeping' 
#entryDate->25 February 2021 #entryDescription->'Housekeeping' 
#entryName->'Housekeeping' #match->nil #transactionID->'2021022501' )"

(BTW, this is STON not JSON).

What I do see in the input is junk after the last }

That can happen when you overwrite an existing file with shorter content. You 
should truncate such a file.

From your screenshot I can see nothing wrong, #entryAmount seems an existing 
key in aDict, that should just work.

> On 11 Feb 2021, at 16:33, David Pennington <da...@totallyobjects.com> wrote:
> 
> I attach a couple of screen shots and a file containing the item that I am 
> trying to open. What else can I supply? This has been working for a couple of 
> weeks and suddenly doesn’t work. I save the JSON and then load it back again. 
> I enclose a file with the JSON as contents. As you can see from the 
> screenshot, the debugger shows it as a dictionary but the execution path 
> takes it to an Association which is what I don’t understand.
> 
> <stack.rtf><20210225 01><screenshot.png>
> 
>> On 10 Feb 2021, at 19:17, Sven Van Caekenberghe <s...@stfx.eu> wrote:
>> 
>> Hi David,
>> 
>>> On 10 Feb 2021, at 19:18, da...@totallyobjects.com wrote:
>>> 
>>> I am using STON to objects out to disk. Up to two days ago, I was reading 
>>> them in as Dictionaries and converting to objects from there. All of a 
>>> sudden yesterday morning, I got an error saying that the association is 
>>> only indexable with integers. Even so, I don't seem to be able to access 
>>> the contents. 
>>> 
>>> Fistly, any ideas why this has changed and secondly, any ideas how to fix 
>>> it? 
>>> 
>>> David
>>> Totally Objects
>>> 
>>> Sent from my Huawei tablet
>> 
>> I am afraid I need more information.
>> 
>> Could you create a reproducible case ?
>> Do you have a stack trace ?
>> 
>> In any case, STON is a text format, that can be edited (in most cases, 
>> shared or circular references being hard to edit by hand).
>> 
>> Sven
> 

Reply via email to