Per the thread I opened on github, we need to keep it compatible with
existing wikis that may use those types of "path strings" as top level
index names. Having the code automatically try both the top-level
string-index _and_ the nested object index and then somehowd3cide which one
to use in each
Is there some reason ## can't used again? And how about strict "[[...]]"
and '[[...]]' for arrays?
{
a: {
b: {
c: {
x: 5,
y: "six",
z: "[[7, "eight"]
}
}
}
}
-> "a##b##c##x", 'a##b##c##z"[[0]]"' etc.
--
You received this message because you
Coming back around to this after a bit.
I think the best way to preserve backwards compatibility is to setup a new
text-reference field-name prefix.
!! = tiddler field-name reference
## = data tiddler index-name reference
What would a good doubled-char prefix be for 'nested json data-tiddler
I have opened an issue on the TW5 github page to discuss this.
https://github.com/Jermolene/TiddlyWiki5/issues/3074
Thanks again for the advice so far Evan.
Best,
Joshua Fontany
On Thursday, December 28, 2017 at 6:14:51 PM UTC-8, Joshua Fontany wrote:
>
> Yup, that is exactly the rabbit hole
Yup, that is exactly the rabbit hole that led me back to examining the core
json parser. I like the pointer syntax much better, it will also simplify
pushing json key:value pairs to and from tiddlers as field:value pairs. I
will only have to replace the '/' char with a legal field-name char
For my part, I suspect that the use of brackets in JSON path and company
would prevent the syntax from being usable in filter expressions. The
filter-parser will interpret the first right-bracket as closing the operand.
On Thursday, 28 December 2017 16:56:13 UTC-6, Joshua Fontany wrote:
>
>
Oooh. Thanks for that. I have also been considering JsonPath syntax (
http://goessner.net/articles/JsonPath/) and this library:
https://www.npmjs.com/package/jsonpath
I will have to compare them.
Best,
Joshua Fontany
On Thu, Dec 28, 2017 at 1:59 PM, Evan Balster
wrote: