[asterisk-dev] Formatting options for CLI output
Saúl Ibarra Corretgé
saghul at gmail.com
Fri Nov 9 03:28:05 CST 2012
Hi,
+1 for Olle's suggestion. On to the format...
Nir Simionovich wrote:
> Ok, that’s a +1 by me as well. But, if we go that route, I think we
> should be able to format the output of that
> action. It would be very useful. Honestly, while on the subject, and I
> do admit that what I’m about to say will
> be totally out there – it would be really nice if the input to AMI can
> be a single JSON array, instead of doing the
> ever annoying \n\n in manager – no?
>
Why? You'll get text so you'll need to JSON-decode it anyway, so what's
wrong about \n\n ?
If we go that route someone may want XML as well so then we should have
a way to tell AMI to give you the result of a given query in text, JSON
or XML format. Or maybe set the format for a given AMI
session/connection. Doesn't sound like a bad idea, but there are "a few"
AMI commands out there ;-)
Regards,
--
Saúl Ibarra Corretgé
http://saghul.net/blog | http://about.me/saghul
More information about the asterisk-dev
mailing list