Skip to content

[Idea] Provide utility widgets to help in hand-rolling JSON #121

@flibbles

Description

@flibbles

If this project is still being maintained, it might help adoption if there was some way to aid people when they're hand-rolling their json to send to echarts.

Something like this:

\widget $json.text(text) "<$text text={{{ [<text>jsonstringify[]] }}} />"
\widget $json.object(filter, variable:currentTiddler) {<$list variable=<<variable>> filter=<<filter>> join=,><$json.text text={{{ [<variable>getvariable[]] }}} />: <$slot $name=ts-raw /></$list>}
\widget $json.array(filter, variable:currentTiddler) [<$list variable=<<variable>> filter=<<filter>> join=,><$slot $name=ts-raw><$json.text text={{{ [<variable>getvariable[]] }}} /></$slot></$list>]

Could greatly simplify some of it. Though it does mean using at least Tiddlywiki v5.3.0.

You'd use it like this:

<$json.object variable=x filter="[range[10]]">
	<$json.array filter="[range<x>]" />
</$json.object>

Thoughts? Is this plugin being maintained at all?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions