On Tue, Jan 26, 2010 at 12:57:54PM +0000, Jamie Lokier wrote:
> Luiz Capitulino wrote:
> > capability_enable [ "foo", "bar" ]
> > 
> >  Now, only one command is not terrible difficult, but we would
> > have to accept an array of objects, like:
> > 
> > [ { "name": "foo", "enabled": true }, { "name": "bar", "enabled": true } ]
> 
> That looks like XML-itis.
> 
> Why not { "foo": true, "bar": true }?

It depends on whether we think we're going to need to add more metadata
beyond just the enabled/disabled status. If we did want to add a further
item against foo & bar, then having the array of hashes makes that 
extension easier becaue you add easily add more key/value pairs to
each.


Regards,
Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|


Reply via email to