Hi Danielo > there anything that should make me stick to the getFieldString thing? Any drawback except the dates?
It looks like the approach you've described will leave date fields as dates in the JSON string, and not convert them to strings. That means that you'll be generating JSON that isn't compatible with TiddlyWiki itself. There's no getting around it: you should convert each field to a string before attempting to convert it into JSON. Best wishes Jeremy. On Sat, Dec 6, 2014 at 10:22 AM, Danielo Rodríguez <[email protected]> wrote: > I found another solution that works with how the tiddlers are CURRENLTY > encoded, and I learned something new. Thankfully JSON.parse admits reviver > functions. So all I have to do is a patch function like this: > > var patchJsonDate = function (key, value) { > if (key === "created" || key === "modified"){ > return new Date(value) > } else > return value > }; > > Is there anything that should make me stick to the getFieldString thing? > Any drawback except the dates? > > -- > 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 http://groups.google.com/group/tiddlywiki. > For more options, visit https://groups.google.com/d/optout. > -- Jeremy Ruston mailto:[email protected] -- 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 http://groups.google.com/group/tiddlywiki. For more options, visit https://groups.google.com/d/optout.

