It is not possible to include the substring >> within the json string 
- maybe we could have escape the chevron  \> but I cannot think where we 
would remove the \
?
On Wednesday, June 18, 2014 3:48:40 PM UTC+2, Jeremy Ruston wrote:
>
> Hi BJ
>
> Maybe we should extend the standard element/widget syntax to allow 
> multiline attributes with, say, triple double quotes:
>
> <$text text="""
>
> {"some":"json"}
>
> """/>
>
> Best wishes
>
> Jeremy
>
>
> On Wed, Jun 18, 2014 at 6:58 AM, BJ <[email protected] <javascript:>> 
> wrote:
>
>> Sorry I am being unclear.
>> A json can contain any unicode character, but tw5 macro calls syntax is 
>> limited to 4 type of strings.
>> in macrocallblock.js, the definition of a macro parameter is given by 
>> reParam = 
>> /\s*(?:([A-Za-z0-9\-_]+)\s*:)?(?:\s*(?:"([^"]*)"|'([^']*)'|\[\[([^\]]*)\]\]|([^"'\s]+)))/mg
>> The first term is optional label of the form 
>> labelname:
>> which we can ignore
>> the second term defines macro call parameters as strings of one of the 4 
>> forms
>> "no double quotes here" OR
>> 'no single quotes here' OR
>> [[no square braces here]] OR
>> no.spaces.or.quotes 
>> So if I have a json like 
>> {"akey":"this is a 'value' with [[a link]]"}
>> I am unable to pass it to a macro, as it violates each of the four forms 
>> of macro parameters
>>
>> In my particular case I have a js macro that will return the value of map 
>> represented as a json, i.e. defined as
>> valueof(key, map) where map is a json.
>>
>>
>>
>> On Tuesday, June 17, 2014 11:29:12 PM UTC+2, PMario wrote:
>>>
>>> I'm not sure, what you exactly try to do. 
>>>
>>> But a json parser will allways fail, if you give it single quotes as a 
>>> 'key':value pair. This is by design / spec.
>>>
>>> see: http://json.org/  for the spec.
>>>
>>> can you post an example of your json, that causes the problem.
>>>
>>> -mario
>>>
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "TiddlyWikiDev" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/tiddlywikidev.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Jeremy Ruston
> mailto:[email protected] <javascript:>
>  

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" 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 http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/d/optout.

Reply via email to