use json instead of raw error msg output
use err instead of message
Remove excessive encoding
Merge pull request #193 from owncloud/use_json_instad_of_raw

use json instead of raw error msg output