Yes, I think you will need to know the schema of the JSON files to be able 
to import them in a useful way..  For example, Jupyter notebooks are JSON 
files, but your files are probably very different.  Leo can import XML 
files, but they are imported into a single Leo node.

On Tuesday, January 11, 2022 at 10:26:06 AM UTC-5 Josef wrote:

> I'll have a look. All I wanted to do for now is edit some already existing 
> JSON files.
>
> I think all the @auto should always behave essentially the same way,
> and that means for me that I can use it to read in any arbitrary file,
> not just one that was created by Leo.
>
> I was using @clean already, but was hoping the @auto would be able to 
> represent the JSON structure in the outline somehow. 
> I realize this is hardly possible, because Leo can't know what to write 
> into the headlines, or even to which level of nodes to go.
>
> I guess I will need write a custom importer for this, since I need to edit 
> (some large) JSON files quite often.
>
> On Monday, January 10, 2022 at 11:05:36 PM UTC+1 Edward K. Ream wrote:
>
>> On Tue, Jan 4, 2022 at 5:40 AM Josef <joe...@gmx.net> wrote:
>>
>>> import with at_auto afile.json fails: the body remains empty, at least 
>>> when the top level entity is an object (e.g. a pair of curly braces). For 
>>> example this fails:
>>
>>
>> The problem you are having could be called a confusing result of 
>> featuritis. If all you want to do is represent json in an outline, you can 
>> just use @clean x.json.
>>
>> @auto x.json or (alternatively) @auto-json x.txt creates a json 
>> representation of the outline, complete with a representation of gnx's, 
>> uA's, etc. To see this in action, create the original file with @auto 
>> x.json, write the external file, and take a look at the result.
>>
>> HTH. Please feel free to ask more questions.
>>
>> Edward
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/99c82dc5-4753-4ef1-85b9-e9ce4dae4e79n%40googlegroups.com.

Reply via email to