The color palettes actually use dictionary tiddlers (type: application/x-tiddler-dictionary) rather than JSON tiddlers (type: application/json) and I’d recommend using a dictionary tiddler for your shopping list too if you want to be able to make easy manual edits just by opening the standard tiddler editor. JSON tiddlers are little less legible at a glance, and much easier to break with stray or missing punctuation.
If you don’t care about manual editing, it doesn’t particularly matter which format you use. I believe data tiddlers will default to application/json if they’re initially created by e.g. a $checkbox or an $edit-text widget, so if you have a preference, make a tiddler with the name you want to use and set the type ahead of time.
If you had a preset list of groceries to check/uncheck, you could do it with index-type $checkbox widgets in a $list, e.g.
<$list filter="[enlist{!!list}]">
<$checkbox tiddler="Grocery List" index={{!!title}} checked="buy" unchecked="">
{{!!title}}
</$checkbox>
</$list>
Here I’m assuming that grocery items will be added/subtracted to the list field of the tiddler where you use this code (not the “Grocery List” tiddler!) but you could store the list wherever you wanted, of course.
If you want to set/track quantities for each item, though, I think you’ll probably want to use $edit-text instead of (or in addition to) checkboxes. You could use the $edit-text to type in whatever quantity you want and then a checkbox to reset the same index to 0 (or blank). Here’s a very quick mock-up:
<$list filter="[enlist{!!list}]">
<$checkbox tiddler="Grocery List" index={{!!title}} unchecked="0" >
{{!!title}}
</$checkbox>
<$edit-text tiddler="Grocery List" index={{!!title}} tag=input type=number />
</$list>
Here, I’m using type=number
to give you the buttons for easy incrementing, but if you want to include units like kg or lb, you’ll want to use a “vanilla” $edit-text instead.
And here’s the kind of output you’ll get (assuming you don’t set the tiddler type in advance):