Each tiddler needs a unique title attribute.
--
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 tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/18c7a284-5ab2-442c-a48e-f46fea2b2112o%40googlegroups.com.
I am a newbie to TW5 and JSON so please can you explain how I achieve that. The JSON file was an export from a database app.
[
{
"created":"20200621234617853",
"text":"",
"tags":"",
"title":"TiddlerOne",
"modified":"20200621234625900"
},
{
"created":"20200621234629958",
"text":"",
"tags":"",
"title":"TiddlerTwo",
"modified":"20200621234637103"
},
{
"created":"20200621234639688",
"text":"",
"tags":"",
"title":"Tiddler Three with spaces",
"modified":"20200621234652570"
}
]
[
{
"title":"TiddlerOne"
},
{
"title":"TiddlerTwo"
},
{
"title":"Tiddler Three with spaces"
}
]
[
{
"created":"20200621234617853",
"title":"TiddlerOne",
"modified":"20200621234625900"
},
{
"created":"20200621234629958",
"title":"TiddlerTwo",
"modified":"20200621234637103"
},
{
"created":"20200621234639688",
"title":"Tiddler Three with spaces",
"modified":"20200621234652570"
}
]
On Sunday, June 21, 2020 at 3:27:20 PM UTC-7, Robert Jopling wrote:I am a newbie to TW5 and JSON so please can you explain how I achieve that. The JSON file was an export from a database app.
To *export* tiddlers from TiddlyWiki using JSON format (go to $:/AdvancedSearch -> Filters tab, and enter a list of tiddlers, then press the "export" button and choose JSON format)
However... while this minimal JSON can be imported into TiddlyWiki, it lack a few fields that make things work better. Specifically, because the tiddler in this JSON file don't have any "created" or "modified" fields defined, they won't initially show up in the Recent tab in the TW sidebar (they can still be found by using the "More > All" tab in the sidebar).
To make things work well right from the start, here's what I consider to be an effective minimal JSON file:
[
{
"created":"20200621234617853",
"title":"TiddlerOne",
"modified":"20200621234625900"
},
{
"created":"20200621234629958",
"title":"TiddlerTwo",
"modified":"20200621234637103"
},
{
"created":"20200621234639688",
"title":"Tiddler Three with spaces",
"modified":"20200621234652570"
}
]Note that each tiddler has both a "created" and "modified" field defined. The timestamp format for these fields is:YYYY0MM0DD0hh0mm0ss0XXXThat is:4 digit year2 digit month2 digit day2 digit hours2 digit minutes2 digit seconds3 digit millisecond
Note that all values (except for the year) are zero-padded... i.e., July 4th 2020 at 12:15:30pm would be: "20200704121430000"
For your purposes, you could just use midnight on the current day, i.e. "20200621000000000".Also, as already noted by John Edwards, field names cannot have spaces, but can have underscores instead, so you will have to fix that as well.Hopefully, the above info is enough to get your data successfully imported as tiddlers.Let me know how it goes...enjoy,-eEric ShulmanTiddlyTools.com: "Small Tools for Big Ideas!" (tm)InsideTiddlyWiki: http://TiddlyTools.com/InsideTW
--
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 tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/a766e2f7-d65f-44ae-bb4b-d645d13baa49o%40googlegroups.com.
When I try a test JSON structured as suggested I get the following error message
JSON error: SyntaxError: JSON.parse: unexpected character at line 8 column 1 of the JSON dataThat character is the closing square bracket.
I set up a tiddler in the format that I want and exported it to see the structure and then created the following file JSON2 with the additional fields after the 'modified' field.
On import nothing happens!
Any explanation?
[{
"created": "2.02E+16",
"text": "",
"Tags": "",
"Title": "Ailsa Craig Lighthouse",
"": "",
"modified": "2.02E+16",
"Name": "Ailsa Craig Lighthouse",
"Area": "Ayrshire",
"Lat": "55.2521",
"Long": "5.108716667",
"Island_mainland": "Ailsa Craig",
"Year_built": "1886",
"Built_by": "Thomas & David A Stevenson",
"Operated_by": "NLB",
"Tower_height": "11m",
"Focal_height": "18m",
"Range": "17 nm"
},
On Sunday, June 21, 2020 at 3:27:20 PM UTC-7, Robert Jopling wrote:I am a newbie to TW5 and JSON so please can you explain how I achieve that. The JSON file was an export from a database app.
To *export* tiddlers from TiddlyWiki using JSON format (go to $:/AdvancedSearch -> Filters tab, and enter a list of tiddlers, then press the "export" button and choose JSON format)
However... while this minimal JSON can be imported into TiddlyWiki, it lack a few fields that make things work better. Specifically, because the tiddler in this JSON file don't have any "created" or "modified" fields defined, they won't initially show up in the Recent tab in the TW sidebar (they can still be found by using the "More > All" tab in the sidebar).
To make things work well right from the start, here's what I consider to be an effective minimal JSON file:
[
{
"created":"20200621234617853",
"title":"TiddlerOne",
"modified":"20200621234625900"
},
{
"created":"20200621234629958",
"title":"TiddlerTwo",
"modified":"20200621234637103"
},
{
"created":"20200621234639688",
"title":"Tiddler Three with spaces",
"modified":"20200621234652570"
}
]Note that each tiddler has both a "created" and "modified" field defined. The timestamp format for these fields is:YYYY0MM0DD0hh0mm0ss0XXXThat is:4 digit year2 digit month2 digit day2 digit hours2 digit minutes2 digit seconds3 digit millisecond
Note that all values (except for the year) are zero-padded... i.e., July 4th 2020 at 12:15:30pm would be: "20200704121430000"
For your purposes, you could just use midnight on the current day, i.e. "20200621000000000".Also, as already noted by John Edwards, field names cannot have spaces, but can have underscores instead, so you will have to fix that as well.Hopefully, the above info is enough to get your data successfully imported as tiddlers.Let me know how it goes...enjoy,-eEric ShulmanTiddlyTools.com: "Small Tools for Big Ideas!" (tm)InsideTiddlyWiki: http://TiddlyTools.com/InsideTW
--
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 tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/a766e2f7-d65f-44ae-bb4b-d645d13baa49o%40googlegroups.com.