Re: [w3c/automotive] Gen2-CORE Filtering chapter update. (#320)

Hi,
Could you add this comment on github and not directly via mail.

Br
Peter W

From: Ulf Bjorkengren <ulfbjorkengren@geotab.com>
Date: Wednesday, December 4, 2019 at 4:52 AM
To: "Winzell, Peter" <peter.winzell@volvocars.com>, public-automotive <public-automotive@w3.org>
Subject: Re: [w3c/automotive] Gen2-CORE Filtering chapter update. (#320)

According to RFC3986, the allowed characters in a query component are as shown below.
Which means that "[ and "]" are not available.
I think one should avoid most sub-delims, I found e. g. that the TCP/IP lib on my computers did not accept "&" (but on the other hand "$").
Any of the  "-" / "." / "_" / "~" characters would probably be the safest bet.
BR
Ulf


query         = *( pchar / "/" / "?" )

pchar         = unreserved / pct-encoded / sub-delims / ":" / "@"



unreserved    = ALPHA / DIGIT / "-" / "." / "_" / "~"



pct-encoded   = "%" HEXDIG HEXDIG



sub-delims    = "!" / "$" / "&" / "'" / "(" / ")"

                 / "*" / "+" / "," / ";" / "="











On Wed, Dec 4, 2019 at 11:28 AM Ulf Björkengren <ulfbjn@gmail.com<mailto:ulfbjn@gmail.com>> wrote:

---------- Forwarded message ---------
From: peterMelco <notifications@github.com<mailto:notifications@github.com>>
Date: Wed, Dec 4, 2019, 00:57
Subject: Re: [w3c/automotive] Gen2-CORE Filtering chapter update. (#320)
To: w3c/automotive <automotive@noreply.github.com<mailto:automotive@noreply.github.com>>
Cc: Ulf Björkengren <ulfbjn@gmail.com<mailto:ulfbjn@gmail.com>>, Author <author@noreply.github.com<mailto:author@noreply.github.com>>


I believe that we could still use the equal operator as is, and not invent a new scheme for doing this. Consider adding operators separate from the equal sign and for example use brackets to enclose the operators on the key name.

[EQ],[GT],[LT]

http GET:Vehicle/Cabin/Door?$path=*/*/IsOpen

vehicle/Cabin/Door/Row1/Right/Shade/Position?$range[GT]=15 AND $change[GT]=5

This way we can add operators if needed and be compatible with json query string libraries. It would also be in my opinion more inline with what other has done and thus simplify client development. Downside would be server side parsing and grouping filters....maybe.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fw3c%2Fautomotive%2Fpull%2F320%3Femail_source%3Dnotifications%26email_token%3DAJERQQPBE5U7FJTBFGUDSL3QW3W6ZA5CNFSM4JQOPBG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEF3HMAI%23issuecomment-561411585&data=02%7C01%7Cpeter.winzell%40volvocars.com%7Ccff7dd95955842ece38708d778b8cf47%7C81fa766ea34948678bf4ab35e250a08f%7C0%7C0%7C637110607455686211&sdata=72uAEZ2G%2FESi3nrTD2p12zhHatj4uirQ024oBHDdstM%3D&reserved=0>, or unsubscribe<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAJERQQNNZWX7SMBZ6OX5PNLQW3W6ZANCNFSM4JQOPBGQ&data=02%7C01%7Cpeter.winzell%40volvocars.com%7Ccff7dd95955842ece38708d778b8cf47%7C81fa766ea34948678bf4ab35e250a08f%7C0%7C0%7C637110607455696211&sdata=JvR8qURxir4OdiS%2BeHKqO7Rc9ij32F5ANAQmfUaULY0%3D&reserved=0>.


--
Ulf Bjorkengren
Geotab
Senior Connectivity Strategist | Ph. D.
Mobile
+45 53562142
Visit
www.geotab.com<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.geotab.com%2F&data=02%7C01%7Cpeter.winzell%40volvocars.com%7Ccff7dd95955842ece38708d778b8cf47%7C81fa766ea34948678bf4ab35e250a08f%7C0%7C0%7C637110607455706203&sdata=N34%2Bd%2FdxCp9jTBuUGPzbty9kJPuNWj5oXs6yLXzth2Q%3D&reserved=0>


[Image removed by sender.]

Join us at Connect 2020

San Diego

January 13 - 16, 2020



Register Now!<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.geotab.com%2Fconnect%2F&data=02%7C01%7Cpeter.winzell%40volvocars.com%7Ccff7dd95955842ece38708d778b8cf47%7C81fa766ea34948678bf4ab35e250a08f%7C0%7C0%7C637110607455706203&sdata=LCLuJTqY%2FYuLC3r8w7Gw%2Fu7myYkexr0v1x6bBJwjjzo%3D&reserved=0>

Received on Wednesday, 4 December 2019 19:29:08 UTC