[TW-5 Plugin] New Plugin - TW5-JsonManglerPlugin!

58 views
Skip to first unread message

Joshua Fontany

unread,
Dec 3, 2018, 9:47:10 PM12/3/18
to TiddlyWikiDev

HelloThere!!!

I'm so excited to share this new plugin with the community.!


TW5-JsonManglerPlugin by Joshua Fontany, v 2.0.0


This plugin changes the methods tiddlywiki uses to retrieve and set values in json data tiddlers.

It does this in a way that aims for backwards compatibility.

It also introduces new features, widgets, and filter operators:

  • Allows TextReferences to target nested values ("complex json").
  • New buttons in the edit-template for json data tiddlers.
  • An automatic alert/error notification when calling message actions on an invalid json data tiddler.
  • $jsonmangler, a widget that catches messages to edit json data tiddlers.
  • An updated ''indexes[] operator'' that can show all index paths. If given the argument verbose, it will list all paths, including the root path to nested objects and arrays.
  • A new ''hasindex[] operator'' that returns only those input tiddlers that have a value the index path argument.
  • A new ''tsort[] operator'' that uses a //tokenized sorting method// to resolve pesky sorting problems.

Further documentation is available in the example wiki: https://joshuafontany.github.io/TW5-JsonManglerPlugin/

This plugin is a work in progress; please report any issues on GitHub: https://github.com/joshuafontany/TW5-JsonMangerPlugin/issues

Repository Link: https://github.com/joshuafontany/TW5-JsonMangerPlugin


Joshua Fontany

unread,
Dec 3, 2018, 9:58:26 PM12/3/18
to tiddly...@googlegroups.com
Also posting here for the more technical savvy. More eyes will catch unoptimized code or places to do things differently. I built a bunch of functional tests into the example wiki,  but no idea about perf imoacts... 

Mahalo (thanks!) for any feedback!

Simon Huber

unread,
Dec 4, 2018, 2:17:43 AM12/4/18
to TiddlyWikiDev
Hi Joshua, this is pretty cool 8-) !

When trying some examples I noticed that the action-listops example adds "null" to the json when - I think - it should be just "" (empty) ... then, when you populate the index again, "null" results as an additional item


Reply all
Reply to author
Forward
0 new messages