On Wed, May 4, 2016 at 11:43 AM, Edward K. Ream <
edre...@gmail.com> wrote:
>
>
> On Wed, May 4, 2016 at 10:49 AM, Kent Tenney <
kte...@gmail.com> wrote:
>>
>> Leo Log Window
>> Leo 5.4-devel, build 20160412153848, Tue Apr 12 15:38:48 CDT 2016
>> Git repo info: branch = master, commit = 2e8d9df4bb39
>> Python 3.5.1, PyQt version 5.5.1
>> linux
>>
>> Tried loading a large json file:
>> @auto data/lappy.lshw.json
>
>
> ...
>
>>
>> NameError: name 'root' is not defined
>
>
> Should be fixed at 0b0369d7e, but this probably won't help you.
>
> At present, @auto x.json will only restore properly when the @auto tree was
> first written with Leo. So it's one-way initially: from Leo to .json.
Ah, didn't know that. I value Leo so much as a tool to aid in making
sense of complexity via it's capability to parse on import, I was
hoping the same would be available here.
>
> After that, @auto will work.
>
> I see no way to fix this: json is not an outline format. How is Leo
> supposed to know where to break things, or for that matter, what things
> mean? Where is the AI to come from?
Naively:
As I understand json's relationship to Python:
json.loads(file.read()) returns a dict consisting of dicts, lists,
strings, bools
I thought maybe these could be translated to nodes and children somehow,
@key as organizer nodes, lists as child nodes representing @string,
@bool and @key
As I said, *naive* :-]
I do have interest in json, and have made use of the kind of logic
discussed here
http://stackoverflow.com/questions/12507206/python-recommended-way-to-walk-complex-dictionary-structures-imported-from-json
I'm using it to help extract interesting components from the json
files I'm dealing with,
interesting if not relevant.
Thanks,
Kent