The tiddler-dictionary format is intended to be an easier to type
alternative that maps directly onto JSON. The currently defined format was
just the simplest things that would cover the most common use case. The
current format has two major limitations (only being able to produce a
simple flat hashmap object, and forcing values onto a single line). But it
wins in other respects: there's no encoding of special characters, or
balancing of quotation marks. As Mario says, JSON itself is always
available for demanding applications.

I am in favour of extending the format to allow more JSON structures to be
represented along with multiline values.

I've purposely stayed away from using indentation in TW syntax so far,
mainly because typing tabs isn't supported in browser textarea controls.

I had been considering using a prefix to indicate a multiline entry:

single: a single line entry
+multi:
Text that runs over multiple lines
+
anothersingle: all in one line

To handle more complex structures we could use JSON Pointers (again):

/myarray/0: First element is a string
/myarray/1/type: Second element is an object
/myarray/1/mode: Another property

Which would be equivalent to:

{
myarray = [
"First element is a string",
{type: "Second element is an object", mode: "Another property"}
]
}

There's no obvious way for an author to indicate that the top level item is
an array rather than an object.

Best wishes

Jeremy




On Thu, Feb 27, 2014 at 10:40 AM, PMario <[email protected]> wrote:

> I think you should create a JSON tiddler, application/json. So you don't
> need to write a parser, since TW can handle it allready.
> -m
>
> --
> 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/groups/opt_out.
>



-- 
Jeremy Ruston
mailto:[email protected]

-- 
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/groups/opt_out.

Reply via email to