rgw: introduce decode_json to easily decode json structures

Introducing a new way to define the json structure of an
object, similar to what we do with bufferlist encode/decode.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: decode RGWUserInfo using decode_json

RGWUserInfo can be decoded using json_decode, and fix
the ->dump() method to match that decoding.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: rgw_jsonparser changes

Now testing json_decode functionality.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
moved rgw/rgw_json.* common/ceph_json.*

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: add encode_json

dump() just dumps the internal content of an object, encode_json()
create the object inside its own section. Note that there are cases
where we don't want an object to be surrounded by a section, e.g.,
when an object represents an array. In such a case we'd need to
override the encode_json() for this object type.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: generic decode_json for containers

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: s/cluster/zone

Old cluster definition is what we'd call zone from now on.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: zone info is configurable

Also rename RadosParams to ZoneParams

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
PendingReleaseNotes: mention renamin of cluster to zone

radosgw-admin now uses the term 'zone'

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Merge pull request #141 from ceph/wip-rgw-zone-config

Wip rgw zone config

Reviewed-by: Sage Weil <sage@inktank.com>