[v5.3.2] jsonset operator docs

jsonset operator’s documentation is mostly understandable, but there are some minor inconsistencies and areas for improvement. In particular:

  • The summary table speaks of JSON strings, not objects, as input and output. It is not specified what happens in case of multiple objects at input.
  • The parameter is described as “one or more indexes of the property to retrieve and sometimes a value to assign”, the last part I marked in italics is quite confusing imo.
  • The examples should be in a separate tiddler.
  • I think the examples should use the dedicated .operator-example docs macro, not the filter --> result syntax like [<jsondata>jsonset[d],[Jaguar]] --> {"a": "one","b": "","c": "three","d": "Jaguar"}.

I would go ahead and improve it myself, but

  • I don’t want to intrude if someone is still working on the operator itself or the docs.
  • I’m not sure how to contribute to prerelease docs, that is how to locate the right file on GH (the link from pink ribbon redirects to a not-yet-existing file in editions/tw5.com) and which branch to contribute to.

Hi @vilc, the documentation for jsonset can be edited here: https://github.com/Jermolene/TiddlyWiki5/blob/master/editions/tw5.com/tiddlers/filters/jsonset.tid

If you aren’t comfortable using Git outside of the web interface, moving the examples to a new tiddler might be difficult, in which case I can do so after you have submitted your improvements.

1 Like

Thanks! There’s the new github.dev web editor, editing and adding a new file in the same commit should be doable in the web as well.

2 Likes

Excellent. Extending the documentation submission mechanism to also encompass the pre-release is on my list of things to attend to this winter.

1 Like

Thanks, any improvements to you tool are welcome!

Meanwhile I have made PR Improve jsonset operator docs by mateuszwilczek · Pull Request #7873 · Jermolene/TiddlyWiki5 (github.com).

1 Like