Thanks Paul, I understand, just asking myself if changing this in the backend would really break something? Understand it looks nicer in owget - but anywhere else it is programatically just annoying..
I guess any client/function has to implement some parser for removing the leading whitespaces to get the value so it won't break much - although I might oversee something(?) But at least in owhttpd/text/Json they are useless overhead IMHO. In owget in breaks using it with simple (Ba)sh like let without working around the leading spaces first etc.pp. Lets hear other thoughts on this.. Michael On 17.03.2014 15:13, Paul Alfille wrote: > The values are formatted with the standard C format parameters: %d, %u, > %G in /module/owlib/src/c/ow_parseoutput.c With no particular reason to > choose otherwise, no left-justification was done. The default > justification looked better when printed out (it tended to stack better > in tables). > > Although it would be trivial to change, I worry the effect on existing > applications. We could always add another "flag" in the path name, Say > /trim/10.123123233/temperature if its important enough. > > owget has no conception of the return value, it's just a string, so any > change would have to be upstream. > > owhttpd would be easy to change, particularly the json implementation > where the raw data is probably never presented, but rather interpreted > first. owhttpd does know about the type of value. (It would be changed > in /module/owhttpd/src/c/owhttpd_read.c) Currently owhttpd only formats > differently for binary and bitfields, but that could be changed. > > Paul > > > > On Mon, Mar 17, 2014 at 9:36 AM, Michael Markstaller <m...@elabnet.de > <mailto:m...@elabnet.de>> wrote: > > Hi, > > one question/suggestion: > I have in several clients/languages for each and every query a > left-trim-function to remove the leading spaces in the output of values > of owget,owhttp(text/json),.. > > What are these leading spaces good for? > In the libow they might make sense (which=?) but in > owget/owhhtpd(text/json), couldnt they just be removed before in owfs? > > Michael ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech _______________________________________________ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers