Hey, Coda —

With the full set of values supported, working with JSON data would be 
perfectly feasible.  Putting it directly in formulas is a can of worms, 
though.  I'm already treading a fine line between conforming to WikiText 
syntax *and* filter syntax *and* standard spreadsheet syntax while 
maintaining a consistent code style...  Merging JSON into that, with its 
syntactic nuances, would threaten to over-constrain things.

On the upside, you could just do

json({{MyJsonTiddler}})

On a related note, I want to support excel style array literals, but the 
distinction with transclusions will be nuanced when they nest.  Fortunately 
Excel and Sheets both include a 2D array syntax already...

{1, 2, 3; 4, 5, 6; 7, 8, "fish"}

The curly braces are, of course, anathema to the JavaScript developer.  :)


On Thursday, 1 February 2018 16:09:57 UTC-6, coda coder wrote:
>
> Hi Evan
>
> On Thursday, February 1, 2018 at 3:24:58 PM UTC-6, Evan Balster wrote:
>>
>>
>> That would look something like this:
>>
>> <$formula-vars $dict="""
>>   dict(
>>     t1 = 0,
>>     t2 = <<newVal>>,
>>     t3 = 3+1,
>>     t4 = t3+20)
>>   """>
>>   ...
>> </$formula-vars>
>>
>> At which point the primitive objects usable in formulas start to look a 
>> lot like JavaScript's!  Hashmaps (aka "objects" aka "dictionaries") are 
>> useful for lots of things...
>>
>>
> At which point, one wonders why you don't add another idiom... json.
>
> <$formula-vars $thing="""
>   json {
>     t1: 0,
>     t2: <<newVal>>,
>     t3: 3+1,
>     t4: t3+20}
>   """>
>   ...
> </$formula-vars>
>
> thoughts?
>

-- 
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/820e6c10-3cd4-4ad2-9570-b7155bf4b076%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to