[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [xdi] Downsides of the notation shift
Here in the XDI/JSON "short notation", we have the beautiful rule that statements that are the target of the $set operation are all encapsulated within a single nested JSON object. This pattern completely disappears with the "notation shift".Current "short notation":In XDI/JSON, this difference can also be observed (during the XDI TC call, we only did XDI DISPLAY).After the "notation shift":As I tried to illustrate in the last XDI TC minutes, sometimes XDI messages don't quite look as nice and consistent after the "notation shift" as they look in the current "short notation":Current "short notation":
[=]!:uuid:1111[$msg]!:uuid:1234$do/$set/([=]!:uuid:1111/#friend/[=]!:uuid:2222)
[=]!:uuid:1111[$msg]!:uuid:1234$do/$set/([=]!:uuid:1111<#email>&/&/"alice@test.com")
[=]!:uuid:1111[$msg]!:uuid:1234$do/$set/[=]!:uuid:1111<#phone>([=]!:uuid:1111[$msg]!:uuid:1234$do/$set)[=]!:uuid:1111/#friend/[=]!:uuid:2222
People may ask here, why are there parentheses around the message in the first two lines, but not in the last line.
([=]!:uuid:1111[$msg]!:uuid:1234$do/$set)[=]!:uuid:1111<#email>&/&/"alice@test.com"
[=]!:uuid:1111[$msg]!:uuid:1234$do/$set/[=]!:uuid:1111<#phone>
{
"[=]!:uuid:1111[$msg]!:uuid:1234$do/$set": [
{
"[=]!:uuid:1111/#friend": [
"[=]!:uuid:2222"
],
"[=]!:uuid:1111<#email>&/&": "alice@test.com"
},
"[=]!:uuid:1111<#phone>"
]
}
Besides not being as readable, there is another problem: Size.
After the "notation shift":
{
"([=]!:uuid:1111[$msg]!:uuid:1234$do/$set)[=]!:uuid:1111/#friend": [
"[=]!:uuid:2222"
],
"([=]!:uuid:1111[$msg]!:uuid:1234$do/$set)[=]!:uuid:1111<#email>&/&":
"alice@test.com",
"[=]!:uuid:1111[$msg]!:uuid:1234$do/$set": [
"[=]!:uuid:1111<#phone>"
]
}
This is about 50% bigger than the previous "short notation" (not counting whitespace).
Keep in mind that we consider XDI/JSON the default format when sending XDI over the wire.All of the above doesn't just apply to messages, but also to link contracts and policies and everything else that uses inner roots.
Markus
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]