Fix this by passing the appropriate json array type for smdevices.
Also include a couple of minor changes as well - add a newline to
the end of the json output, and then free the json root device.
Signed-off-by: Martin George <marting@netapp.com> Tested-by: Clayton Skaggs <claytons@netapp.com>