Support JSON encoded not as UTF-8

HTTP allows to specify different encoding as media-type parameter, which
must be taken into account.

Change-Id: I028df93eb9e5d682a4b29138983343cba2be180b