On Monday, February 4, 2019 at 7:03:01 PM UTC-8, Suzanne McHale wrote:
>
> Tried to import this into a fresh empty tiddler (most recent version), but 
> nothing shows up after the import button is clicked. Is the file of the 
> correct type?
>

TiddlyWiki *can* import JSON files, but only if the 'records' in the file 
contain certain field names.  Most important, each JSON record must have a 
uniquely-valued "title" field.  This is used to create the corresponding 
tiddler.  The remaining field names in the JSON record can be anything you 
like.  However, keep in mind that certain field names have special meanings 
in the TWCore system.  Specifically, "title", "text", "tags", "created", 
"creator", "modified" and "modifier" should be considered not be used as 
general-purpose field names.

Also note that the TWCore's JSON processing does *not* handle complex 
nested JSON structures... just plain name/value pairs within a simple list 
of top level objects.

Here's an example of a simple JSON file that can be imported to create 
tiddlers:

[
    {
        "title": "TiddlerTitleGoesHere",
        "text": "Tiddler content here",
        "tags": "Tiddler tags here",
        "foo": "This is a field named foo",
        "bar": "This is a field named bar"
    },
    {
        "title": "AnotherTitle",
        "text": "Tiddler content here",
        "tags": "Tiddler tags here",
        "foo": "This is a field named foo",
        "bar": "This is a field named bar"
    }
]


enjoy,
-e
Eric Shulman
TiddlyTools.com: "Small Tools for Big Ideas!" (tm)
InsideTiddlyWiki: The Missing Manuals

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/19a6196c-467f-4012-b3d1-6968ac75c3d6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to