<div dir="ltr"><div class="gmail_default" style="font-family:times new roman,serif;font-size:large"><span style="font-family:arial,sans-serif;font-size:small">On Thu, Aug 6, 2015 at 4:48 PM, Aleksander Morgado </span><span dir="ltr" style="font-family:arial,sans-serif;font-size:small"><<a href="mailto:aleksander@aleksander.es" target="_blank">aleksander@aleksander.es</a>></span><span style="font-family:arial,sans-serif;font-size:small"> wrote:</span><br></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Thu, Aug 6, 2015 at 7:02 PM, Neal Gompa <<a href="mailto:ngompa13@gmail.com">ngompa13@gmail.com</a>> wrote:<br>
>> On Aug 6, 2015 5:13 PM, "Neal Gompa" <<a href="mailto:ngompa13@gmail.com">ngompa13@gmail.com</a>> wrote:<br>
>> ><br>
>> > On Thu, Aug 6, 2015 at 10:35 AM, Dan Williams <<a href="mailto:dcbw@redhat.com">dcbw@redhat.com</a>> wrote:<br>
>> >><br>
>> >> On Thu, 2015-08-06 at 08:57 +0200, Aleksander Morgado wrote:<br>
>> >> > On Thu, Aug 6, 2015 at 3:00 AM, Markus Gothe<br>
>> >> > <<a href="mailto:nietzsche@lysator.liu.se">nietzsche@lysator.liu.se</a>> wrote:<br>
>> >> > > Please tell me if I am wrong… But this quite a design issue which<br>
>> >> > > we need to come down to consensus… Right?<br>
>> >> ><br>
>> >> ><br>
>> >> > Well, it's not like we're changing the behavior of the kernel driver.<br>
>> >> > This is just a small design issue in mbimcli :)<br>
>> >> ><br>
>> >> > What's your opinion on this? Do you prefer the "=" separated<br>
>> >> > key/value<br>
>> >> > pairs, or just the prefixed "N:" with additional optional arguments<br>
>> >> > for things like ip-type?<br>
>> >><br>
>> >> I personally prefer = separated key/value pairs, keeping compat with<br>
>> >> the<br>
>> >> old unkeyed format.  So I'll try to do that, but might not happen this<br>
>> >> week.<br>
>> >><br>
>> >> Dan<br>
>> >><br>
>> ><br>
>> > If I could chime in for a moment:<br>
>> ><br>
>> > I favor the key/value pair format, as it makes it easier to figure out<br>
>> > how to lay out configuration information. Heck, it makes it possible for me<br>
>> > to easily structure a program that would take in JSON data representing the<br>
>> > configuration and map it straight to mbimcli so that it can be processed. It<br>
>> > would be also awesome if some kind of key/value output format could be<br>
>> > available as an option for parsing the output that comes back after mbimcli<br>
>> > successfully connects. The human-readable output today that shows up in git<br>
>> > master is great for humans, but it's a bit tricky to parse for scripting.<br>
>> ><br>
>> > If there's a key/value input and key/value output mechanism, that would<br>
>> > make what I'm working on much easier.<br>
>> ><br>
>><br>
>> Yes, totally agree regarding the output thing. Something like an<br>
>> additional --script option or something that would generate key/value pairs<br>
>> for the outputs of all commands. That would be a truly nice improvement and<br>
>> actually quite trivial to implement.<br>
><br>
> I don't know if you want to go with a different format type, but I would<br>
> think JSON would be a good format for that. Most programming/scripting<br>
> environments handle JSON quite well natively (like Python, and well,<br>
> JavaScript) or through an extension (like PHP, Perl, C#, etc.). Speaking as<br>
> someone who is trying to use mbimcli in a scripting environment, I would<br>
> appreciate some standardized format that's easy to implement, if it's not<br>
> JSON.<br>
<br>
<br>
</div></div>Uff, no, JSON output is way too much. Per output line "key=value"<br>
pairs should be way more than enough.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Aleksander<br>
<a href="https://aleksander.es" rel="noreferrer" target="_blank">https://aleksander.es</a><br>
</font></span></blockquote></div><br><div class="gmail_default" style="font-family:'times new roman',serif;font-size:large">​As long as the pairs are line separated, that should work fine.​</div><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">真実はいつも一つ!/ Always, there's only one truth!<br></div></div>
</div><font face="yw-402608bc37fe50adb11a5899295781aeb83d248d-32171f724592ba35aa5df94faa099fba--o" style="display: none;"></font></div>