Hi all,

I'd like to introduce a cool message-catcher widget and related UI tiddlers 
that I created to make working with Json Tiddler's a bit easier. Let me 
know what you all think! :)

= Thanks to all the folks that post here, it was interesting researching 
this problem to get to this working code. Mahalo - Thanks! =

https://github.com/joshuafontany/TW5-JsonManglerPlugin

$ <https://github.com/joshuafontany/TW5-JsonManglerPlugin#HelloThere>
jsonmanger

This is a json mangler plugin for TiddlyWiki (http://tiddlywiki.com) by 
Joshua Fontany.

It contains a widget module *$jsonmangler*, which catches the following 
messages sent by the ActionSendMessage widget (within Button widgets, etc).

*tm-json-refresh* - Refreshes the json tiddler's formatting.

*tm-json-flatten* - Flattens the json's keys (flattens nested objects, etc) 
to one layer deep. Values are assigned to an index that is the dot-notation 
version of the path to the original value.

*tm-json-unflatten *- Unflattens the json's keys (re-nesting objects, etc) 
from a flat tiddler. Path Keys are read and objects are re-created.

*tm-json-restore* - Restores data from the json's archive. The Refresh, 
Flatten, and Unflatten operations store a copy of the old text field in an 
archive tiddler: $:/archive/json/jsonTiddlerTitle

*tm-json-push */* tm-json-pull* - Flat jsons with titles that end in 
".json" only. Pushes or pulls the json's keys (& optionally values) to or 
from the json's "parent". The parent is a tiddler with the exact same title 
without the ".json" extension.

This functionality is currently implemented in an Edit Template shown for 
all tildders of type 'application/json'. When creating new Json Tiddlers, 
set a 'flat' field to either "true" or "false" (depending on how the 
tiddler is created) and save the tiddler, then re-open the tiddler in edit 
mode to ensure all mangler functions are performed correctly.

See the example wiki for more information: 
https://joshuafontany.github.io/TW5-JsonManglerPlugin/

-- 
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/d77a2901-2c64-4403-a1bd-358e766136e0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to