I'm writing a formal specification for a data interchange format. It's
meant to be like JSON, but based on Tcl 9.0 instead of JavaScript, so
I'm calling it TclON. I will find some group about formal specifications
for feedback, but I also want to see if anyone here has any feedback,
like if I've missed something from Tcl, though the lack of command and variable substitution is intentional. The first draft is below. Thank you.
Am 26.03.26 um 03:04 schrieb Choosechee:
I'm writing a formal specification for a data interchange format. It's
meant to be like JSON, but based on Tcl 9.0 instead of JavaScript, so
I'm calling it TclON. I will find some group about formal
specifications for feedback, but I also want to see if anyone here has
any feedback, like if I've missed something from Tcl, though the lack
of command and variable substitution is intentional. The first draft
is below. Thank you.
1.) If you are serious about it, don't write the specification in plain text. Write it in a formal grammar like BNF or PEG or in a form suitable
for one of the existing parser generators. Then you can really test it.
2.) I'm not sure, have you not just repeated the specifications of Tcl's serialization formats for various "types"?
3.) What is your use-case? Beware of https://xkcd.com/927/
Christian
I'm writing a formal specification for a data interchange format. It's
meant to be like JSON, but based on Tcl 9.0 instead of JavaScript, so
I'm calling it TclON. I will find some group about formal specifications
for feedback, but I also want to see if anyone here has any feedback,
like if I've missed something from Tcl, though the lack of command and variable substitution is intentional. The first draft is below. Thank you.
I'm writing a formal specification for a data interchange format. It's
meant to be like JSON, but based on Tcl 9.0 instead of JavaScript, so
I'm calling it TclON. I will find some group about formal specifications
for feedback, but I also want to see if anyone here has any feedback,
like if I've missed something from Tcl, though the lack of command and variable substitution is intentional. The first draft is below. Thank you.
Choosechee <choosechee@pm.me> posted:
I'm writing a formal specification for a data interchange format. It's
meant to be like JSON, but based on Tcl 9.0 instead of JavaScript, so
I'm calling it TclON. I will find some group about formal specifications
for feedback, but I also want to see if anyone here has any feedback,
like if I've missed something from Tcl, though the lack of command and
variable substitution is intentional. The first draft is below. Thank you. >>
What is the license for TclON ? The same as https://www.json.org/license.html ?
Shouldn't add it here ?
Olivier
How does TclON differentiate between, lets say a string 3.1415 and
a number 3.1415? In JSON strings are always surrounded by "...".
In TclON, if I understand correctly, that isn't the case.
Additionally, in JSON, you can detect the type of every value
by looking at its first character. In Tcl, however, everything is
a string. Usage determines the type.
Other example:
How does TclON differentiate between lists and dicts?
Same problem as before. Dicts are also lists with an even number
of elements. However, there can also be lists that should be
lists and have an even number of elements.
Another aspect: JSON is a subset of JavaScript. This means you can
feed the interpreter JSON data, and the result is a native data
structure that fits seamlessly into the usual syntax.
This is possible because JavaScript allows objects to be defined
as prototypes. Tcl doesn't have this feature.
Therefore, it's impossible to "source" TclON data natively into Tcl.
Thus, TclON cannot be exactly the same as JSON for JavaScript.
However, that may not be what you're looking for.
On 26/03/2026 02:04, Choosechee wrote:
I'm writing a formal specification for a data interchange format. It's<snip>
meant to be like JSON, but based on Tcl 9.0 instead of JavaScript, so
I'm calling it TclON. I will find some group about formal
specifications for feedback, but I also want to see if anyone here has
any feedback, like if I've missed something from Tcl, though the lack
of command and variable substitution is intentional. The first draft
is below. Thank you.
I was reading today about how JSON isn't a great fit for AI since it's
very verbose and leads to a relatively large token consumption, it that
a consideration for TclON?
Simon
I'm writing a formal specification for a data interchange format. It's
meant to be like JSON, but based on Tcl 9.0 instead of JavaScript, so
I'm calling it TclON. I will find some group about formal specifications
for feedback, but I also want to see if anyone here has any feedback,
like if I've missed something from Tcl, though the lack of command and variable substitution is intentional. The first draft is below. Thank you.
# Introduction {#introduction}
*Tcl Object Notation*, or *TclON* (pronounced tick-lawn), is a
collection of
text-based formats for representing data that allows for structured data interchange. These formats can be nested within each other, allowing for
the
representation of complex objects in the same way that syntaxes like
JSON, XML,
and YAML can. Formats are not mutually exclusive with each other,
| Sysop: | DaiTengu |
|---|---|
| Location: | Appleton, WI |
| Users: | 1,113 |
| Nodes: | 10 (0 / 10) |
| Uptime: | 492335:49:21 |
| Calls: | 14,238 |
| Files: | 186,312 |
| D/L today: |
3,571 files (1,161M bytes) |
| Messages: | 2,514,868 |